public abstract class AbstractSessionIdManager extends AbstractLifeCycle implements SessionIdManager
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
protected Random |
_random |
protected boolean |
_weakRandom |
protected String |
_workerName |
Constructor and Description |
---|
AbstractSessionIdManager() |
AbstractSessionIdManager(Random random) |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
Random |
getRandom() |
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.
|
String |
newSessionId(long seedTerm) |
abstract void |
renewSessionId(String oldClusterId,
String oldNodeId,
HttpServletRequest request)
Change the existing session id.
|
void |
setRandom(Random random) |
void |
setWorkerName(String workerName)
Set the workname.
|
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSession, getClusterId, getNodeId, idInUse, invalidateAll, removeSession
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
protected Random _random
protected boolean _weakRandom
protected String _workerName
public AbstractSessionIdManager()
public AbstractSessionIdManager(Random random)
public String getWorkerName()
getWorkerName
in interface SessionIdManager
public void setWorkerName(String workerName)
workerName
- public Random getRandom()
public void setRandom(Random random)
public String newSessionId(HttpServletRequest request, long created)
newSessionId
in interface SessionIdManager
SessionIdManager.newSessionId(javax.servlet.http.HttpServletRequest, long)
public String newSessionId(long seedTerm)
public abstract void renewSessionId(String oldClusterId, String oldNodeId, HttpServletRequest request)
SessionIdManager
renewSessionId
in interface SessionIdManager
protected void doStart() throws Exception
doStart
in class AbstractLifeCycle
Exception
protected void doStop() throws Exception
doStop
in class AbstractLifeCycle
Exception
public void initRandom()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.