org.eclipse.jetty.server.session
类 AbstractSessionIdManager
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.server.session.AbstractSessionIdManager
- 所有已实现的接口:
- SessionIdManager, LifeCycle
- 直接已知子类:
- HashSessionIdManager, JDBCSessionIdManager
public abstract class AbstractSessionIdManager
- extends AbstractLifeCycle
- implements SessionIdManager
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_random
protected Random _random
_weakRandom
protected boolean _weakRandom
_workerName
protected String _workerName
_reseed
protected long _reseed
AbstractSessionIdManager
public AbstractSessionIdManager()
AbstractSessionIdManager
public AbstractSessionIdManager(Random random)
getReseed
public long getReseed()
- 返回:
- the reseed probability
setReseed
public void setReseed(long reseed)
- Set the reseed probability.
- 参数:
reseed - If non zero then when a random long modulo the reseed value == 1, the SecureRandom will be reseeded.
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.
- 指定者:
- 接口
SessionIdManager 中的 getWorkerName
- 返回:
- 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.
- 参数:
workerName -
getRandom
public Random getRandom()
setRandom
public void setRandom(Random random)
newSessionId
public String newSessionId(HttpServletRequest request,
long created)
- Create a new session id if necessary.
- 指定者:
- 接口
SessionIdManager 中的 newSessionId
- 返回:
- the new session id
- 另请参见:
SessionIdManager.newSessionId(javax.servlet.http.HttpServletRequest, long)
doStart
protected void doStart()
throws Exception
- 覆盖:
- 类
AbstractLifeCycle 中的 doStart
- 抛出:
Exception
doStop
protected void doStop()
throws Exception
- 覆盖:
- 类
AbstractLifeCycle 中的 doStop
- 抛出:
Exception
initRandom
public void initRandom()
- Set up a random number generator for the sessionids.
By preference, use a SecureRandom but allow to be injected.
Copyright © 2013. All Rights Reserved.