org.mortbay.jetty.servlet
Class HashSessionIdManager
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.servlet.HashSessionIdManager
- All Implemented Interfaces:
- LifeCycle, SessionIdManager
- public class HashSessionIdManager
- extends AbstractLifeCycle
- implements SessionIdManager
HashSessionIdManager.
An in-memory implementation of the session ID manager.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_random
protected Random _random
HashSessionIdManager
public HashSessionIdManager()
HashSessionIdManager
public HashSessionIdManager(Random random)
getWorkerName
public String getWorkerName()
- Get the workname.
If set, the workername is dot appended to the session ID
and can be used to assist session affinity in a load balancer.
- Returns:
- String or null
setWorkerName
public void setWorkerName(String workerName)
- Set the workname.
If set, the workername is dot appended to the session ID
and can be used to assist session affinity in a load balancer.
- Parameters:
workerName
-
doStart
protected void doStart()
- Overrides:
doStart
in class AbstractLifeCycle
doStop
protected void doStop()
- Overrides:
doStop
in class AbstractLifeCycle
idInUse
public boolean idInUse(String id)
- Specified by:
idInUse
in interface SessionIdManager
addSession
public void addSession(HttpSession session)
- Specified by:
addSession
in interface SessionIdManager
invalidateAll
public void invalidateAll(String id)
- Specified by:
invalidateAll
in interface SessionIdManager
newSessionId
public String newSessionId(HttpServletRequest request,
long created)
- Specified by:
newSessionId
in interface SessionIdManager