public class AttributeSharingHashSessionIdManager
extends org.eclipse.jetty.server.session.HashSessionIdManager
SessionIdManager
that shares
session data between sessions in a cluster.Constructor and Description |
---|
AttributeSharingHashSessionIdManager() |
AttributeSharingHashSessionIdManager(Random random) |
Modifier and Type | Method and Description |
---|---|
void |
addSession(javax.servlet.http.HttpSession session) |
protected void |
doStart() |
protected void |
doStop() |
String |
getClusterId(String nodeId)
Get the session ID without any worker ID.
|
String |
getNodeId(String clusterId,
javax.servlet.http.HttpServletRequest request)
Get the session ID with any worker ID.
|
Collection<javax.servlet.http.HttpSession> |
getSession(String id) |
Collection<String> |
getSessions() |
boolean |
idInUse(String id) |
void |
invalidateAll(String id) |
void |
removeSession(javax.servlet.http.HttpSession session) |
void |
renewSessionId(String oldClusterId,
String oldNodeId,
javax.servlet.http.HttpServletRequest request) |
getRandom, getReseed, getWorkerName, initRandom, newSessionId, newSessionId, setRandom, setReseed, setWorkerName
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
public AttributeSharingHashSessionIdManager()
public AttributeSharingHashSessionIdManager(Random random)
public Collection<String> getSessions()
getSessions
in class org.eclipse.jetty.server.session.HashSessionIdManager
public Collection<javax.servlet.http.HttpSession> getSession(String id)
getSession
in class org.eclipse.jetty.server.session.HashSessionIdManager
protected void doStart() throws Exception
doStart
in class org.eclipse.jetty.server.session.HashSessionIdManager
Exception
protected void doStop() throws Exception
doStop
in class org.eclipse.jetty.server.session.HashSessionIdManager
Exception
public boolean idInUse(String id)
idInUse
in interface org.eclipse.jetty.server.SessionIdManager
idInUse
in class org.eclipse.jetty.server.session.HashSessionIdManager
SessionIdManager.idInUse(String)
public void addSession(javax.servlet.http.HttpSession session)
addSession
in interface org.eclipse.jetty.server.SessionIdManager
addSession
in class org.eclipse.jetty.server.session.HashSessionIdManager
SessionIdManager.addSession(HttpSession)
public void removeSession(javax.servlet.http.HttpSession session)
removeSession
in interface org.eclipse.jetty.server.SessionIdManager
removeSession
in class org.eclipse.jetty.server.session.HashSessionIdManager
SessionIdManager.removeSession(HttpSession)
public void invalidateAll(String id)
invalidateAll
in interface org.eclipse.jetty.server.SessionIdManager
invalidateAll
in class org.eclipse.jetty.server.session.HashSessionIdManager
SessionIdManager.invalidateAll(String)
public String getClusterId(String nodeId)
getClusterId
in interface org.eclipse.jetty.server.SessionIdManager
getClusterId
in class org.eclipse.jetty.server.session.AbstractSessionIdManager
nodeId
- the node idpublic String getNodeId(String clusterId, javax.servlet.http.HttpServletRequest request)
getNodeId
in interface org.eclipse.jetty.server.SessionIdManager
getNodeId
in class org.eclipse.jetty.server.session.AbstractSessionIdManager
clusterId
- request
- public void renewSessionId(String oldClusterId, String oldNodeId, javax.servlet.http.HttpServletRequest request)
renewSessionId
in interface org.eclipse.jetty.server.SessionIdManager
renewSessionId
in class org.eclipse.jetty.server.session.HashSessionIdManager
This work is licensed under a Creative Commons Attribution 4.0 International License.