Interface HttpSessionManager

All Known Implementing Classes:
DefaultHttpSessionManager

public interface HttpSessionManager
The HttpSessionManager API.
Author:
Manfred Riem ([email protected])
  • Method Details

    • addListener

      <T extends EventListener> void addListener(T listener)
      Add a listener.
      Type Parameters:
      T - the type.
      Parameters:
      listener - the listener.
    • attributeAdded

      void attributeAdded(jakarta.servlet.http.HttpSession session, String name, Object value)
      Attribute added.
      Parameters:
      session - the HTTP session.
      name - the name.
      value - the value.
    • attributeRemoved

      void attributeRemoved(jakarta.servlet.http.HttpSession session, String name, Object value)
      Attribute removed.
      Parameters:
      session - the HTTP session.
      name - the name.
      value - the value.
    • attributeReplaced

      void attributeReplaced(jakarta.servlet.http.HttpSession session, String name, Object oldValue, Object newValue)
      Attribute replaced.
      Parameters:
      session - the HTTP session.
      name - the name.
      oldValue - the old value.
      newValue - the new value.
    • changeSessionId

      String changeSessionId(jakarta.servlet.http.HttpServletRequest request)
      Change the session id and return it.
      Parameters:
      request - the request.
      Returns:
      the session id.
    • createSession

      jakarta.servlet.http.HttpSession createSession(jakarta.servlet.http.HttpServletRequest request)
      Create a session.
      Parameters:
      request - the request.
      Returns:
      the session.
    • destroySession

      void destroySession(jakarta.servlet.http.HttpSession session)
      Destroys a session.
      Parameters:
      session - the HTTP session.
    • encodeRedirectURL

      String encodeRedirectURL(jakarta.servlet.http.HttpServletResponse response, String url)
      Encode the redirect URL.
      Parameters:
      response - the HTTP servlet response.
      url - the URL.
      Returns:
      the encode URL.
    • encodeURL

      String encodeURL(jakarta.servlet.http.HttpServletResponse response, String url)
      Encode the URL.
      Parameters:
      response - the HTTP servlet response.
      url - the URL.
      Returns:
      the encoded URL.
    • getDefaultSessionTrackingModes

      Set<jakarta.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()
      Returns the default session tracking modes.
      Returns:
      the default session tracking modes
    • getEffectiveSessionTrackingModes

      Set<jakarta.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()
      Returns the effective session tracking modes.
      Returns:
      the effective session tracking modes
    • getSession

      jakarta.servlet.http.HttpSession getSession(jakarta.servlet.http.HttpServletRequest request, String currentSessionId)
      Returns the session.
      Parameters:
      request - the request.
      currentSessionId - the current session id.
      Returns:
      the session
    • getSessionCookieConfig

      jakarta.servlet.SessionCookieConfig getSessionCookieConfig()
      Returns the session cookie config.
      Returns:
      the session cookie config
    • getSessionTimeout

      int getSessionTimeout()
      Get the session timeout (in minutes).
      Returns:
      the session timeout.
    • hasSession

      boolean hasSession(String sessionId)
      Is the session manager handling this session?
      Parameters:
      sessionId - the session id.
      Returns:
      true if there is a session with the given session id.
    • setSessionTimeout

      void setSessionTimeout(int timeout)
      Set the session timeout (in minutes).
      Parameters:
      timeout - the timeout.
    • setSessionTrackingModes

      void setSessionTrackingModes(Set<jakarta.servlet.SessionTrackingMode> sessionTrackingModes)
      Set the session tracking modes.
      Parameters:
      sessionTrackingModes - the session tracking modes.
    • setWebApplication

      void setWebApplication(WebApplication webApplication)
      Set the web application.
      Parameters:
      webApplication - the web application.