tigase.jaxmpp.core.client.xmpp.modules.adhoc

## Class Session

- java.lang.Object
- - tigase.jaxmpp.core.client.xmpp.modules.adhoc.Session

-     public class Session
      extends Object

  Class for help handle longer conversation with client. It allows to keep data between requests.
  Author:
    bmalkow

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Session(String sessionId)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getData(String key)` Return object stored in session.
    `Date` | `getLastRequest()` Return timestamp of last request.
    `String` | `getSessionId()` Return session ID.
    `<T> void` | `setData(String key, T data)` Store object in session.

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

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

- - ### Constructor Detail

    - #### Session

          public Session(String sessionId)

  - ### Method Detail

    - #### getData

          public <T> T getData(String key)

      Return object stored in session.
      Parameters:
        `key` - name of stored object
      Returns:
        stored object or `null` is no object with given name.

    - #### getLastRequest

          public Date getLastRequest()

      Return timestamp of last request.
      Returns:
        timestamp of last request.

    - #### getSessionId

          public String getSessionId()

      Return session ID.
      Returns:
        session ID.

    - #### setData

          public <T> void setData(String key,
                                  T data)

      Store object in session.
      Parameters:
        `key` - name of object.
        `data` - object to store.

Copyright © 2006–2020 Tigase. All rights reserved.