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

## Class RosterModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule<T>
  - - tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaExtendableModule<IQ>
    - - tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule
      - - tigase.jaxmpp.core.client.xmpp.modules.roster.RosterModule

- All Implemented Interfaces:
    EventHandler, ContextAware, ExtendableModule, InitializingModule, XmppModule, XmppSessionLogic.XmppSessionEstablishedHandler

      public class RosterModule
      extends AbstractIQModule
      implements ContextAware, InitializingModule, XmppSessionLogic.XmppSessionEstablishedHandler

  Module for roster manipulation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RosterModule.Action`
    `static interface` | `RosterModule.ItemAddedHandler`
    `static interface` | `RosterModule.ItemRemovedHandler`
    `static interface` | `RosterModule.ItemUpdatedHandler`

    - ### Nested classes/interfaces inherited from interface tigase.jaxmpp.core.client.XmppSessionLogic.XmppSessionEstablishedHandler

      `XmppSessionLogic.XmppSessionEstablishedHandler.XmppSessionEstablishedEvent`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Criteria` | `CRIT`
    `static String` | `ROSTER_STORE_KEY`

    - ### Fields inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule

      `context, log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RosterModule()`
    `RosterModule(RosterCacheProvider versionProvider)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `RosterStore` | `getRosterStore()`
    `static RosterStore` | `getRosterStore(SessionObject sessionObject)`
    `RosterCacheProvider` | `getVersionProvider()`
    `protected void` | `onRosterCleared()`
    `void` | `onXmppSessionEstablished(SessionObject sessionObject)`
    `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.
    `void` | `setContext(Context context)`
    `static void` | `setRosterStore(SessionObject sessionObject, RosterStore rosterStore)`
    `protected void` | `update(RosterItem item)`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractIQModule

      `process`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaExtendableModule

      `addExtension, getExtensionChain, getFeaturesWithExtensions, removeExtension, write, write, write`

    - ### Methods inherited from class tigase.jaxmpp.core.client.xmpp.modules.AbstractStanzaModule

      `fireEvent, getFirstChild, process`

    - ### 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

    - #### ROSTER_STORE_KEY

          public static final String ROSTER_STORE_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RosterModule

          public RosterModule()

    - #### RosterModule

          public RosterModule(RosterCacheProvider versionProvider)

  - ### Method Detail

    - #### getRosterStore

          public static RosterStore getRosterStore(SessionObject sessionObject)

    - #### setRosterStore

          public static void setRosterStore(SessionObject sessionObject,
                                            RosterStore rosterStore)

    - #### add

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

      Throws:
        `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`
      Overrides:
        `afterRegister` in class `AbstractStanzaModule<IQ>`

    - #### 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`
      Overrides:
        `beforeRegister` in class `AbstractStanzaModule<IQ>`

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `InitializingModule`
      Called when module is unregistered.
      Specified by:
        `beforeUnregister` in interface `InitializingModule`
      Overrides:
        `beforeUnregister` in class `AbstractStanzaModule<IQ>`

    - #### 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

    - #### getRosterStore

          public RosterStore getRosterStore()

    - #### getVersionProvider

          public RosterCacheProvider getVersionProvider()

    - #### onRosterCleared

          protected void onRosterCleared()

    - #### onXmppSessionEstablished

          public void onXmppSessionEstablished(SessionObject sessionObject)
                                        throws JaxmppException

      Specified by:
        `onXmppSessionEstablished` in interface `XmppSessionLogic.XmppSessionEstablishedHandler`
      Throws:
        `JaxmppException`

    - #### 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 JaxmppException

      Throws:
        `JaxmppException`

    - #### rosterRequest

          public void rosterRequest()
                             throws JaxmppException

      Requests for roster. Roster will be send by server asynchronously.
      Throws:
        `JaxmppException`

    - #### setContext

          public void setContext(Context context)

      Specified by:
        `setContext` in interface `ContextAware`
      Overrides:
        `setContext` in class `AbstractStanzaModule<IQ>`

    - #### update

          protected void update(RosterItem item)
                         throws JaxmppException

      Throws:
        `JaxmppException`

Copyright © 2006–2020 Tigase. All rights reserved.