Package org.apache.shiro.web.session.mgt
Class DefaultWebSessionContext
- java.lang.Object
-
- org.apache.shiro.util.MapContext
-
- org.apache.shiro.session.mgt.DefaultSessionContext
-
- org.apache.shiro.web.session.mgt.DefaultWebSessionContext
-
- All Implemented Interfaces:
Serializable
,Map<String,Object>
,SessionContext
,WebSessionContext
,RequestPairSource
public class DefaultWebSessionContext extends DefaultSessionContext implements WebSessionContext
Default implementation of theWebSessionContext
interface which provides getters and setters that wrap interaction with the underlying backing context map.- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultWebSessionContext()
DefaultWebSessionContext(Map<String,Object> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServletRequest
getServletRequest()
Returns theServletRequest
received by the servlet container triggering the creation of theSession
instance.ServletResponse
getServletResponse()
The pairedServletResponse
corresponding to the associatedservletRequest
.void
setServletRequest(ServletRequest request)
Sets theServletRequest
received by the servlet container triggering the creation of theSession
instance.void
setServletResponse(ServletResponse response)
Sets the pairedServletResponse
corresponding to the associatedservletRequest
.-
Methods inherited from class org.apache.shiro.session.mgt.DefaultSessionContext
getHost, getSessionId, setHost, setSessionId
-
Methods inherited from class org.apache.shiro.util.MapContext
clear, containsKey, containsValue, entrySet, get, getTypedValue, isEmpty, keySet, nullSafePut, put, putAll, remove, size, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface org.apache.shiro.session.mgt.SessionContext
getHost, getSessionId, setHost, setSessionId
-
-
-
-
Constructor Detail
-
DefaultWebSessionContext
public DefaultWebSessionContext()
-
DefaultWebSessionContext
public DefaultWebSessionContext(Map<String,Object> map)
-
-
Method Detail
-
setServletRequest
public void setServletRequest(ServletRequest request)
Description copied from interface:WebSessionContext
Sets theServletRequest
received by the servlet container triggering the creation of theSession
instance.- Specified by:
setServletRequest
in interfaceWebSessionContext
- Parameters:
request
- theServletRequest
received by the servlet container triggering the creation of theSession
instance.
-
getServletRequest
public ServletRequest getServletRequest()
Description copied from interface:WebSessionContext
Returns theServletRequest
received by the servlet container triggering the creation of theSession
instance.- Specified by:
getServletRequest
in interfaceRequestPairSource
- Specified by:
getServletRequest
in interfaceWebSessionContext
- Returns:
- the
ServletRequest
received by the servlet container triggering the creation of theSession
instance.
-
setServletResponse
public void setServletResponse(ServletResponse response)
Description copied from interface:WebSessionContext
Sets the pairedServletResponse
corresponding to the associatedservletRequest
.- Specified by:
setServletResponse
in interfaceWebSessionContext
- Parameters:
response
- The pairedServletResponse
corresponding to the associatedservletRequest
.
-
getServletResponse
public ServletResponse getServletResponse()
Description copied from interface:WebSessionContext
The pairedServletResponse
corresponding to the associatedservletRequest
.- Specified by:
getServletResponse
in interfaceRequestPairSource
- Specified by:
getServletResponse
in interfaceWebSessionContext
- Returns:
- the paired
ServletResponse
corresponding to the associatedservletRequest
.
-
-