org.apache.axis.session
Class SimpleSession
java.lang.Object
org.apache.axis.session.SimpleSession
- Session
public class SimpleSession
extends java.lang.Object
A trivial session implementation.
- Glen Daniels (gdaniels@apache.org)
Object | get(String key) - Get a property from the session
|
Enumeration | getKeys() - Get an enumeration of the keys in this session
|
long | getLastAccessTime()
|
Object | getLockObject() - Get an Object suitable for synchronizing the session.
|
int | getTimeout() - Return the sessions' time-to-live.
|
void | invalidate() - invalidate the session
|
void | remove(String key) - Remove a property from the session
|
void | set(String key, Object value) - Set a property in the session
|
void | setTimeout(int timeout) - Set the session's time-to-live.
|
void | touch() - "Touch" the session (mark it recently used)
|
SimpleSession
public SimpleSession()
Default constructor - set lastTouched to now
get
public Object get(String key)
Get a property from the session
- get in interface Session
key
- the name of the property desired.
getKeys
public Enumeration getKeys()
Get an enumeration of the keys in this session
- getKeys in interface Session
getLastAccessTime
public long getLastAccessTime()
getLockObject
public Object 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.
- getLockObject in interface Session
getTimeout
public int getTimeout()
Return the sessions' time-to-live.
- getTimeout in interface Session
- the timeout value for this session.
invalidate
public void invalidate()
invalidate the session
- invalidate in interface Session
remove
public void remove(String key)
Remove a property from the session
- remove in interface Session
key
- the name of the property desired.
set
public void set(String key,
Object value)
Set a property in the session
- set in interface Session
key
- the name of the property to set.value
- the value of the property.
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.
- setTimeout in interface Session
touch
public void touch()
"Touch" the session (mark it recently used)
- touch in interface Session
Copyright © 2005 Apache Web Services Project. All Rights Reserved.