|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mortbay.jetty.servlet.AbstractSessionManager
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.
Nested Class Summary | |
class |
AbstractSessionManager.Session
|
Field Summary | |
static int |
__distantFuture
|
Fields inherited from interface org.mortbay.jetty.servlet.SessionManager |
__MaxAge, __SessionCookie, __SessionDomain, __SessionPath, __SessionURL, __SessionUrlPrefix |
Constructor Summary | |
AbstractSessionManager()
|
|
AbstractSessionManager(java.util.Random random)
|
Method Summary | |
void |
addEventListener(java.util.EventListener listener)
Add an event listener. |
boolean |
getCrossContextSessionIDs()
|
boolean |
getHttpOnly()
|
HttpSession |
getHttpSession(java.lang.String id)
|
int |
getMaxInactiveInterval()
|
int |
getMaxSessions()
|
int |
getMinSessions()
|
int |
getScavengePeriod()
|
boolean |
getSecureCookies()
|
Cookie |
getSessionCookie(HttpSession session,
boolean requestIsSecure)
Get a Cookie for a session. |
java.util.Map |
getSessionMap()
|
int |
getSessions()
|
boolean |
getUseRequestedId()
Deprecated. use getCrossContextSessionIDs session IDs |
java.lang.String |
getWorkerName()
Get the workname. |
void |
initialize(ServletHandler handler)
|
boolean |
isInvalidateGlobal()
|
boolean |
isStarted()
|
HttpSession |
newHttpSession(HttpServletRequest request)
|
void |
removeEventListener(java.util.EventListener listener)
|
void |
resetStats()
|
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. |
void |
setHttpOnly(boolean httpOnly)
|
void |
setInvalidateGlobal(boolean global)
|
void |
setMaxInactiveInterval(int seconds)
|
void |
setScavengePeriod(int seconds)
|
void |
setSecureCookies(boolean secureCookies)
|
void |
setUseRequestedId(boolean useRequestedId)
Deprecated. use setCrossContextSessionIDs session IDs |
void |
setWorkerName(java.lang.String workerName)
Set the workname. |
void |
start()
Start the LifeCycle. |
void |
stop()
Stop the LifeCycle. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int __distantFuture
Constructor Detail |
public AbstractSessionManager()
public AbstractSessionManager(java.util.Random random)
Method Detail |
public boolean getUseRequestedId()
public void setUseRequestedId(boolean useRequestedId)
useRequestedId
- True if requested session ID are first considered for newpublic boolean getCrossContextSessionIDs()
public void setCrossContextSessionIDs(boolean useRequestedId)
useRequestedId
- True if cross context session ID are first considered for new
session IDspublic void initialize(ServletHandler handler)
initialize
in interface SessionManager
public java.util.Map getSessionMap()
public int getSessions()
public int getMinSessions()
public int getMaxSessions()
public void resetStats()
public HttpSession getHttpSession(java.lang.String id)
getHttpSession
in interface SessionManager
public HttpSession newHttpSession(HttpServletRequest request)
newHttpSession
in interface SessionManager
public Cookie getSessionCookie(HttpSession session, boolean requestIsSecure)
SessionManager
getSessionCookie
in interface SessionManager
session
-
public java.lang.String getWorkerName()
public void setWorkerName(java.lang.String workerName)
workerName
- public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface SessionManager
public void setMaxInactiveInterval(int seconds)
setMaxInactiveInterval
in interface SessionManager
seconds
- public int getScavengePeriod()
public void setScavengePeriod(int seconds)
seconds
- public boolean getHttpOnly()
getHttpOnly
in interface SessionManager
public void setHttpOnly(boolean httpOnly)
httpOnly
- The httpOnly to set.public boolean getSecureCookies()
getSecureCookies
in interface SessionManager
public void setSecureCookies(boolean secureCookies)
secureCookies
- The secureCookies to set.public boolean isInvalidateGlobal()
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.public void addEventListener(java.util.EventListener listener) throws java.lang.IllegalArgumentException
SessionManager
addEventListener
in interface SessionManager
listener
- An Event Listener. Individual SessionManagers
implemetations may accept arbitrary listener types, but they
are expected to at least handle
HttpSessionActivationListener,
HttpSessionAttributeListener,
HttpSessionBindingListener,
HttpSessionListener
java.lang.IllegalArgumentException
- If an unsupported listener
is passed.public void removeEventListener(java.util.EventListener listener)
removeEventListener
in interface SessionManager
public boolean isStarted()
isStarted
in interface LifeCycle
public void start() throws java.lang.Exception
LifeCycle
start
in interface LifeCycle
java.lang.Exception
- An arbitrary exception may be thrown.public void stop()
LifeCycle
stop
in interface LifeCycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |