tigase.jaxmpp.core.client.xmpp.modules.roster
Class RosterModule

java.lang.Object
  extended by tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
      extended by tigase.jaxmpp.core.client.xmpp.modules.roster.RosterModule
All Implemented Interfaces:
InitializingModule, XmppModule

public class RosterModule
extends AbstractIQModule
implements InitializingModule

Module for roster manipulation.


Nested Class Summary
static class RosterModule.RosterEvent
           
 
Field Summary
static Criteria CRIT
           
static EventType ItemAdded
           
static EventType ItemRemoved
           
static EventType ItemUpdated
           
 
Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
log, observable, sessionObject, writer
 
Constructor Summary
RosterModule(Observable parentObservable, SessionObject sessionObject, PacketWriter packetWriter)
           
 
Method Summary
protected  void add(BareJID jid, String name, Collection<String> groups, AsyncCallback asyncCallback)
           
 void afterRegister()
          Called when module is registered.
 void beforeRegister()
          Called just before registration module in XmppModulesManager .
 void beforeUnregister()
          Called when module is unregistered.
 Criteria getCriteria()
          Criteria
 String[] getFeatures()
           Returns features what are implemented by Module.
 RosterCacheProvider getVersionProvider()
           
protected  void onRosterCleared()
           
protected  void processGet(IQ element)
          Method for processing stanza <iq type='get'>.
protected  void processSet(IQ stanza)
          Method for processing stanza <iq type='set'>.
protected  void remove(BareJID jid)
           
 void rosterRequest()
          Requests for roster.
protected  void update(RosterItem item)
           
 
Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
addListener, addListener, process, removeAllListeners, removeListener, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRIT

public static final Criteria CRIT

ItemAdded

public static final EventType ItemAdded

ItemRemoved

public static final EventType ItemRemoved

ItemUpdated

public static final EventType ItemUpdated
Constructor Detail

RosterModule

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

add

protected void add(BareJID jid,
                   String name,
                   Collection<String> groups,
                   AsyncCallback asyncCallback)
            throws XMLException,
                   JaxmppException
Throws:
XMLException
JaxmppException

afterRegister

public void afterRegister()
Description copied from interface: InitializingModule
Called when module is registered. At this moment module is formally registered and it is part of client.

Specified by:
afterRegister in interface InitializingModule

beforeRegister

public void beforeRegister()
Description copied from interface: InitializingModule
Called just before registration module in XmppModulesManager . It is good place to check if module is initialized properly.

Specified by:
beforeRegister in interface InitializingModule

beforeUnregister

public void beforeUnregister()
Description copied from interface: InitializingModule
Called when module is unregistered.

Specified by:
beforeUnregister in interface InitializingModule

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

getVersionProvider

public RosterCacheProvider getVersionProvider()

onRosterCleared

protected void onRosterCleared()

processGet

protected void processGet(IQ element)
                   throws XMPPException,
                          XMLException
Description copied from class: AbstractIQModule
Method for processing stanza <iq type='get'>.

Specified by:
processGet in class AbstractIQModule
Parameters:
element - incoming XMPP stanza
Throws:
XMPPException
XMLException

processSet

protected void processSet(IQ stanza)
                   throws JaxmppException
Description copied from class: AbstractIQModule
Method for processing stanza <iq type='set'>.

Specified by:
processSet in class AbstractIQModule
Parameters:
stanza - incoming XMPP stanza
Throws:
JaxmppException

remove

protected void remove(BareJID jid)
               throws XMLException,
                      JaxmppException
Throws:
XMLException
JaxmppException

rosterRequest

public void rosterRequest()
                   throws XMLException,
                          JaxmppException
Requests for roster. Roster will be send by server asynchronously.

Throws:
XMLException
JaxmppException

update

protected void update(RosterItem item)
               throws XMLException,
                      JaxmppException
Throws:
XMLException
JaxmppException


Copyright © 2006-2013 Tigase. All Rights Reserved.