Class WebSessionKey

java.lang.Object
org.apache.shiro.session.mgt.DefaultSessionKey
org.apache.shiro.web.session.mgt.WebSessionKey
All Implemented Interfaces:
Serializable, org.apache.shiro.session.mgt.SessionKey, RequestPairSource

public class WebSessionKey extends org.apache.shiro.session.mgt.DefaultSessionKey implements RequestPairSource
A SessionKey implementation that also retains the ServletRequest and ServletResponse associated with the web request that is performing the session lookup.
Since:
1.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebSessionKey(Serializable sessionId, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
    WebSessionKey(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javax.servlet.ServletRequest
    Returns the incoming ServletRequest associated with the component.
    javax.servlet.ServletResponse
    Returns the outgoing ServletResponse paired with the incoming servletRequest.

    Methods inherited from class org.apache.shiro.session.mgt.DefaultSessionKey

    getSessionId, setSessionId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebSessionKey

      public WebSessionKey(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
    • WebSessionKey

      public WebSessionKey(Serializable sessionId, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
  • Method Details

    • getServletRequest

      public javax.servlet.ServletRequest getServletRequest()
      Description copied from interface: RequestPairSource
      Returns the incoming ServletRequest associated with the component.
      Specified by:
      getServletRequest in interface RequestPairSource
      Returns:
      the incoming ServletRequest associated with the component.
    • getServletResponse

      public javax.servlet.ServletResponse getServletResponse()
      Description copied from interface: RequestPairSource
      Returns the outgoing ServletResponse paired with the incoming servletRequest.
      Specified by:
      getServletResponse in interface RequestPairSource
      Returns:
      the outgoing ServletResponse paired with the incoming servletRequest.