Interface WebSessionContext

All Superinterfaces:
Map<String,Object>, RequestPairSource, org.apache.shiro.session.mgt.SessionContext
All Known Implementing Classes:
DefaultWebSessionContext

public interface WebSessionContext extends org.apache.shiro.session.mgt.SessionContext, RequestPairSource
A WebSubjectContext is a SessionContext that additionally provides for type-safe methods to set and retrieve a ServletRequest and ServletResponse, as the request/response pair will often need to be referenced during construction of web-initiated Session instances.
Since:
1.0
  • Method Details

    • getServletRequest

      javax.servlet.ServletRequest getServletRequest()
      Returns the ServletRequest received by the servlet container triggering the creation of the Session instance.
      Specified by:
      getServletRequest in interface RequestPairSource
      Returns:
      the ServletRequest received by the servlet container triggering the creation of the Session instance.
    • setServletRequest

      void setServletRequest(javax.servlet.ServletRequest request)
      Sets the ServletRequest received by the servlet container triggering the creation of the Session instance.
      Parameters:
      request - the ServletRequest received by the servlet container triggering the creation of the Session instance.
    • getServletResponse

      javax.servlet.ServletResponse getServletResponse()
      The paired ServletResponse corresponding to the associated servletRequest.
      Specified by:
      getServletResponse in interface RequestPairSource
      Returns:
      the paired ServletResponse corresponding to the associated servletRequest.
    • setServletResponse

      void setServletResponse(javax.servlet.ServletResponse response)
      Sets the paired ServletResponse corresponding to the associated servletRequest.
      Parameters:
      response - The paired ServletResponse corresponding to the associated servletRequest.