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 继承的嵌套类/接口
AbstractLifeCycle.AbstractLifeCycleListener
 
从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口
LifeCycle.Listener
 
字段摘要
protected  Random _random
           
protected  long _reseed
           
protected  boolean _weakRandom
           
protected  String _workerName
           
 
从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
 
构造方法摘要
AbstractSessionIdManager()
           
AbstractSessionIdManager(Random random)
           
 
方法摘要
protected  void doStart()
           
protected  void doStop()
           
 Random getRandom()
           
 long getReseed()
           
 String getWorkerName()
          Get the workname.
 void initRandom()
          Set up a random number generator for the sessionids.
 String newSessionId(HttpServletRequest request, long created)
          Create a new session id if necessary.
 void setRandom(Random random)
           
 void setReseed(long reseed)
          Set the reseed probability.
 void setWorkerName(String workerName)
          Set the workname.
 
从类 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
 
从接口 org.eclipse.jetty.server.SessionIdManager 继承的方法
addSession, getClusterId, getNodeId, idInUse, invalidateAll, removeSession
 
从接口 org.eclipse.jetty.util.component.LifeCycle 继承的方法
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 

字段详细信息

_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.