net.sf.ooweb.sessions
Class SessionManager
java.lang.Object
net.sf.ooweb.sessions.SessionManager
public class SessionManager
- extends java.lang.Object
SessionManager holds a static map of sessions, keyed by session id. Singleton
- Since:
- 0.7
- Author:
- Darren Davison
Field Summary |
static java.lang.String |
COOKIE_NAME
|
protected java.util.logging.Logger |
logger
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COOKIE_NAME
public static final java.lang.String COOKIE_NAME
- See Also:
- Constant Field Values
logger
protected final java.util.logging.Logger logger
getInstance
public static SessionManager getInstance()
- Returns:
- the singleton
createSession
public java.lang.String createSession()
- create a new Session and return the sessionId
- Returns:
- the sessionId of the new session that can be used
to get the session
getSession
public java.util.Map getSession(java.lang.String sessionId)
- Get the current Session
- Parameters:
sessionId
- the key
- Returns:
- the session for this request, based on the session cookie
in the request headers
invalidateSession
public void invalidateSession(java.lang.String id)
getStrategy
public SessionManager.Strategy getStrategy()
getTimeout
public long getTimeout()
setStrategy
public void setStrategy(SessionManager.Strategy strategy)
setTimeout
public void setTimeout(long timeout)
Copyright (C) 2005-2007 OOWeb Authors.