public class HashSessionIdManager extends org.mortbay.component.AbstractLifeCycle implements SessionIdManager
| Constructor and Description |
|---|
HashSessionIdManager() |
HashSessionIdManager(Random random) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(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 with any worker ID.
|
String |
getNodeId(String clusterId,
HttpServletRequest request)
Get the session ID with any worker ID.
|
Random |
getRandom() |
String |
getWorkerName()
Get the workname.
|
boolean |
idInUse(String id) |
void |
invalidateAll(String id)
Call
HttpSession.invalidate() on all known sessions for the given id. |
String |
newSessionId(HttpServletRequest request,
long created) |
void |
removeSession(HttpSession session)
Remove session from the list of known sessions for a given ID.
|
void |
setRandom(Random random) |
void |
setWorkerName(String workerName)
Set the workname.
|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopprotected Random _random
public HashSessionIdManager()
public HashSessionIdManager(Random random)
public String getWorkerName()
getWorkerName in interface SessionIdManagerpublic void setWorkerName(String workerName)
workerName - public String getNodeId(String clusterId, HttpServletRequest request)
getNodeId in interface SessionIdManagerrequest - clusterId - The ID of the sessionpublic String getClusterId(String nodeId)
getClusterId in interface SessionIdManagerrequest - protected void doStart()
doStart in class org.mortbay.component.AbstractLifeCycleprotected void doStop()
doStop in class org.mortbay.component.AbstractLifeCyclepublic boolean idInUse(String id)
idInUse in interface SessionIdManagerid - The session ID without any cluster node extensionpublic void addSession(HttpSession session)
SessionIdManageraddSession in interface SessionIdManagersession - The sessionpublic void removeSession(HttpSession session)
SessionIdManagerremoveSession in interface SessionIdManagerpublic void invalidateAll(String id)
SessionIdManagerHttpSession.invalidate() on all known sessions for the given id.invalidateAll in interface SessionIdManagerid - The session ID without any cluster node extensionpublic String newSessionId(HttpServletRequest request, long created)
newSessionId in interface SessionIdManagerpublic Random getRandom()
public void setRandom(Random random)
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.