org.apache.axis.transport.http

Class AxisHttpSession

public class AxisHttpSession extends Object implements Session

An HTTP/Servlet implementation of Axis sessions.

Author: Glen Daniels (gdaniels@apache.org)

Field Summary
static StringAXIS_SESSION_MARKER
Constructor Summary
AxisHttpSession(HttpServletRequest realRequest)
AxisHttpSession(HttpSession realSession)
Method Summary
protected voidensureSession()
Objectget(String key)
Get a property from the session
EnumerationgetKeys()
Get an enumeration of the keys in this session
ObjectgetLockObject()
Get an Object suitable for synchronizing the session.
HttpSessiongetRep()
Get the internal HttpSession.
intgetTimeout()
Return the sessions' time-to-live.
voidinvalidate()
invalidate the session
voidremove(String key)
Remove a property from the session
voidset(String key, Object value)
Set a property in the session
voidsetTimeout(int timeout)
Set the session's time-to-live.
voidtouch()
"Touch" the session (mark it recently used)

Field Detail

AXIS_SESSION_MARKER

public static final String AXIS_SESSION_MARKER

Constructor Detail

AxisHttpSession

public AxisHttpSession(HttpServletRequest realRequest)

AxisHttpSession

public AxisHttpSession(HttpSession realSession)

Method Detail

ensureSession

protected void ensureSession()

get

public Object get(String key)
Get a property from the session

Parameters: key the name of the property desired.

getKeys

public Enumeration getKeys()
Get an enumeration of the keys in this session

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.

getRep

public HttpSession getRep()
Get the internal HttpSession.

getTimeout

public int getTimeout()
Return the sessions' time-to-live.

Returns: the timeout value for this session.

invalidate

public void invalidate()
invalidate the session

remove

public void remove(String key)
Remove a property from the session

Parameters: key the name of the property desired.

set

public void set(String key, Object value)
Set a property in the session

Parameters: 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.

touch

public void touch()
"Touch" the session (mark it recently used)
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.