Package org.apache.shiro.web.session.mgt
Interface WebSessionContext
-
- All Superinterfaces:
Map<String,Object>
,RequestPairSource
,SessionContext
- All Known Implementing Classes:
DefaultWebSessionContext
public interface WebSessionContext extends SessionContext, RequestPairSource
AWebSubjectContext
is aSessionContext
that additionally provides for type-safe methods to set and retrieve aServletRequest
andServletResponse
, as the request/response pair will often need to be referenced during construction of web-initiatedSession
instances.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract 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 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
-
-
-
-
Method Detail
-
getServletRequest
ServletRequest getServletRequest()
Returns theServletRequest
received by the servlet container triggering the creation of theSession
instance.- Specified by:
getServletRequest
in interfaceRequestPairSource
- Returns:
- the
ServletRequest
received by the servlet container triggering the creation of theSession
instance.
-
setServletRequest
void setServletRequest(ServletRequest request)
Sets theServletRequest
received by the servlet container triggering the creation of theSession
instance.- Parameters:
request
- theServletRequest
received by the servlet container triggering the creation of theSession
instance.
-
getServletResponse
ServletResponse getServletResponse()
The pairedServletResponse
corresponding to the associatedservletRequest
.- Specified by:
getServletResponse
in interfaceRequestPairSource
- Returns:
- the paired
ServletResponse
corresponding to the associatedservletRequest
.
-
setServletResponse
void setServletResponse(ServletResponse response)
Sets the pairedServletResponse
corresponding to the associatedservletRequest
.- Parameters:
response
- The pairedServletResponse
corresponding to the associatedservletRequest
.
-
-