- All Superinterfaces:
org.eclipse.jetty.util.component.LifeCycle,SessionConfig
- All Known Implementing Classes:
AbstractSessionManager,SessionHandler
SessionManager
Non-servlet spec specific contract implemented by all SessionHandlers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.session.SessionConfig
SessionConfig.Mutable -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringSession Max Age.static final StringSession cookie name.static final StringSession Domain.static final StringSession id path parameter name.static final StringSession Path. -
Method Summary
Modifier and TypeMethodDescriptionlongcalculateInactivityTimeout(String id, long timeRemaining, long maxInactiveMs) voidcommit(ManagedSession session) voidcomplete(ManagedSession session) org.eclipse.jetty.server.ContextgetManagedSession(org.eclipse.jetty.server.Request request) org.eclipse.jetty.http.HttpCookiegetSessionCookie(ManagedSession session, boolean requestIsSecure) intdoubledoublelongvoidinvalidate(String id) booleanvoidnewSession(org.eclipse.jetty.server.Request request, String requestedSessionId, Consumer<ManagedSession> consumer) org.eclipse.jetty.server.Session.APInewSessionAPIWrapper(ManagedSession session) newSessionInactivityTimer(ManagedSession session) default voidonSessionActivation(org.eclipse.jetty.server.Session session) default voidonSessionAttributeUpdate(org.eclipse.jetty.server.Session session, String name, Object oldValue, Object newValue) default voidonSessionCreated(org.eclipse.jetty.server.Session session) default voidonSessionDestroyed(org.eclipse.jetty.server.Session session) default voidonSessionIdChanged(org.eclipse.jetty.server.Session session, String oldId) default voidonSessionPassivation(org.eclipse.jetty.server.Session session) voidrecordSessionTime(ManagedSession session) voidrenewSessionId(String oldId, String oldExtendedId, String newId, String newExtendedId) voidscavenge()voidsessionTimerExpired(ManagedSession session, long now) voidsetSessionCache(SessionCache cache) voidsetSessionIdManager(SessionIdManager idManager) Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addEventListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeEventListener, start, stopMethods inherited from interface org.eclipse.jetty.session.SessionConfig
getMaxCookieAge, getMaxInactiveInterval, getRefreshCookieAge, getSameSite, getSessionComment, getSessionCookie, getSessionDomain, getSessionIdPathParameterName, getSessionIdPathParameterNamePrefix, getSessionPath, isCheckingRemoteSessionIdEncoding, isHttpOnly, isSecureCookies, isSecureRequestOnly, isUsingCookies, isUsingURLs
-
Field Details
-
__SessionCookieProperty
Session cookie name. Defaults toJSESSIONID, but can be set with theorg.eclipse.jetty.servlet.SessionCookiecontext init parameter.- See Also:
-
__DefaultSessionCookie
- See Also:
-
__SessionIdPathParameterNameProperty
Session id path parameter name. Defaults tojsessionid, but can be set with theorg.eclipse.jetty.servlet.SessionIdPathParameterNamecontext init parameter. If context init param is "none", or setSessionIdPathParameterName is called with null or "none", no URL rewriting will be done.- See Also:
-
__DefaultSessionIdPathParameterName
- See Also:
-
__CheckRemoteSessionEncoding
- See Also:
-
__SessionDomainProperty
Session Domain. If this property is set as a ServletContext InitParam, then it is used as the domain for session cookies. If it is not set, then no domain is specified for the session cookie.- See Also:
-
__DefaultSessionDomain
-
__SessionPathProperty
Session Path. If this property is set as a ServletContext InitParam, then it is used as the path for the session cookie. If it is not set, then the context path is used as the path for the cookie.- See Also:
-
__MaxAgeProperty
Session Max Age. If this property is set as a ServletContext InitParam, then it is used as the max age for the session cookie. If it is not set, then a max age of -1 is used.- See Also:
-
-
Method Details
-
getManagedSession
- Throws:
Exception
-
newSession
void newSession(org.eclipse.jetty.server.Request request, String requestedSessionId, Consumer<ManagedSession> consumer) -
getManagedSession
-
newSessionAPIWrapper
-
sessionTimerExpired
-
commit
-
complete
-
invalidate
- Throws:
Exception
-
scavenge
- Throws:
Exception
-
isIdInUse
- Throws:
Exception
-
getSessionCookie
-
renewSessionId
void renewSessionId(String oldId, String oldExtendedId, String newId, String newExtendedId) throws Exception - Throws:
Exception
-
calculateInactivityTimeout
-
newSessionInactivityTimer
-
getContext
org.eclipse.jetty.server.Context getContext() -
getSessionIdManager
SessionIdManager getSessionIdManager() -
setSessionIdManager
-
getSessionCache
SessionCache getSessionCache() -
setSessionCache
-
recordSessionTime
-
getSessionsCreated
int getSessionsCreated() -
encodeURI
-
onSessionIdChanged
-
onSessionCreated
default void onSessionCreated(org.eclipse.jetty.server.Session session) -
onSessionDestroyed
default void onSessionDestroyed(org.eclipse.jetty.server.Session session) -
onSessionAttributeUpdate
-
onSessionActivation
default void onSessionActivation(org.eclipse.jetty.server.Session session) -
onSessionPassivation
default void onSessionPassivation(org.eclipse.jetty.server.Session session) -
getSessionTimeStdDev
double getSessionTimeStdDev() -
getSessionTimeMean
double getSessionTimeMean() -
getSessionTimeTotal
long getSessionTimeTotal()
-