SessionIdManager, org.eclipse.jetty.util.component.LifeCycleHashSessionIdManager, JDBCSessionIdManagerpublic abstract class AbstractSessionIdManager extends org.eclipse.jetty.util.component.AbstractLifeCycle implements SessionIdManager
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Random |
_random |
|
protected long |
_reseed |
|
protected boolean |
_weakRandom |
|
protected java.lang.String |
_workerAttr |
|
protected java.lang.String |
_workerName |
| Constructor | Description |
|---|---|
AbstractSessionIdManager() |
|
AbstractSessionIdManager(java.util.Random random) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doStart() |
|
protected void |
doStop() |
|
java.lang.String |
getClusterId(java.lang.String nodeId) |
Get the session ID without 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() |
|
long |
getReseed() |
|
java.lang.String |
getWorkerName() |
Get the workname.
|
void |
initRandom() |
Set up a random number generator for the sessionids.
|
java.lang.String |
newSessionId(long seedTerm) |
|
java.lang.String |
newSessionId(javax.servlet.http.HttpServletRequest request,
long created) |
Create a new session id if necessary.
|
abstract void |
renewSessionId(java.lang.String oldClusterId,
java.lang.String oldNodeId,
javax.servlet.http.HttpServletRequest request) |
Change the existing session id.
|
void |
setRandom(java.util.Random random) |
|
void |
setReseed(long reseed) |
Set the reseed probability.
|
void |
setWorkerName(java.lang.String workerName) |
Set the workername.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSession, idInUse, invalidateAll, removeSessionprotected java.util.Random _random
protected boolean _weakRandom
protected java.lang.String _workerName
protected java.lang.String _workerAttr
protected long _reseed
public AbstractSessionIdManager()
public AbstractSessionIdManager(java.util.Random random)
public java.lang.String getWorkerName()
getWorkerName in interface SessionIdManagerpublic void setWorkerName(java.lang.String workerName)
workerName - the name of the workerpublic java.util.Random getRandom()
public void setRandom(java.util.Random random)
public long getReseed()
public void setReseed(long reseed)
reseed - If non zero then when a random long modulo the reseed value == 1, the SecureRandom will be reseeded.public java.lang.String newSessionId(javax.servlet.http.HttpServletRequest request,
long created)
newSessionId in interface SessionIdManagerrequest - the request with the sesioncreated - the timestamp for when the session was createdSessionIdManager.newSessionId(javax.servlet.http.HttpServletRequest, long)public java.lang.String newSessionId(long seedTerm)
public abstract void renewSessionId(java.lang.String oldClusterId,
java.lang.String oldNodeId,
javax.servlet.http.HttpServletRequest request)
SessionIdManagerrenewSessionId in interface SessionIdManageroldClusterId - the old cluster idoldNodeId - the old node idrequest - the request containing the sessionprotected void doStart()
throws java.lang.Exception
doStart in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class org.eclipse.jetty.util.component.AbstractLifeCyclejava.lang.Exceptionpublic void initRandom()
public java.lang.String getNodeId(java.lang.String clusterId,
javax.servlet.http.HttpServletRequest request)
getNodeId in interface SessionIdManagerclusterId - the cluster idrequest - the requestpublic java.lang.String getClusterId(java.lang.String nodeId)
getClusterId in interface SessionIdManagernodeId - the node idCopyright © 1995–2018 Webtide. All rights reserved.