Class Index | Minimal

Classes


Class jabberwerx.SASLMechanismFactory (MINIMAL)


Extends jabberwerx.JWBase.

Factory class for managing and creating SASLMechanisms.

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new SASLMechanismFactory.

Field Summary
Field Attributes Field Name and Description
 

The list of SASL client mechanisms supported.

Method Summary
Method Attributes Method Name and Description
 

Adds the given mechanism to the map of available mechanisms.

 
createMechanismFor(client, mechs)

Creates a SASLMechanism appropriate for the given list of possible mechanisms.

 

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
Class Detail
jabberwerx.SASLMechanismFactory(mechs)

Creates a new SASLMechanismFactory.

Parameters:
{String[]} mechs Optional
The list of enabled mechanisms
Field Detail
{String[]} 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.

Method Detail
addMechanism(type)

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

{jabberwerx.SASLMechanism} createMechanismFor(client, mechs)

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

removeMechanism(type)

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

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:43 GMT-0600 (MDT)