org.eclipse.jetty.server.session
Class HashSessionIdManager
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.session.AbstractSessionIdManager
org.eclipse.jetty.server.session.HashSessionIdManager
- All Implemented Interfaces:
- SessionIdManager, LifeCycle
public class HashSessionIdManager
- extends AbstractSessionIdManager
HashSessionIdManager. An in-memory implementation of the session ID manager.
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, 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 |
HashSessionIdManager
public HashSessionIdManager()
HashSessionIdManager
public HashSessionIdManager(Random random)
getNodeId
public String getNodeId(String clusterId,
HttpServletRequest request)
- Get the session ID with any worker ID.
- Parameters:
clusterId
- request
-
- Returns:
- sessionId plus any worker ID.
getClusterId
public String getClusterId(String nodeId)
- Get the session ID without any worker ID.
- Parameters:
nodeId
- the node id
- Returns:
- sessionId without any worker ID.
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class AbstractSessionIdManager
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class AbstractSessionIdManager
- Throws:
Exception
idInUse
public boolean idInUse(String id)
- Parameters:
id
- The session ID without any cluster node extension
- Returns:
- True if the session ID is in use by at least one context.
- See Also:
SessionIdManager.idInUse(String)
addSession
public void addSession(HttpSession session)
- Description copied from interface:
SessionIdManager
- Add a session to the list of known sessions for a given ID.
- Parameters:
session
- The session- See Also:
SessionIdManager.addSession(HttpSession)
removeSession
public void removeSession(HttpSession session)
- Description copied from interface:
SessionIdManager
- Remove session from the list of known sessions for a given ID.
- See Also:
SessionIdManager.removeSession(HttpSession)
invalidateAll
public void invalidateAll(String id)
- Description copied from interface:
SessionIdManager
- Call
HttpSession.invalidate()
on all known sessions for the given id.
- Parameters:
id
- The session ID without any cluster node extension- See Also:
SessionIdManager.invalidateAll(String)
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.