Package org.apache.shiro.web.session.mgt
Class WebSessionKey
- java.lang.Object
-
- org.apache.shiro.session.mgt.DefaultSessionKey
-
- org.apache.shiro.web.session.mgt.WebSessionKey
-
- All Implemented Interfaces:
Serializable
,SessionKey
,RequestPairSource
public class WebSessionKey extends DefaultSessionKey implements RequestPairSource
ASessionKey
implementation that also retains theServletRequest
andServletResponse
associated with the web request that is performing the session lookup.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebSessionKey(Serializable sessionId, ServletRequest request, ServletResponse response)
WebSessionKey(ServletRequest request, ServletResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServletRequest
getServletRequest()
Returns the incomingServletRequest
associated with the component.ServletResponse
getServletResponse()
Returns the outgoingServletResponse
paired with the incomingservletRequest
.-
Methods inherited from class org.apache.shiro.session.mgt.DefaultSessionKey
getSessionId, setSessionId
-
-
-
-
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 incomingServletRequest
associated with the component.- Specified by:
getServletRequest
in interfaceRequestPairSource
- Returns:
- the incoming
ServletRequest
associated with the component.
-
getServletResponse
public ServletResponse getServletResponse()
Description copied from interface:RequestPairSource
Returns the outgoingServletResponse
paired with the incomingservletRequest
.- Specified by:
getServletResponse
in interfaceRequestPairSource
- Returns:
- the outgoing
ServletResponse
paired with the incomingservletRequest
.
-
-