tigase.component.responses

## Class ResponseManager

- java.lang.Object
- - tigase.component.responses.ResponseManager

-     public class ResponseManager
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `ResponseManager.Entry`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_TIMEOUT`
    `protected Logger` | `log`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResponseManager(Context context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkTimeouts()`
    `protected Map<String,ResponseManager.Entry>` | `getHandlers()`
    `Runnable` | `getResponseHandler(Packet element)` Returns handler for response of sent `<iq/>` stanza.
    `String` | `registerResponseHandler(Packet stanza, Long timeout, AsyncCallback callback)` Register callback for response of sent `<iq/>` stanza.

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

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

- - ### Field Detail

    - #### DEFAULT_TIMEOUT

          public static final long DEFAULT_TIMEOUT

      See Also:
        Constant Field Values

    - #### log

          protected final Logger log

  - ### Constructor Detail

    - #### ResponseManager

          public ResponseManager(Context context)

  - ### Method Detail

    - #### checkTimeouts

          public void checkTimeouts()

    - #### getHandlers

          protected Map<String,ResponseManager.Entry> getHandlers()

    - #### getResponseHandler

          public Runnable getResponseHandler(Packet element)

      Returns handler for response of sent `<iq/>` stanza.
      Parameters:
        `element` - response `<iq/>` stanza.
      Returns:
        Runnable object with handler

    - #### registerResponseHandler

          public String registerResponseHandler(Packet stanza,
                                                Long timeout,
                                                AsyncCallback callback)

      Register callback for response of sent `<iq/>` stanza.
      Parameters:
        `stanza` - sent `<iq/>` stanza.
        `timeout` - timeout. After it method onTimeout() will be called.
        `callback` - callback
      Returns:
        id of stanza

Copyright © 2017 "Tigase, Inc.". All rights reserved.