Class ContextHandler.CoreContextRequest

All Implemented Interfaces:
Content.Source, Request, Attributes, Invocable
Enclosing class:
ContextHandler

public static class ContextHandler.CoreContextRequest extends ContextRequest
  • Constructor Details

  • Method Details

    • changeSessionId

      public String changeSessionId()
    • getHttpChannel

      public HttpChannel getHttpChannel()
    • getManagedSession

      public ManagedSession getManagedSession()
    • getManagedSession

      public ManagedSession getManagedSession(SessionManager manager)
      Retrieve an existing session, if one exists, for a given SessionManager. A session belongs to a single SessionManager, and a context can only have a single SessionManager. Thus, calling this method is equivalent to asking "Does a ManagedSession already exist for the given context?".
      Parameters:
      manager - the SessionManager that should be associated with a ManagedSession
      Returns:
      the ManagedSession that already exists in the given context and is managed by the given SessionManager.
    • setManagedSession

      public void setManagedSession(ManagedSession managedSession)
    • getSessionManager

      public SessionManager getSessionManager()
    • setRequestedSession

      public void setRequestedSession(AbstractSessionManager.RequestedSession requestedSession)
      Remember the session that was extracted from the id in the request
      Parameters:
      requestedSession - info about the session matching the id in the request
    • completeSessions

      public void completeSessions()
      Release each of the sessions as the request is now complete
    • commitSessions

      public void commitSessions()
      Ensure that each session is committed - ie written out to storage if necessary - because the response is about to be returned to the client.
    • getRequestedSession

      public AbstractSessionManager.RequestedSession getRequestedSession()
    • setSessionManager

      public void setSessionManager(SessionManager sessionManager)
    • getSession

      public Session getSession(boolean create)
      Description copied from interface: Request

      Get a Session associated with the request. Sessions may not be supported by a given configuration, in which case null will be returned.

      Specified by:
      getSession in interface Request
      Overrides:
      getSession in class Request.Wrapper
      Parameters:
      create - True if the session should be created for the request.
      Returns:
      The session associated with the request or null.