An Abstract implementation of SessionManager.
The partial implementation of SessionManager interface provides
the majority of the handling required to implement a
SessionManager. Concrete implementations of SessionManager based
on AbstractSessionManager need only implement the newSession method
to return a specialized version of the Session inner class that
provides an attribute Map.
If the property
org.mortbay.jetty.servlet.AbstractSessionManager.23Notifications is set to
true, the 2.3 servlet spec notification style will be used.
__allSessions
protected static MultiMap __allSessions
__distantFuture
public static final int __distantFuture
_crossContextSessionIDs
protected boolean _crossContextSessionIDs
_httpOnly
protected boolean _httpOnly
_invalidateGlobal
protected boolean _invalidateGlobal
_maxSessions
protected int _maxSessions
_minSessions
protected int _minSessions
_random
protected Random _random
_secureCookies
protected boolean _secureCookies
_sessionAttributeListeners
protected ArrayList _sessionAttributeListeners
_sessionListeners
protected ArrayList _sessionListeners
_sessions
protected Map _sessions
_weakRandom
protected boolean _weakRandom
getCrossContextSessionIDs
public boolean getCrossContextSessionIDs()
- True if cross context session IDs are first considered for new
session IDs
getMaxSessions
public int getMaxSessions()
getMinSessions
public int getMinSessions()
getRandom
public Random getRandom()
getScavengePeriod
public int getScavengePeriod()
getSessionMap
public Map getSessionMap()
getSessions
public int getSessions()
getUseRequestedId
public boolean getUseRequestedId()
use getCrossContextSessionIDs
session IDs
- True if requested session ID are first considered for new
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.
isInvalidateGlobal
public boolean isInvalidateGlobal()
resetStats
public void resetStats()
setCrossContextSessionIDs
public void setCrossContextSessionIDs(boolean useRequestedId)
Set Cross Context sessions IDs
This option activates a mode where a requested session ID can be used to create a
new session. This facilitates the sharing of session cookies when cross context
dispatches use sessions.
useRequestedId
- True if cross context session ID are first considered for new
session IDs
setHttpOnly
public void setHttpOnly(boolean httpOnly)
httpOnly
- The httpOnly to set.
setInvalidateGlobal
public void setInvalidateGlobal(boolean global)
global
- True if session invalidation should be global.
ie Sessions in other contexts with the same ID (linked by cross context dispatch
or shared session cookie) are invalidated as a group.
setRandom
public void setRandom(Random random)
setScavengePeriod
public void setScavengePeriod(int seconds)
setSecureCookies
public void setSecureCookies(boolean secureCookies)
secureCookies
- The secureCookies to set.
setUseRequestedId
public void setUseRequestedId(boolean useRequestedId)
use setCrossContextSessionIDs
session IDs
Set Use Requested ID.
useRequestedId
- True if requested session ID are first considered for new
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.