tigase.jaxmpp.core.client.xmpp.modules.auth
Class SaslModule

java.lang.Object
  extended by tigase.jaxmpp.core.client.xmpp.modules.auth.SaslModule
All Implemented Interfaces:
XmppModule

public class SaslModule
extends Object
implements XmppModule


Nested Class Summary
static class SaslModule.SaslError
           
static class SaslModule.SaslEvent
           
static class SaslModule.UnsupportedSaslMechanisms
           
 
Field Summary
protected  Logger log
           
static String SASL_MECHANISM
           
protected  SessionObject sessionObject
           
protected  PacketWriter writer
           
 
Constructor Summary
SaslModule(Observable parentObservable, SessionObject sessionObject, PacketWriter packetWriter)
           
 
Method Summary
 void addListener(EventType eventType, Listener<? extends BaseEvent> listener)
           
 void addMechanism(SaslMechanism mechanism)
           
static List<String> getAllowedSASLMechanisms(SessionObject sessionObject)
           
 Criteria getCriteria()
          Criteria
 String[] getFeatures()
           Returns features what are implemented by Module.
 ArrayList<String> getMechanismsOrder()
           
protected  Collection<String> getSupportedMechanisms()
           
protected  SaslMechanism guessSaslMechanism()
           
 void login()
           
 void process(Element element)
          Main method of module.
protected  void processChallenge(Element element)
           
protected  void processFailure(Element element)
           
protected  void processSuccess(Element element)
           
 void removeListener(EventType eventType, Listener<? extends BaseEvent> listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SASL_MECHANISM

public static final String SASL_MECHANISM
See Also:
Constant Field Values

log

protected final Logger log

sessionObject

protected final SessionObject sessionObject

writer

protected final PacketWriter writer
Constructor Detail

SaslModule

public SaslModule(Observable parentObservable,
                  SessionObject sessionObject,
                  PacketWriter packetWriter)
Method Detail

getAllowedSASLMechanisms

public static List<String> getAllowedSASLMechanisms(SessionObject sessionObject)
                                             throws XMLException
Throws:
XMLException

addListener

public void addListener(EventType eventType,
                        Listener<? extends BaseEvent> listener)

addMechanism

public void addMechanism(SaslMechanism mechanism)

getCriteria

public Criteria getCriteria()
Description copied from interface: XmppModule
Criteria

Specified by:
getCriteria in interface XmppModule
Returns:

getFeatures

public String[] getFeatures()
Description copied from interface: XmppModule

Returns features what are implemented by Module.

See Service Discovery Features

Specified by:
getFeatures in interface XmppModule
Returns:
array of features

getMechanismsOrder

public ArrayList<String> getMechanismsOrder()

getSupportedMechanisms

protected Collection<String> getSupportedMechanisms()
                                             throws XMLException
Throws:
XMLException

guessSaslMechanism

protected SaslMechanism guessSaslMechanism()
                                    throws XMLException
Throws:
XMLException

login

public void login()
           throws XMLException,
                  JaxmppException
Throws:
XMLException
JaxmppException

process

public void process(Element element)
             throws XMPPException,
                    XMLException,
                    JaxmppException
Description copied from interface: XmppModule
Main method of module. Module will process incoming stanza by call this method.

Specified by:
process in interface XmppModule
Parameters:
element - incoming XMPP stanza
Throws:
XMPPException
XMLException
JaxmppException

processChallenge

protected void processChallenge(Element element)
                         throws XMPPException,
                                XMLException,
                                JaxmppException
Throws:
XMPPException
XMLException
JaxmppException

processFailure

protected void processFailure(Element element)
                       throws JaxmppException
Throws:
JaxmppException

processSuccess

protected void processSuccess(Element element)
                       throws JaxmppException
Throws:
JaxmppException

removeListener

public void removeListener(EventType eventType,
                           Listener<? extends BaseEvent> listener)


Copyright © 2006-2012 Tigase. All Rights Reserved.