Package rocks.xmpp.core.bind.model
Class Bind
- java.lang.Object
-
- rocks.xmpp.core.stream.model.StreamFeature
-
- rocks.xmpp.core.bind.model.Bind
-
- All Implemented Interfaces:
Comparable<StreamFeature>
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class rocks.xmpp.core.stream.model.StreamFeature
compareTo, requiresRestart
-
-
-
-
Method Detail
-
getJid
public final Jid getJid()
Gets the JID, which has been generated by the server after resource binding.- Returns:
- The JID.
-
getResource
public final String getResource()
Gets the resource.- Returns:
- The resource.
-
isMandatory
public final boolean isMandatory()
Description copied from class:StreamFeature
Indicates, whether this feature is mandatory to negotiate. By default a feature is not mandatory. Override this method for mandatory-to-negotiate features.- Overrides:
isMandatory
in classStreamFeature
- Returns:
- True, if the feature is mandatory.
-
getPriority
public final int getPriority()
Description copied from class:StreamFeature
Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.- Overrides:
getPriority
in classStreamFeature
- Returns:
- The priority.
-
-