tigase.disteventbus.component

## Class SubscribeModule

- java.lang.Object
- - tigase.component.modules.AbstractModule<EventBusContext>
  - - tigase.disteventbus.component.AbstractEventBusModule
    - - tigase.disteventbus.component.SubscribeModule

- All Implemented Interfaces:
    ContextAware, InitializingModule, Module

      public class SubscribeModule
      extends AbstractEventBusModule

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ID`

    - ### Fields inherited from class tigase.component.modules.AbstractModule

      `context, log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SubscribeModule()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterRegistration()` Called after registration.
    `void` | `clusterNodeConnected(JID node)`
    `void` | `clusterNodeDisconnected(JID node)`
    `String[]` | `getFeatures()` Returns XMPP features offered by module.
    `Criteria` | `getModuleCriteria()` Returns critera used by Component to select module to handle incoming stanza.
    `protected void` | `onAddHandler(String eventName, String eventXmlns)`
    `void` | `process(Packet packet)` Process incoming stanza.
    `protected Element` | `processClusterSubscription(Packet packet)`
    `protected Element` | `processNonClusterSubscription(Packet packet)`
    `protected void` | `sendSubscribeRequest(String to, Collection<Element> subscriptionElements)`
    `void` | `unregisterModule()` Called before module is unregistered.

    - ### Methods inherited from class tigase.disteventbus.component.AbstractEventBusModule

      `isClusteredEventBus, nextStanzaID`

    - ### Methods inherited from class tigase.component.modules.AbstractModule

      `beforeRegister, fireEvent, setContext, write, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ID

          public static final String ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SubscribeModule

          public SubscribeModule()

  - ### Method Detail

    - #### afterRegistration

          public void afterRegistration()

      Description copied from interface: `InitializingModule`
      Called after registration.
      Specified by:
        `afterRegistration` in interface `InitializingModule`
      Overrides:
        `afterRegistration` in class `AbstractModule<EventBusContext>`

    - #### clusterNodeConnected

          public void clusterNodeConnected(JID node)

    - #### clusterNodeDisconnected

          public void clusterNodeDisconnected(JID node)

    - #### getFeatures

          public String[] getFeatures()

      Description copied from interface: `Module`
      Returns XMPP features offered by module. Features will be returned by Service Discovery.
      Returns:
        array of features or `null`.

    - #### getModuleCriteria

          public Criteria getModuleCriteria()

      Description copied from interface: `Module`
      Returns critera used by Component to select module to handle incoming stanza.
      Returns:
        criteria of selecting module.

    - #### onAddHandler

          protected void onAddHandler(String eventName,
                                      String eventXmlns)

    - #### process

          public void process(Packet packet)
                       throws ComponentException,
                              TigaseStringprepException

      Description copied from interface: `Module`
      Process incoming stanza.
      Parameters:
        `packet` - received `stanza`.
      Throws:
        `ComponentException` - if stanza can't be processed correctly. ComponentException is converted to error stanza and returned to stanza sender.
        `TigaseStringprepException` - if there was an error during stringprep processing.

    - #### processClusterSubscription

          protected Element processClusterSubscription(Packet packet)
                                                throws TigaseStringprepException

      Throws:
        `TigaseStringprepException`

    - #### processNonClusterSubscription

          protected Element processNonClusterSubscription(Packet packet)
                                                   throws TigaseStringprepException,
                                                          ComponentException

      Throws:
        `TigaseStringprepException`
        `ComponentException`

    - #### sendSubscribeRequest

          protected void sendSubscribeRequest(String to,
                                              Collection<Element> subscriptionElements)

    - #### unregisterModule

          public void unregisterModule()

      Description copied from interface: `InitializingModule`
      Called before module is unregistered.
      Specified by:
        `unregisterModule` in interface `InitializingModule`
      Overrides:
        `unregisterModule` in class `AbstractModule<EventBusContext>`

Copyright © 2022 "Tigase, Inc.". All rights reserved.