tigase.jaxmpp.core.client.xmpp.modules

## Class StreamFeaturesModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.StreamFeaturesModule

- All Implemented Interfaces:
    ContextAware, InitializingModule, XmppModule

      public class StreamFeaturesModule
      extends Object
      implements XmppModule, ContextAware, InitializingModule

  Module for Stream Features.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `StreamFeaturesModule.CacheProvider`
    `static interface` | `StreamFeaturesModule.StreamFeaturesReceivedHandler` Event fires when stream features are received.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CACHE_PROVIDER_KEY`
    `protected Logger` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamFeaturesModule()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStreamFeaturesReceivedHandler(StreamFeaturesModule.StreamFeaturesReceivedHandler handler)`
    `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.
    `static Element` | `getStreamFeatures(SessionObject sessionObject)`
    `static boolean` | `isPipeliningActive(SessionObject sessionObject)`
    `void` | `process(Element element)` Main method of module.
    `void` | `removeStreamFeaturesReceivedHandler(StreamFeaturesModule.StreamFeaturesReceivedHandler handler)`
    `static void` | `setCacheProvider(SessionObject sessionObject, StreamFeaturesModule.CacheProvider provider)`
    `void` | `setContext(Context context)`

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

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

- - ### Field Detail

    - #### CACHE_PROVIDER_KEY

          public static final String CACHE_PROVIDER_KEY

      See Also:
        Constant Field Values

    - #### log

          protected final Logger log

  - ### Constructor Detail

    - #### StreamFeaturesModule

          public StreamFeaturesModule()

  - ### Method Detail

    - #### getStreamFeatures

          public static Element getStreamFeatures(SessionObject sessionObject)

    - #### isPipeliningActive

          public static boolean isPipeliningActive(SessionObject sessionObject)

    - #### setCacheProvider

          public static void setCacheProvider(SessionObject sessionObject,
                                              StreamFeaturesModule.CacheProvider provider)

    - #### addStreamFeaturesReceivedHandler

          public void addStreamFeaturesReceivedHandler(StreamFeaturesModule.StreamFeaturesReceivedHandler handler)

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

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

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `InitializingModule`
      Called when module is unregistered.
      Specified by:
        `beforeUnregister` in interface `InitializingModule`

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

    - #### process

          public void process(Element element)
                       throws JaxmppException

      Description copied from interface: `XmppModule`
      Main method of module. Module will process incoming stanza by call this method.
      Specified by:
        `process` in interface `XmppModule`
      Parameters:
        `element` - incoming XMPP stanza
      Throws:
        `JaxmppException`

    - #### removeStreamFeaturesReceivedHandler

          public void removeStreamFeaturesReceivedHandler(StreamFeaturesModule.StreamFeaturesReceivedHandler handler)

    - #### setContext

          public void setContext(Context context)

      Specified by:
        `setContext` in interface `ContextAware`

Copyright © 2006–2020 Tigase. All rights reserved.