|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionManager
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
LifeCycle.Listener |
Field Summary | |
---|---|
static java.lang.String |
__CheckRemoteSessionEncoding
|
static java.lang.String |
__DefaultSessionCookie
|
static java.lang.String |
__DefaultSessionDomain
|
static java.lang.String |
__DefaultSessionIdPathParameterName
|
static java.lang.String |
__MaxAgeProperty
Session Max Age. |
static java.lang.String |
__SessionCookieProperty
Session cookie name. |
static java.lang.String |
__SessionDomainProperty
Session Domain. |
static java.lang.String |
__SessionIdPathParameterNameProperty
Session id path parameter name. |
static java.lang.String |
__SessionPathProperty
Session Path. |
Method Summary | |
---|---|
HttpCookie |
access(javax.servlet.http.HttpSession session,
boolean secure)
Called by the SessionHandler when a session is first accessed by a request. |
void |
addEventListener(java.util.EventListener listener)
Adds an event listener for session-related events. |
void |
clearEventListeners()
Removes all event listeners for session-related events. |
void |
complete(javax.servlet.http.HttpSession session)
Called by the SessionHandler when a session is last accessed by a request. |
java.lang.String |
getClusterId(javax.servlet.http.HttpSession session)
|
java.util.Set<javax.servlet.SessionTrackingMode> |
getDefaultSessionTrackingModes()
|
java.util.Set<javax.servlet.SessionTrackingMode> |
getEffectiveSessionTrackingModes()
|
boolean |
getHttpOnly()
|
javax.servlet.http.HttpSession |
getHttpSession(java.lang.String id)
Returns the HttpSession with the given session id |
SessionIdManager |
getIdManager()
|
int |
getMaxInactiveInterval()
|
java.lang.String |
getNodeId(javax.servlet.http.HttpSession session)
|
HttpCookie |
getSessionCookie(javax.servlet.http.HttpSession session,
java.lang.String contextPath,
boolean requestIsSecure)
Gets a Cookie for a session. |
javax.servlet.SessionCookieConfig |
getSessionCookieConfig()
|
java.lang.String |
getSessionIdPathParameterName()
|
java.lang.String |
getSessionIdPathParameterNamePrefix()
|
boolean |
isCheckingRemoteSessionIdEncoding()
|
boolean |
isUsingCookies()
|
boolean |
isUsingURLs()
|
boolean |
isValid(javax.servlet.http.HttpSession session)
|
javax.servlet.http.HttpSession |
newHttpSession(javax.servlet.http.HttpServletRequest request)
Creates a new HttpSession . |
void |
removeEventListener(java.util.EventListener listener)
Removes an event listener for for session-related events. |
void |
setCheckingRemoteSessionIdEncoding(boolean remote)
|
void |
setIdManager(SessionIdManager idManager)
Sets the cross context session id manager |
void |
setMaxInactiveInterval(int seconds)
Sets the max period of inactivity, after which the session is invalidated, in seconds. |
void |
setSessionHandler(SessionHandler handler)
Sets the SessionHandler . |
void |
setSessionIdPathParameterName(java.lang.String parameterName)
Sets the session id URL path parameter name. |
void |
setSessionTrackingModes(java.util.Set<javax.servlet.SessionTrackingMode> sessionTrackingModes)
|
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle |
---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
Field Detail |
---|
static final java.lang.String __SessionCookieProperty
JSESSIONID
, but can be set with the
org.eclipse.jetty.servlet.SessionCookie
context init parameter.
static final java.lang.String __DefaultSessionCookie
static final java.lang.String __SessionIdPathParameterNameProperty
jsessionid
, but can be set with the
org.eclipse.jetty.servlet.SessionIdPathParameterName
context init parameter.
If set to null or "none" no URL rewriting will be done.
static final java.lang.String __DefaultSessionIdPathParameterName
static final java.lang.String __CheckRemoteSessionEncoding
static final java.lang.String __SessionDomainProperty
static final java.lang.String __DefaultSessionDomain
static final java.lang.String __SessionPathProperty
static final java.lang.String __MaxAgeProperty
Method Detail |
---|
javax.servlet.http.HttpSession getHttpSession(java.lang.String id)
HttpSession
with the given session id
id
- the session id
HttpSession
with the corresponding id or null if no session with the given id existsjavax.servlet.http.HttpSession newHttpSession(javax.servlet.http.HttpServletRequest request)
HttpSession
.
request
- the HttpServletRequest containing the requested session id
HttpSession
boolean getHttpOnly()
HttpCookie.isHttpOnly()
int getMaxInactiveInterval()
setMaxInactiveInterval(int)
void setMaxInactiveInterval(int seconds)
seconds
- the max inactivity period, in seconds.getMaxInactiveInterval()
void setSessionHandler(SessionHandler handler)
SessionHandler
.
handler
- the SessionHandler
objectvoid addEventListener(java.util.EventListener listener)
listener
- the session event listener to add
Individual SessionManagers implementations may accept arbitrary listener types,
but they are expected to at least handle HttpSessionActivationListener,
HttpSessionAttributeListener, HttpSessionBindingListener and HttpSessionListener.removeEventListener(EventListener)
void removeEventListener(java.util.EventListener listener)
listener
- the session event listener to removeaddEventListener(EventListener)
void clearEventListeners()
removeEventListener(EventListener)
HttpCookie getSessionCookie(javax.servlet.http.HttpSession session, java.lang.String contextPath, boolean requestIsSecure)
session
- the session to which the cookie should refer.contextPath
- the context to which the cookie should be linked.
The client will only send the cookie value when requesting resources under this path.requestIsSecure
- whether the client is accessing the server over a secure protocol (i.e. HTTPS).
SessionManager
uses cookies, then this method will return a new
cookie object
that should be set on the client in order to link future HTTP requests
with the session
. If cookies are not in use, this method returns null
.SessionIdManager getIdManager()
setIdManager(SessionIdManager)
void setIdManager(SessionIdManager idManager)
idManager
- the cross context session id manager.getIdManager()
boolean isValid(javax.servlet.http.HttpSession session)
session
- the session to test for validity
java.lang.String getNodeId(javax.servlet.http.HttpSession session)
session
- the session object
getClusterId(HttpSession)
java.lang.String getClusterId(javax.servlet.http.HttpSession session)
session
- the session object
getNodeId(HttpSession)
HttpCookie access(javax.servlet.http.HttpSession session, boolean secure)
SessionHandler
when a session is first accessed by a request.
session
- the session objectsecure
- whether the request is secure or not
complete(HttpSession)
void complete(javax.servlet.http.HttpSession session)
SessionHandler
when a session is last accessed by a request.
session
- the session objectaccess(HttpSession, boolean)
void setSessionIdPathParameterName(java.lang.String parameterName)
parameterName
- the URL path parameter name for session id URL rewriting (null or "none" for no rewriting).getSessionIdPathParameterName()
,
getSessionIdPathParameterNamePrefix()
java.lang.String getSessionIdPathParameterName()
setSessionIdPathParameterName(String)
java.lang.String getSessionIdPathParameterNamePrefix()
getSessionIdPathParameterName()
, by default
";" + sessionIdParameterName + "=", for easier lookup in URL strings.getSessionIdPathParameterName()
boolean isUsingCookies()
boolean isUsingURLs()
java.util.Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()
java.util.Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()
void setSessionTrackingModes(java.util.Set<javax.servlet.SessionTrackingMode> sessionTrackingModes)
javax.servlet.SessionCookieConfig getSessionCookieConfig()
boolean isCheckingRemoteSessionIdEncoding()
void setCheckingRemoteSessionIdEncoding(boolean remote)
remote
- True if absolute URLs are check for remoteness before being session encoded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |