public class HashSessionIdManager extends AbstractSessionIdManager
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_random, _reseed, _weakRandom, _workerName_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
HashSessionIdManager() |
HashSessionIdManager(Random random) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(javax.servlet.http.HttpSession session)
Add a session to the list of known sessions for a given ID.
|
protected void |
doStart() |
protected void |
doStop() |
String |
getClusterId(String nodeId)
Get the session ID without any worker ID.
|
String |
getNodeId(String clusterId,
javax.servlet.http.HttpServletRequest request)
Get the session ID with any worker ID.
|
Collection<javax.servlet.http.HttpSession> |
getSession(String id) |
Collection<String> |
getSessions() |
boolean |
idInUse(String id) |
void |
invalidateAll(String id)
Call
HttpSession.invalidate() on all known sessions for the given id. |
void |
removeSession(javax.servlet.http.HttpSession session)
Remove session from the list of known sessions for a given ID.
|
getRandom, getReseed, getWorkerName, initRandom, newSessionId, setRandom, setReseed, setWorkerNameaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic HashSessionIdManager()
public HashSessionIdManager(Random random)
public Collection<String> getSessions()
public Collection<javax.servlet.http.HttpSession> getSession(String id)
public String getNodeId(String clusterId, javax.servlet.http.HttpServletRequest request)
clusterId - request - public String getClusterId(String nodeId)
nodeId - the node idprotected void doStart()
throws Exception
doStart in class AbstractSessionIdManagerExceptionprotected void doStop()
throws Exception
doStop in class AbstractSessionIdManagerExceptionpublic boolean idInUse(String id)
id - The session ID without any cluster node extensionSessionIdManager.idInUse(String)public void addSession(javax.servlet.http.HttpSession session)
SessionIdManagersession - The sessionSessionIdManager.addSession(HttpSession)public void removeSession(javax.servlet.http.HttpSession session)
SessionIdManagerpublic void invalidateAll(String id)
SessionIdManagerHttpSession.invalidate() on all known sessions for the given id.id - The session ID without any cluster node extensionSessionIdManager.invalidateAll(String)Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.