Package tigase.component.modules

# Interface Module

All Known Implementing Classes:
  `AbstractEventBusModule`, `AbstractModule`, `AbstractModule`, `AdHocCommandModule`, `AdHocCommandMonitorModule`, `DepartQueueModule`, `DiscoveryModule`, `DiscoveryModule`, `DiscoveryMonitorModule`, `EventbusDiscoveryModule`, `EventPublisherModule`, `EventReceiverModule`, `ExternalServiceDiscoveryModule`, `GetFormModule`, `JabberVersionModule`, `JoinQueueModule`, `MucControllerModule`, `OfferModule`, `PresenceModule`, `QueryModule`, `QueueStatusModule`, `StatusModule`, `SubscribeModule`, `TestGeneratorModule`, `TestSpamModule`, `UnsubscribeModule`, `XmppPingModule`

public interface Module
Basic interface to implement component module. Single module should implement fragment of component logic. Is easy to add or remove in component (Server) configuration.

Author:
  bmalkow

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String[]`
  `EMPTY_FEATURES`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default boolean`
  `canHandle(Packet packet)`
  Returns true if Packet can be procesed by module.
  `default String[]`
  `getFeatures()`
  Returns XMPP features offered by module.
  `Criteria`
  `getModuleCriteria()`
  Returns critera used by Component to select module to handle incoming stanza.
  `void`
  `process(Packet packet)`
  Process incoming stanza.

- ## Field Details

  - ### EMPTY_FEATURES

    static final String[] EMPTY_FEATURES

- ## Method Details

  - ### getFeatures

    default String[] getFeatures()
    Returns XMPP features offered by module. Features will be returned by Service Discovery.
    Returns:
      array of features or `null`.

  - ### getModuleCriteria

    Criteria getModuleCriteria()
    Returns critera used by Component to select module to handle incoming stanza.
    Returns:
      criteria of selecting module.

  - ### canHandle

    default boolean canHandle(Packet packet)
    Returns true if Packet can be procesed by module. Default implementation uses Criteria.

  - ### process

    void process(Packet packet) throws ComponentException, TigaseStringprepException
    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.