org.apache.shiro.web.session.mgt
Class WebSessionKey

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

public class WebSessionKey
extends 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:
Serialized Form

Constructor Summary
WebSessionKey(Serializable sessionId, ServletRequest request, ServletResponse response)
           
WebSessionKey(ServletRequest request, ServletResponse response)
           
 
Method Summary
 ServletRequest getServletRequest()
          Returns the incoming ServletRequest associated with the component.
 ServletResponse getServletResponse()
          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 Detail

WebSessionKey

public WebSessionKey(ServletRequest request,
                     ServletResponse response)

WebSessionKey

public WebSessionKey(Serializable sessionId,
                     ServletRequest request,
                     ServletResponse response)
Method Detail

getServletRequest

public 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 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.


Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.