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>,org.apache.shiro.session.mgt.SessionContext,WebSessionContext,RequestPairSource
public class DefaultWebSessionContext extends org.apache.shiro.session.mgt.DefaultSessionContext implements WebSessionContext
Default implementation of theWebSessionContextinterface 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 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 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
-
-
-
-
Method Detail
-
setServletRequest
public void setServletRequest(javax.servlet.ServletRequest request)
Description copied from interface:WebSessionContextSets theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.- Specified by:
setServletRequestin interfaceWebSessionContext- Parameters:
request- theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.
-
getServletRequest
public javax.servlet.ServletRequest getServletRequest()
Description copied from interface:WebSessionContextReturns theServletRequestreceived by the servlet container triggering the creation of theSessioninstance.- Specified by:
getServletRequestin interfaceRequestPairSource- Specified by:
getServletRequestin interfaceWebSessionContext- Returns:
- the
ServletRequestreceived by the servlet container triggering the creation of theSessioninstance.
-
setServletResponse
public void setServletResponse(javax.servlet.ServletResponse response)
Description copied from interface:WebSessionContextSets the pairedServletResponsecorresponding to the associatedservletRequest.- Specified by:
setServletResponsein interfaceWebSessionContext- Parameters:
response- The pairedServletResponsecorresponding to the associatedservletRequest.
-
getServletResponse
public javax.servlet.ServletResponse getServletResponse()
Description copied from interface:WebSessionContextThe pairedServletResponsecorresponding to the associatedservletRequest.- Specified by:
getServletResponsein interfaceRequestPairSource- Specified by:
getServletResponsein interfaceWebSessionContext- Returns:
- the paired
ServletResponsecorresponding to the associatedservletRequest.
-
-