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

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

public class ResourceBinderModule
extends Object
implements XmppModule

Module for Resource Binding.


Nested Class Summary
static class ResourceBinderModule.ResourceBindEvent
           
 
Field Summary
static String BINDED_RESOURCE_JID
          Property name for retrieve binded resource from SessionObject.
protected  Logger log
           
static EventType ResourceBindError
          Event fires on binding error.
static EventType ResourceBindSuccess
          Event fires on binding success.
protected  SessionObject sessionObject
           
protected  PacketWriter writer
           
 
Constructor Summary
ResourceBinderModule(Observable parentObservable, SessionObject sessionObject, PacketWriter packetWriter)
           
 
Method Summary
 void addListener(EventType eventType, Listener<ResourceBinderModule.ResourceBindEvent> listener)
           
 void bind()
           
 Criteria getCriteria()
          Criteria
 String[] getFeatures()
           Returns features what are implemented by Module.
 void process(Element element)
          Main method of module.
 void removeListener(EventType eventType, Listener<ResourceBinderModule.ResourceBindEvent> listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BINDED_RESOURCE_JID

public static final String BINDED_RESOURCE_JID
Property name for retrieve binded resource from SessionObject.

See Also:
Constant Field Values

ResourceBindError

public static final EventType ResourceBindError
Event fires on binding error.


ResourceBindSuccess

public static final EventType ResourceBindSuccess
Event fires on binding success.


log

protected final Logger log

sessionObject

protected final SessionObject sessionObject

writer

protected final PacketWriter writer
Constructor Detail

ResourceBinderModule

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

addListener

public void addListener(EventType eventType,
                        Listener<ResourceBinderModule.ResourceBindEvent> listener)

bind

public void bind()
          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<ResourceBinderModule.ResourceBindEvent> listener)


Copyright © 2006-2012 Tigase. All Rights Reserved.