Class jabberwerx.SASLMechanismFactory (MINIMAL)
Extends
jabberwerx.JWBase.
Factory class for managing and creating SASLMechanisms.
Constructor Attributes | Constructor Name and Description |
---|---|
Creates a new SASLMechanismFactory. |
Field Attributes | Field Name and Description |
---|---|
The list of SASL client mechanisms supported. |
Method Attributes | Method Name and Description |
---|---|
addMechanism(type)
Adds the given mechanism to the map of available mechanisms. |
|
createMechanismFor(client, mechs)
Creates a SASLMechanism appropriate for the given list of possible mechanisms. |
|
removeMechanism(type)
Removes the given mechanism from the map of available mechanisms. |
- Methods borrowed from class jabberwerx.JWBase:
- destroy, getClassName, graphUnserialized, init, invocation, shouldBeSavedWithGraph, shouldBeSerializedInline, toString, wasUnserialized, willBeSerialized
Creates a new SASLMechanismFactory.
- Parameters:
- {String[]} mechs Optional
- The list of enabled mechanisms
The list of SASL client mechanisms supported. Each element in the array is expected to be the string name of the mechanism.
The order of mechanisms in this array is significant. This factory will create an instance of first SASLMechanism that matches, based on the intersection of server-supplied and client-enabled mechanisms.
Adds the given mechanism to the map of available mechanisms.
- Parameters:
- {Class} type
- The SASLMechanism to add
- Throws:
- {TypeError}
- if {type} is not the class for a SASLMechanism
Creates a SASLMechanism appropriate for the given list of possible mechanisms.
- Parameters:
- {jabberwerx.Client} client
- The client to work against
- {String[]} mechs
- The list of possible mechanisms to use
- Throws:
- {TypeError}
- If {client} is not valid; or if {mechs} is not an array
- Returns:
- {jabberwerx.SASLMechanism} The SASLMechanism object to use, or null if an appropriate mechanism could not be found
Removes the given mechanism from the map of available mechanisms.
- Parameters:
- {Class} type
- The SASLMechanism to remove
- Throws:
- {TypeError}
- if {type} is not the class for a SASLMechanism