Package org.apache.shiro.web.session.mgt
Interface WebSessionContext
- All Superinterfaces:
Map<String,,Object> RequestPairSource,org.apache.shiro.session.mgt.SessionContext
- All Known Implementing Classes:
DefaultWebSessionContext
public interface WebSessionContext
extends org.apache.shiro.session.mgt.SessionContext, RequestPairSource
A
WebSubjectContext is a SessionContext that additionally provides for type-safe
methods to set and retrieve a ServletRequest and ServletResponse, as the request/response pair will
often need to be referenced during construction of web-initiated Session instances.- Since:
- 1.0
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.ServletRequestReturns theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.javax.servlet.ServletResponseThe pairedServletResponsecorresponding to the associatedservletRequest.voidsetServletRequest(javax.servlet.ServletRequest request) Sets theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.voidsetServletResponse(javax.servlet.ServletResponse response) Sets the pairedServletResponsecorresponding 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, valuesMethods inherited from interface org.apache.shiro.session.mgt.SessionContext
getHost, getSessionId, setHost, setSessionId
-
Method Details
-
getServletRequest
javax.servlet.ServletRequest getServletRequest()Returns theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.- Specified by:
getServletRequestin interfaceRequestPairSource- Returns:
- the
ServletRequestreceived by the servlet container triggering the creation of theSessioninstance.
-
setServletRequest
Sets theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.- Parameters:
request- theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.
-
getServletResponse
javax.servlet.ServletResponse getServletResponse()The pairedServletResponsecorresponding to the associatedservletRequest.- Specified by:
getServletResponsein interfaceRequestPairSource- Returns:
- the paired
ServletResponsecorresponding to the associatedservletRequest.
-
setServletResponse
Sets the pairedServletResponsecorresponding to the associatedservletRequest.- Parameters:
response- The pairedServletResponsecorresponding to the associatedservletRequest.
-