Interface SessionManager

All Superinterfaces:
org.eclipse.jetty.util.component.LifeCycle, SessionConfig
All Known Implementing Classes:
AbstractSessionManager, SessionHandler

public interface SessionManager extends org.eclipse.jetty.util.component.LifeCycle, SessionConfig
SessionManager Non-servlet spec specific contract implemented by all SessionHandlers.
  • Field Details

    • __SessionCookieProperty

      static final String __SessionCookieProperty
      Session cookie name. Defaults to JSESSIONID, but can be set with the org.eclipse.jetty.servlet.SessionCookie context init parameter.
      See Also:
    • __DefaultSessionCookie

      static final String __DefaultSessionCookie
      See Also:
    • __SessionIdPathParameterNameProperty

      static final String __SessionIdPathParameterNameProperty
      Session id path parameter name. Defaults to jsessionid, but can be set with the org.eclipse.jetty.servlet.SessionIdPathParameterName context 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

      static final String __DefaultSessionIdPathParameterName
      See Also:
    • __CheckRemoteSessionEncoding

      static final String __CheckRemoteSessionEncoding
      See Also:
    • __SessionDomainProperty

      static final String __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

      static final String __DefaultSessionDomain
    • __SessionPathProperty

      static final String __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

      static final String __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

      ManagedSession getManagedSession(String id) throws Exception
      Throws:
      Exception
    • newSession

      void newSession(org.eclipse.jetty.server.Request request, String requestedSessionId, Consumer<ManagedSession> consumer)
    • getManagedSession

      ManagedSession getManagedSession(org.eclipse.jetty.server.Request request)
    • newSessionAPIWrapper

      org.eclipse.jetty.server.Session.API newSessionAPIWrapper(ManagedSession session)
    • sessionTimerExpired

      void sessionTimerExpired(ManagedSession session, long now)
    • commit

      void commit(ManagedSession session)
    • complete

      void complete(ManagedSession session)
    • invalidate

      void invalidate(String id) throws Exception
      Throws:
      Exception
    • scavenge

      void scavenge() throws Exception
      Throws:
      Exception
    • isIdInUse

      boolean isIdInUse(String id) throws Exception
      Throws:
      Exception
    • getSessionCookie

      org.eclipse.jetty.http.HttpCookie getSessionCookie(ManagedSession session, boolean requestIsSecure)
    • renewSessionId

      void renewSessionId(String oldId, String oldExtendedId, String newId, String newExtendedId) throws Exception
      Throws:
      Exception
    • calculateInactivityTimeout

      long calculateInactivityTimeout(String id, long timeRemaining, long maxInactiveMs)
    • newSessionInactivityTimer

      SessionInactivityTimer newSessionInactivityTimer(ManagedSession session)
    • getContext

      org.eclipse.jetty.server.Context getContext()
    • getSessionIdManager

      SessionIdManager getSessionIdManager()
    • setSessionIdManager

      void setSessionIdManager(SessionIdManager idManager)
    • getSessionCache

      SessionCache getSessionCache()
    • setSessionCache

      void setSessionCache(SessionCache cache)
    • recordSessionTime

      void recordSessionTime(ManagedSession session)
    • getSessionsCreated

      int getSessionsCreated()
    • encodeURI

      String encodeURI(org.eclipse.jetty.server.Request request, String uri, boolean cookiesInUse)
    • onSessionIdChanged

      default void onSessionIdChanged(org.eclipse.jetty.server.Session session, String oldId)
    • onSessionCreated

      default void onSessionCreated(org.eclipse.jetty.server.Session session)
    • onSessionDestroyed

      default void onSessionDestroyed(org.eclipse.jetty.server.Session session)
    • onSessionAttributeUpdate

      default void onSessionAttributeUpdate(org.eclipse.jetty.server.Session session, String name, Object oldValue, Object newValue)
    • 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()