Package tigase.server.rtbl

# Class RTBLIqModule<RCTX>

java.lang.Object
tigase.component.modules.AbstractModule
tigase.server.rtbl.RTBLIqModule<RCTX>

All Implemented Interfaces:
  `Module`, `Initializable`, `UnregisterAware`

Direct Known Subclasses:
  `RTBLFetchModule`, `RTBLSubscribeModule`

public abstract class RTBLIqModule<RCTX> extends AbstractModule implements Initializable, UnregisterAware

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `RTBLIqModule.RequestKey`
  `static class`
  `RTBLIqModule.ResultEvent`

- ## Field Summary

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

  `eventBus, log, writer`

  ### Fields inherited from interface tigase.component.modules.Module

  `EMPTY_FEATURES`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RTBLIqModule(String requestPrefix)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `beforeUnregister()`
  Method called before bean unregister.
  `RTBLComponent`
  `getComponent()`
  `Criteria`
  `getModuleCriteria()`
  Returns critera used by Component to select module to handle incoming stanza.
  `protected JID`
  `getOwnJID()`
  `protected abstract void`
  `handleResult(RTBLIqModule.ResultEvent event, RCTX ctx)`
  `void`
  `handleResultEvent(RTBLIqModule.ResultEvent event)`
  `protected void`
  `handleSuccess(Iq iq)`
  `void`
  `initialize()`
  Method will be called, when bean will be created, configured and ready to use.
  `void`
  `process(Packet packet)`
  Process incoming stanza.
  `protected <T> void`
  `sendIq(BareJID to, StanzaType type, Consumer<Element> consumer, Supplier<RCTX> handleContextSupplier)`

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

  `fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write`

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

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

  ### Methods inherited from interface tigase.component.modules.Module

  `canHandle, getFeatures`

- ## Constructor Details

  - ### RTBLIqModule

    public RTBLIqModule(String requestPrefix)

- ## Method Details

  - ### getComponent

    public RTBLComponent getComponent()

  - ### getModuleCriteria

    public Criteria getModuleCriteria()
    Description copied from interface: `Module`
    Returns critera used by Component to select module to handle incoming stanza.
    Specified by:
      `getModuleCriteria` in interface `Module`
    Returns:
      criteria of selecting module.

  - ### initialize

    public void initialize()
    Description copied from interface: `Initializable`
    Method will be called, when bean will be created, configured and ready to use.
    Specified by:
      `initialize` in interface `Initializable`

  - ### beforeUnregister

    public void beforeUnregister()
    Description copied from interface: `UnregisterAware`
    Method called before bean unregister.
    Specified by:
      `beforeUnregister` in interface `UnregisterAware`

  - ### getOwnJID

    protected JID getOwnJID()

  - ### sendIq

    protected <T> void sendIq(BareJID to, StanzaType type, Consumer<Element> consumer, Supplier<RCTX> handleContextSupplier)

  - ### process

    public void process(Packet packet) throws ComponentException, TigaseStringprepException
    Description copied from interface: `Module`
    Process incoming stanza.
    Specified by:
      `process` in interface `Module`
    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.

  - ### handleSuccess

    protected void handleSuccess(Iq iq)

  - ### handleResultEvent

    @HandleEvent public void handleResultEvent(RTBLIqModule.ResultEvent event)

  - ### handleResult

    protected abstract void handleResult(RTBLIqModule.ResultEvent event, RCTX ctx)