public class Session extends Object implements Serializable
Applications make subclasses of this class for encapsulating session state and identifying it by a session ID.
Constructor and Description |
---|
Session()
Constructs a new session state object for the current response.
|
Session(int minutes_to_live)
Constructs a new session state object for the current response.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Invoked by the session manager on timeout.
|
void |
end()
Ends this session and informs listeners.
|
String |
getID()
Returns the ID of this session state object.
|
int |
getMinutes()
Returns the minutes-to-live (from when last refreshed).
|
long |
getTimeout()
Returns the current timeout for this session state object.
|
void |
refresh()
Refreshes this session state object.
|
String |
toString()
Returns the ID of this session state object.
|
static Session |
valueOf(String id)
Refreshes and returns the session object of the given ID via the session state manager.
|
public Session()
public Session(int minutes_to_live)
public void destroy()
public void end()
public final String getID()
public int getMinutes()
public final long getTimeout()
public void refresh()
public String toString()
public static Session valueOf(String id) throws SessionDefunctException
SessionDefunctException
- if the session does not existCopyright © 2008-2012 Anders Møller & Mathias Schwarz.