|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.servlet.HashSessionIdManager
public class HashSessionIdManager
HashSessionIdManager. An in-memory implementation of the session ID manager.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary | |
---|---|
protected java.util.Random |
_random
|
Fields inherited from class org.mortbay.component.AbstractLifeCycle |
---|
_listeners |
Constructor Summary | |
---|---|
HashSessionIdManager()
|
|
HashSessionIdManager(java.util.Random random)
|
Method Summary | |
---|---|
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()
|
java.lang.String |
getClusterId(java.lang.String nodeId)
Get the session ID with any worker ID. |
java.lang.String |
getNodeId(java.lang.String clusterId,
javax.servlet.http.HttpServletRequest request)
Get the session ID with any worker ID. |
java.util.Random |
getRandom()
|
java.lang.String |
getWorkerName()
Get the workname. |
boolean |
idInUse(java.lang.String id)
|
void |
invalidateAll(java.lang.String id)
Call HttpSession.invalidate() on all known sessions for the given id. |
java.lang.String |
newSessionId(javax.servlet.http.HttpServletRequest request,
long created)
|
void |
removeSession(javax.servlet.http.HttpSession session)
Remove session from the list of known sessions for a given ID. |
void |
setRandom(java.util.Random random)
|
void |
setWorkerName(java.lang.String workerName)
Set the workname. |
Methods inherited from class org.mortbay.component.AbstractLifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mortbay.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Field Detail |
---|
protected java.util.Random _random
Constructor Detail |
---|
public HashSessionIdManager()
public HashSessionIdManager(java.util.Random random)
Method Detail |
---|
public java.lang.String getWorkerName()
getWorkerName
in interface SessionIdManager
public void setWorkerName(java.lang.String workerName)
workerName
- public java.lang.String getNodeId(java.lang.String clusterId, javax.servlet.http.HttpServletRequest request)
getNodeId
in interface SessionIdManager
request
- clusterId
- The ID of the session
public java.lang.String getClusterId(java.lang.String nodeId)
getClusterId
in interface SessionIdManager
request
-
protected void doStart()
doStart
in class AbstractLifeCycle
protected void doStop()
doStop
in class AbstractLifeCycle
public boolean idInUse(java.lang.String id)
idInUse
in interface SessionIdManager
id
- The session ID without any cluster node extension
public void addSession(javax.servlet.http.HttpSession session)
SessionIdManager
addSession
in interface SessionIdManager
session
- The sessionpublic void removeSession(javax.servlet.http.HttpSession session)
SessionIdManager
removeSession
in interface SessionIdManager
public void invalidateAll(java.lang.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 java.lang.String newSessionId(javax.servlet.http.HttpServletRequest request, long created)
newSessionId
in interface SessionIdManager
public java.util.Random getRandom()
public void setRandom(java.util.Random random)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |