org.mortbay.jetty
public interface SessionManager extends org.mortbay.component.LifeCycle
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
__DefaultSessionCookie |
static java.lang.String |
__DefaultSessionDomain |
static java.lang.String |
__DefaultSessionURL |
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 |
__SessionPathProperty
Session Path.
|
static java.lang.String |
__SessionURLProperty
Session URL parameter name.
|
Modifier and Type | Method and Description |
---|---|
Cookie |
access(HttpSession session,
boolean secure)
Called by the
SessionHandler when a session is access by a request |
void |
addEventListener(java.util.EventListener listener)
Add an event listener.
|
void |
clearEventListeners() |
void |
complete(HttpSession session)
Called by the
SessionHandler when a reqeuest is not longer
handling a session. |
java.lang.String |
getClusterId(HttpSession session)
Get the session cluster id
|
boolean |
getHttpOnly() |
HttpSession |
getHttpSession(java.lang.String id) |
SessionIdManager |
getIdManager() |
int |
getMaxCookieAge() |
int |
getMaxInactiveInterval() |
SessionIdManager |
getMetaManager()
Deprecated.
use
getIdManager() |
java.lang.String |
getNodeId(HttpSession session)
Get the session node id
|
boolean |
getSecureCookies() |
java.lang.String |
getSessionCookie() |
Cookie |
getSessionCookie(HttpSession session,
java.lang.String contextPath,
boolean requestIsSecure)
Get a Cookie for a session.
|
java.lang.String |
getSessionDomain() |
java.lang.String |
getSessionPath() |
java.lang.String |
getSessionURL() |
java.lang.String |
getSessionURLPrefix() |
boolean |
isUsingCookies() |
boolean |
isValid(HttpSession session) |
HttpSession |
newHttpSession(HttpServletRequest request) |
void |
removeEventListener(java.util.EventListener listener) |
void |
setIdManager(SessionIdManager meta) |
void |
setMaxCookieAge(int maxCookieAgeInSeconds) |
void |
setMaxInactiveInterval(int seconds) |
void |
setSessionCookie(java.lang.String cookieName) |
void |
setSessionDomain(java.lang.String domain) |
void |
setSessionHandler(SessionHandler handler) |
void |
setSessionPath(java.lang.String path) |
void |
setSessionURL(java.lang.String url) |
static final java.lang.String __SessionCookieProperty
static final java.lang.String __DefaultSessionCookie
static final java.lang.String __SessionURLProperty
static final java.lang.String __DefaultSessionURL
static final java.lang.String __SessionDomainProperty
static final java.lang.String __DefaultSessionDomain
static final java.lang.String __SessionPathProperty
static final java.lang.String __MaxAgeProperty
HttpSession getHttpSession(java.lang.String id)
HttpSession newHttpSession(HttpServletRequest request)
boolean getSecureCookies()
boolean getHttpOnly()
int getMaxInactiveInterval()
void setMaxInactiveInterval(int seconds)
void setSessionHandler(SessionHandler handler)
void addEventListener(java.util.EventListener listener)
listener
- An Event Listener. Individual SessionManagers
implemetations may accept arbitrary listener types, but they
are expected to at least handle
HttpSessionActivationListener,
HttpSessionAttributeListener,
HttpSessionBindingListener,
HttpSessionListenervoid removeEventListener(java.util.EventListener listener)
void clearEventListeners()
Cookie getSessionCookie(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()
SessionIdManager getMetaManager()
getIdManager()
void setIdManager(SessionIdManager meta)
meta
- the cross context session meta manager.boolean isValid(HttpSession session)
java.lang.String getNodeId(HttpSession session)
session
- java.lang.String getClusterId(HttpSession session)
session
- Cookie access(HttpSession session, boolean secure)
SessionHandler
when a session is access by a requestvoid complete(HttpSession session)
SessionHandler
when a reqeuest is not longer
handling a session. Not this includes new sessions, so there may not
be a matching call to #access(HttpSession)
.void setSessionCookie(java.lang.String cookieName)
java.lang.String getSessionCookie()
void setSessionURL(java.lang.String url)
java.lang.String getSessionURL()
java.lang.String getSessionURLPrefix()
void setSessionDomain(java.lang.String domain)
java.lang.String getSessionDomain()
void setSessionPath(java.lang.String path)
java.lang.String getSessionPath()
void setMaxCookieAge(int maxCookieAgeInSeconds)
int getMaxCookieAge()
boolean isUsingCookies()
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.