|
||||||||||
| 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 SessionIdManagerpublic void setWorkerName(java.lang.String workerName)
workerName -
public java.lang.String getNodeId(java.lang.String clusterId,
javax.servlet.http.HttpServletRequest request)
getNodeId in interface SessionIdManagerrequest - clusterId - The ID of the session
public java.lang.String getClusterId(java.lang.String nodeId)
getClusterId in interface SessionIdManagerrequest -
protected void doStart()
doStart in class AbstractLifeCycleprotected void doStop()
doStop in class AbstractLifeCyclepublic boolean idInUse(java.lang.String id)
idInUse in interface SessionIdManagerid - The session ID without any cluster node extension
public void addSession(javax.servlet.http.HttpSession session)
SessionIdManager
addSession in interface SessionIdManagersession - The sessionpublic void removeSession(javax.servlet.http.HttpSession session)
SessionIdManager
removeSession in interface SessionIdManagerpublic void invalidateAll(java.lang.String id)
SessionIdManagerHttpSession.invalidate() on all known sessions for the given id.
invalidateAll in interface SessionIdManagerid - The session ID without any cluster node extension
public java.lang.String newSessionId(javax.servlet.http.HttpServletRequest request,
long created)
newSessionId in interface SessionIdManagerpublic 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 | |||||||||