org.mortbay.jetty.servlet
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, stop
protected Random _random
public HashSessionIdManager()
public HashSessionIdManager(Random random)
public String getWorkerName()
getWorkerName
in interface SessionIdManager
public void setWorkerName(String workerName)
workerName
- public String getNodeId(String clusterId, HttpServletRequest request)
getNodeId
in interface SessionIdManager
request
- clusterId
- The ID of the sessionpublic String getClusterId(String nodeId)
getClusterId
in interface SessionIdManager
request
- protected void doStart()
doStart
in class org.mortbay.component.AbstractLifeCycle
protected void doStop()
doStop
in class org.mortbay.component.AbstractLifeCycle
public boolean idInUse(String id)
idInUse
in interface SessionIdManager
id
- The session ID without any cluster node extensionpublic void addSession(HttpSession session)
SessionIdManager
addSession
in interface SessionIdManager
session
- The sessionpublic void removeSession(HttpSession session)
SessionIdManager
removeSession
in interface SessionIdManager
public void invalidateAll(String id)
SessionIdManager
HttpSession.invalidate()
on all known sessions for the given id.invalidateAll
in interface SessionIdManager
id
- The session ID without any cluster node extensionpublic String newSessionId(HttpServletRequest request, long created)
newSessionId
in interface SessionIdManager
public Random getRandom()
public void setRandom(Random random)
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.