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

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
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 ServletRequest getServletRequest()
          Returns the ServletRequest received by the servlet container triggering the creation of the Session instance.
 ServletResponse getServletResponse()
          The paired ServletResponse corresponding to the associated servletRequest.
 void setServletRequest(ServletRequest request)
          Sets the ServletRequest received by the servlet container triggering the creation of the Session instance.
 void setServletResponse(ServletResponse response)
          Sets the paired ServletResponse corresponding to the associated servletRequest.
 
Methods inherited from interface org.apache.shiro.session.mgt.SessionContext
getHost, getSessionId, setHost, setSessionId
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getServletRequest

ServletRequest getServletRequest()
Returns the ServletRequest received by the servlet container triggering the creation of the Session instance.

Specified by:
getServletRequest in interface RequestPairSource
Returns:
the ServletRequest received by the servlet container triggering the creation of the Session instance.

setServletRequest

void setServletRequest(ServletRequest request)
Sets the ServletRequest received by the servlet container triggering the creation of the Session instance.

Parameters:
request - the ServletRequest received by the servlet container triggering the creation of the Session instance.

getServletResponse

ServletResponse getServletResponse()
The paired ServletResponse corresponding to the associated servletRequest.

Specified by:
getServletResponse in interface RequestPairSource
Returns:
the paired ServletResponse corresponding to the associated servletRequest.

setServletResponse

void setServletResponse(ServletResponse response)
Sets the paired ServletResponse corresponding to the associated servletRequest.

Parameters:
response - The paired ServletResponse corresponding to the associated servletRequest.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.