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

java.lang.Object
  extended by 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
Session(String sessionId)
           
 
Method Summary
<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-2012 Tigase. All Rights Reserved.