Package org.apache.axis.session
Class SimpleSession
java.lang.Object
org.apache.axis.session.SimpleSession
- All Implemented Interfaces:
Session
A trivial session implementation.
- Author:
- Glen Daniels (gdaniels@apache.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet a property from the sessiongetKeys()
Get an enumeration of the keys in this sessionlong
Get an Object suitable for synchronizing the session.int
Return the sessions' time-to-live.void
invalidate the sessionvoid
Remove a property from the sessionvoid
Set a property in the sessionvoid
setTimeout
(int timeout) Set the session's time-to-live.void
touch()
"Touch" the session (mark it recently used)
-
Constructor Details
-
SimpleSession
public SimpleSession()Default constructor - set lastTouched to now
-
-
Method Details
-
get
Get a property from the session -
set
Set a property in the session -
remove
Remove a property from the session -
getKeys
Get an enumeration of the keys in this session -
setTimeout
public void setTimeout(int timeout) Set the session's time-to-live. This is implementation-specific, but basically should be the # of seconds of inactivity which will cause the session to time out and invalidate. "inactivity" is implementation-specific.- Specified by:
setTimeout
in interfaceSession
-
getTimeout
public int getTimeout()Description copied from interface:Session
Return the sessions' time-to-live.- Specified by:
getTimeout
in interfaceSession
- Returns:
- the timeout value for this session.
-
touch
public void touch()"Touch" the session (mark it recently used) -
invalidate
public void invalidate()invalidate the session- Specified by:
invalidate
in interfaceSession
-
getLastAccessTime
public long getLastAccessTime() -
getLockObject
Get an Object suitable for synchronizing the session. This method exists because different session implementations might provide different ways of getting at shared data. For a simple hashtable- based session, this would just be the hashtable, but for sessions which use database connections, etc. it might be an object wrapping a table ID or somesuch.- Specified by:
getLockObject
in interfaceSession
-