Package rocks.xmpp.core.sasl.model
Class Mechanisms
- java.lang.Object
-
- rocks.xmpp.core.stream.model.StreamFeature
-
- rocks.xmpp.core.sasl.model.Mechanisms
-
- All Implemented Interfaces:
Comparable<StreamFeature>
public final class Mechanisms extends StreamFeature
Represents the<mechanisms/>
element as described in Exchange of Stream Headers and Stream FeaturesThis class is immutable.
-
-
Constructor Summary
Constructors Constructor Description Mechanisms(Collection<String> mechanisms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getMechanisms()
Gets the list of mechanisms supported by the server.int
getPriority()
Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.boolean
isMandatory()
Returns always true, because SASL is mandatory to negotiate.boolean
requiresRestart()
If this feature requires a stream restart after it has been negotiated.String
toString()
-
Methods inherited from class rocks.xmpp.core.stream.model.StreamFeature
compareTo
-
-
-
-
Constructor Detail
-
Mechanisms
public Mechanisms(Collection<String> mechanisms)
-
-
Method Detail
-
getMechanisms
public final List<String> getMechanisms()
Gets the list of mechanisms supported by the server.- Returns:
- The list of mechanisms.s
-
isMandatory
public final boolean isMandatory()
Returns always true, because SASL is mandatory to negotiate.The parties to a stream MUST consider SASL as mandatory-to-negotiate.
- Overrides:
isMandatory
in classStreamFeature
- Returns:
- True. This feature is always mandatory to negotiate.
-
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.
-
requiresRestart
public final boolean requiresRestart()
Description copied from class:StreamFeature
If this feature requires a stream restart after it has been negotiated.- Overrides:
requiresRestart
in classStreamFeature
- Returns:
- True, if a stream restart is required.
-
-