tigase.jaxmpp.core.client.xmpp.modules.streammng

## Class StreamManagementModule

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.streammng.StreamManagementModule

- All Implemented Interfaces:
    ContextAware, XmppModule

      public class StreamManagementModule
      extends Object
      implements XmppModule, ContextAware

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StreamManagementModule.MutableLong`
    `static interface` | `StreamManagementModule.StreamManagementEnabledHandler`
    `static interface` | `StreamManagementModule.StreamManagementFailedHandler`
    `static interface` | `StreamManagementModule.StreamResumedHandler`
    `static interface` | `StreamManagementModule.UnacknowledgedHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `INCOMING_STREAM_H_KEY`
    `static String` | `INCOMING_STREAM_H_LAST_SENT_KEY`
    `protected Logger` | `log`
    `static String` | `OUTGOING_STREAM_H_KEY`
    `static String` | `STREAM_MANAGEMENT_DISABLED_KEY` Property to disable stream management module.
    `static String` | `STREAM_MANAGEMENT_RESUME_KEY`
    `static String` | `STREAM_MANAGEMENT_RESUMPTION_ID_KEY`
    `static String` | `STREAM_MANAGEMENT_RESUMPTION_TIME_KEY`
    `static String` | `STREAM_MANAGEMENT_TURNED_ON_KEY` Property to keep Boolean if stream management is turned on.
    `static String` | `XMLNS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreamManagementModule(JaxmppCore jaxmpp)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStreamManagementEnabledHandler(StreamManagementModule.StreamManagementEnabledHandler handler)`
    `void` | `addStreamManagementFailedHandler(StreamManagementModule.StreamManagementFailedHandler handler)`
    `void` | `addStreamResumedHandler(StreamManagementModule.StreamResumedHandler handler)`
    `void` | `addUnacknowledgedHandler(StreamManagementModule.UnacknowledgedHandler handler)`
    `void` | `enable()` Client enables stream management.
    `Criteria` | `getCriteria()` Criteria
    `String[]` | `getFeatures()` Returns features what are implemented by Module.
    `static long` | `getResumptionTime(SessionObject sessionObject, long defaultValue)`
    `static boolean` | `isAckEnabled(SessionObject sessionObject)`
    `static boolean` | `isResumptionEnabled(SessionObject sessionObject)`
    `static boolean` | `isStreamManagementAvailable(SessionObject sessionObject)`
    `static boolean` | `isStreamManagementTurnedOn(SessionObject sessionObject)`
    `void` | `process(Element element)` Main method of module.
    `boolean` | `processIncomingStanza(Element element)`
    `void` | `processOutgoingElement(Element element)`
    `void` | `removeStreamManagementEnabledHandler(StreamManagementModule.StreamManagementEnabledHandler handler)`
    `void` | `removeStreamManagementFailedHandler(StreamManagementModule.StreamManagementFailedHandler handler)`
    `void` | `removeStreamResumedHandler(StreamManagementModule.StreamResumedHandler handler)`
    `void` | `removeUnacknowledgedHandler(StreamManagementModule.UnacknowledgedHandler handler)`
    `void` | `request()` Request acknowledgement of received stanzas.
    `static void` | `reset(SessionObject sessionObject)`
    `void` | `resume()`
    `void` | `sendAck()`
    `void` | `setContext(Context context)`

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

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

