tigase.jaxmpp.core.client.xmpp.modules
Class SessionEstablishmentModule

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

public class SessionEstablishmentModule
extends Object
implements XmppModule

Module for Session Establishment.


Nested Class Summary
static class SessionEstablishmentModule.SessionEstablishmentEvent
           
 
Field Summary
protected  Logger log
           
static String SESSION_ESTABLISHED
           
static EventType SessionEstablishmentError
           
static EventType SessionEstablishmentSuccess
           
protected  SessionObject sessionObject
           
protected  PacketWriter writer
           
 
Constructor Summary
SessionEstablishmentModule(Observable parentObservable, SessionObject sessionObject, PacketWriter packetWriter)
           
 
Method Summary
 void addListener(EventType eventType, Listener<SessionEstablishmentModule.SessionEstablishmentEvent> listener)
           
 void establish()
           
 Criteria getCriteria()
          Criteria
 String[] getFeatures()
           Returns features what are implemented by Module.
static boolean isSessionEstablishingAvailable(SessionObject sessionObject)
           
 void process(Element element)
          Main method of module.
 void removeListener(EventType eventType, Listener<SessionEstablishmentModule.SessionEstablishmentEvent> listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_ESTABLISHED

public static final String SESSION_ESTABLISHED
See Also:
Constant Field Values

SessionEstablishmentError

public static final EventType SessionEstablishmentError

SessionEstablishmentSuccess

public static final EventType SessionEstablishmentSuccess

log

protected final Logger log

sessionObject

protected final SessionObject sessionObject

writer

protected final PacketWriter writer
Constructor Detail

SessionEstablishmentModule

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

isSessionEstablishingAvailable

public static boolean isSessionEstablishingAvailable(SessionObject sessionObject)
                                              throws XMLException
Throws:
XMLException

addListener

public void addListener(EventType eventType,
                        Listener<SessionEstablishmentModule.SessionEstablishmentEvent> listener)

establish

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

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

process

public void process(Element element)
             throws XMPPException,
                    XMLException
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

removeListener

public void removeListener(EventType eventType,
                           Listener<SessionEstablishmentModule.SessionEstablishmentEvent> listener)


Copyright © 2006-2012 Tigase. All Rights Reserved.