public final class SessionManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SessionManager.PersistentSessions |
Constructor and Description |
---|
SessionManager(ServletContext context)
Constructs a new session manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(SessionManagerListener listener)
Adds a session manager listener.
|
void |
destroy()
Stops this session manager.
|
void |
endSession(Session s)
Ends the given session and informs listeners.
|
Session |
get(String id)
Finds the session of the given ID.
|
void |
refreshAfter(Session s)
Call after changing a session timeout.
|
void |
refreshBefore(Session s)
Call before changing a session timeout.
|
void |
remove(Session s)
Removes the given session from the session manager.
|
void |
store(Session s)
Stores the given session in the session manager.
|
public SessionManager(ServletContext context)
public void addListener(SessionManagerListener listener)
public void destroy()
Session.destroy()
on all sessions and SessionManagerListener.sessionTimeout(Session)
on all their listeners.public void endSession(Session s)
public Session get(String id) throws SessionDefunctException
SessionDefunctException
- if the session does not existpublic void refreshAfter(Session s)
public void refreshBefore(Session s)
public void remove(Session s)
public void store(Session s) throws ServerBusyException
ServerBusyException
- if jwig.max_sessions
reachedCopyright © 2008-2012 Anders Møller & Mathias Schwarz.