public final class Bind extends StreamFeature
The implementation of the <bind/> element, which is used during resource binding.
Upon sending a new response stream header to the client after successful SASL negotiation, the server MUST include a
<bind/>element qualified by the ‘urn:ietf:params:xml:ns:xmpp-bind’ namespace in the stream features it presents to the client.
A client requests a server-generated resourcepart by sending an IQ stanza of type “set” (see Section 8.2.3) containing an empty
<bind/>element qualified by the ‘urn:ietf:params:xml:ns:xmpp-bind’ namespace.Once the server has generated an XMPP resourcepart for the client, it MUST return an IQ stanza of type “result” to the client, which MUST include a
<jid/>child element that specifies the full JID for the connected resource as determined by the server.
This class is immutable.
| Constructor and Description |
|---|
Bind()
Creates an empty
<bind/> element. |
Bind(Jid jid)
Creates a
<bind/> element with a JID. |
Bind(java.lang.String resource)
Creates a
<bind/> element with a resource. |
| Modifier and Type | Method and Description |
|---|---|
Jid |
getJid()
Gets the JID, which has been generated by the server after resource binding.
|
int |
getPriority()
Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
|
java.lang.String |
getResource()
Gets the resource.
|
boolean |
isMandatory()
Indicates, whether this feature is mandatory to negotiate.
|
java.lang.String |
toString() |
compareTo, requiresRestartpublic Bind()
Creates an empty <bind/> element.
public Bind(java.lang.String resource)
Creates a <bind/> element with a resource.
resource - The resource.public Bind(Jid jid)
Creates a <bind/> element with a JID.
jid - The JID.public final Jid getJid()
Gets the JID, which has been generated by the server after resource binding.
public final java.lang.String getResource()
Gets the resource.
public final boolean isMandatory()
StreamFeatureIndicates, whether this feature is mandatory to negotiate. By default a feature is not mandatory. Override this method for mandatory-to-negotiate features.
isMandatory in class StreamFeaturepublic final int getPriority()
StreamFeatureGets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
getPriority in class StreamFeaturepublic final java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2019 XMPP.rocks. All rights reserved.