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
AWebSubjectContextis aSessionContextthat additionally provides for type-safe methods to set and retrieve aServletRequestandServletResponse, as the request/response pair will often need to be referenced during construction of web-initiatedSessioninstances.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.servlet.ServletRequestgetServletRequest()Returns theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.javax.servlet.ServletResponsegetServletResponse()The 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, values
-
-
-
-
Method Detail
-
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
void setServletRequest(javax.servlet.ServletRequest request)
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
void setServletResponse(javax.servlet.ServletResponse response)
Sets the pairedServletResponsecorresponding to the associatedservletRequest.- Parameters:
response- The pairedServletResponsecorresponding to the associatedservletRequest.
-
-