public final class Bind extends StreamFeature
<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(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.
|
String |
getResource()
Gets the resource.
|
boolean |
isMandatory()
Indicates, whether this feature is mandatory to negotiate.
|
String |
toString() |
compareTopublic Bind()
<bind/> element.public Bind(String resource)
<bind/> element with a resource.resource - The resource.public Bind(Jid jid)
<bind/> element with a JID.jid - The JID.public final Jid getJid()
public final String getResource()
public final boolean isMandatory()
StreamFeatureisMandatory in class StreamFeaturepublic final int getPriority()
StreamFeaturegetPriority in class StreamFeatureCopyright © 2014–2016 XMPP.rocks. All rights reserved.