tigase.jaxmpp.core.client

## Class XmppModulesManager

- java.lang.Object
- - tigase.jaxmpp.core.client.XmppModulesManager

- All Implemented Interfaces:
    ModuleProvider

      public class XmppModulesManager
      extends Object
      implements ModuleProvider

  XMPP Modules Manager. This manager finds correct module to handle given incoming stanza.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmppModulesManager(Context context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<XmppModule>` | `findModules(Element element)` Finds collection of modules that can handle stanza.
    `Set<String>` | `getAvailableFeatures()` Returns all features registered by modules.
    `<T extends XmppModule> T` | `getModule(Class<T> moduleClass)` Return module implementation by module class.
    `void` | `initIfRequired()`
    `<T extends XmppModule> T` | `register(T plugin)` Register XmppModule.
    `<T extends XmppModule> T` | `unregister(T plugin)` Unregisters module.

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

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

- - ### Constructor Detail

    - #### XmppModulesManager

          public XmppModulesManager(Context context)

  - ### Method Detail

    - #### findModules

          public List<XmppModule> findModules(Element element)
                                       throws XMLException

      Finds collection of modules that can handle stanza.
      Parameters:
        `element` - incoming stanza.
      Returns:
        list of modules that can handle stanza.
      Throws:
        `XMLException`

    - #### getAvailableFeatures

          public Set<String> getAvailableFeatures()

      Returns all features registered by modules.
      Specified by:
        `getAvailableFeatures` in interface `ModuleProvider`
      Returns:
        Set of features.

    - #### getModule

          public <T extends XmppModule> T getModule(Class<T> moduleClass)

      Return module implementation by module class.
      Specified by:
        `getModule` in interface `ModuleProvider`
      Parameters:
        `moduleClass` - module class
      Returns:
        module implementation

    - #### initIfRequired

          public void initIfRequired()

    - #### register

          public <T extends XmppModule> T register(T plugin)

      Register XmppModule.
      Parameters:
        `plugin` - module
      Returns:
        module

    - #### unregister

          public <T extends XmppModule> T unregister(T plugin)

      Unregisters module.
      Parameters:
        `plugin` - module to unregister
      Returns:
        unregistered module. `null` if module wasn't registered.

Copyright © 2006–2019 Tigase. All rights reserved.