- - ### Field Detail

    - #### INCOMING_STREAM_H_KEY

          public static final String INCOMING_STREAM_H_KEY

      See Also:
        Constant Field Values

    - #### INCOMING_STREAM_H_LAST_SENT_KEY

          public static final String INCOMING_STREAM_H_LAST_SENT_KEY

      See Also:
        Constant Field Values

    - #### OUTGOING_STREAM_H_KEY

          public static final String OUTGOING_STREAM_H_KEY

      See Also:
        Constant Field Values

    - #### STREAM_MANAGEMENT_DISABLED_KEY

          public static final String STREAM_MANAGEMENT_DISABLED_KEY

      Property to disable stream management module.
      See Also:
        Constant Field Values

    - #### STREAM_MANAGEMENT_RESUME_KEY

          public static final String STREAM_MANAGEMENT_RESUME_KEY

      See Also:
        Constant Field Values

    - #### STREAM_MANAGEMENT_RESUMPTION_ID_KEY

          public static final String STREAM_MANAGEMENT_RESUMPTION_ID_KEY

      See Also:
        Constant Field Values

    - #### STREAM_MANAGEMENT_RESUMPTION_TIME_KEY

          public static final String STREAM_MANAGEMENT_RESUMPTION_TIME_KEY

      See Also:
        Constant Field Values

    - #### STREAM_MANAGEMENT_TURNED_ON_KEY

          public static final String STREAM_MANAGEMENT_TURNED_ON_KEY

      Property to keep Boolean if stream management is turned on.
      See Also:
        Constant Field Values

    - #### XMLNS

          public static final String XMLNS

      See Also:
        Constant Field Values

    - #### log

          protected final Logger log

  - ### Constructor Detail

    - #### StreamManagementModule

          public StreamManagementModule(JaxmppCore jaxmpp)

  - ### Method Detail

    - #### getResumptionTime

          public static long getResumptionTime(SessionObject sessionObject,
                                               long defaultValue)

    - #### isAckEnabled

          public static boolean isAckEnabled(SessionObject sessionObject)

    - #### isResumptionEnabled

          public static boolean isResumptionEnabled(SessionObject sessionObject)

    - #### isStreamManagementAvailable

          public static boolean isStreamManagementAvailable(SessionObject sessionObject)
                                                     throws JaxmppException

      Throws:
        `JaxmppException`

    - #### isStreamManagementTurnedOn

          public static boolean isStreamManagementTurnedOn(SessionObject sessionObject)

    - #### reset

          public static void reset(SessionObject sessionObject)

    - #### addStreamManagementEnabledHandler

          public void addStreamManagementEnabledHandler(StreamManagementModule.StreamManagementEnabledHandler handler)

    - #### addStreamManagementFailedHandler

          public void addStreamManagementFailedHandler(StreamManagementModule.StreamManagementFailedHandler handler)

    - #### addStreamResumedHandler

          public void addStreamResumedHandler(StreamManagementModule.StreamResumedHandler handler)

    - #### addUnacknowledgedHandler

          public void addUnacknowledgedHandler(StreamManagementModule.UnacknowledgedHandler handler)

    - #### enable

          public void enable()
                      throws JaxmppException

      Client enables stream management.
      Throws:
        `JaxmppException`

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

    - #### processIncomingStanza

          public boolean processIncomingStanza(Element element)
                                        throws XMLException

      Throws:
        `XMLException`

    - #### processOutgoingElement

          public void processOutgoingElement(Element element)
                                      throws JaxmppException

      Throws:
        `JaxmppException`

    - #### removeStreamManagementEnabledHandler

          public void removeStreamManagementEnabledHandler(StreamManagementModule.StreamManagementEnabledHandler handler)

    - #### removeStreamManagementFailedHandler

          public void removeStreamManagementFailedHandler(StreamManagementModule.StreamManagementFailedHandler handler)

    - #### removeStreamResumedHandler

          public void removeStreamResumedHandler(StreamManagementModule.StreamResumedHandler handler)

    - #### removeUnacknowledgedHandler

          public void removeUnacknowledgedHandler(StreamManagementModule.UnacknowledgedHandler handler)

    - #### request

          public void request()
                       throws JaxmppException

      Request acknowledgement of received stanzas.
      Throws:
        `JaxmppException`

    - #### resume

          public void resume()
                      throws JaxmppException

      Throws:
        `JaxmppException`

    - #### sendAck

          public void sendAck()
                       throws JaxmppException

      Throws:
        `JaxmppException`

    - #### setContext

          public void setContext(Context context)

      Specified by:
        `setContext` in interface `ContextAware`

Copyright © 2006–2016 Tigase. All rights reserved.