org.apache.shiro.web.subject.support
Class DefaultWebSubjectContext

java.lang.Object
  extended by org.apache.shiro.util.MapContext
      extended by org.apache.shiro.subject.support.DefaultSubjectContext
          extended by org.apache.shiro.web.subject.support.DefaultWebSubjectContext
All Implemented Interfaces:
Serializable, Map<String,Object>, SubjectContext, WebSubjectContext, RequestPairSource

public class DefaultWebSubjectContext
extends DefaultSubjectContext
implements WebSubjectContext

Default WebSubjectContext implementation that provides for additional storage and retrieval of a ServletRequest and ServletResponse.

Since:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.apache.shiro.subject.support.DefaultSubjectContext
AUTHENTICATED_SESSION_KEY, PRINCIPALS_SESSION_KEY, SESSION_CREATION_ENABLED
 
Constructor Summary
DefaultWebSubjectContext()
           
DefaultWebSubjectContext(WebSubjectContext context)
           
 
Method Summary
 ServletRequest getServletRequest()
          Returns the ServletRequest received by the servlet container triggering the creation of the Subject instance.
 ServletResponse getServletResponse()
          The paired ServletResponse corresponding to the associated servletRequest.
 String resolveHost()
           
 ServletRequest resolveServletRequest()
           
 ServletResponse resolveServletResponse()
           
 void setServletRequest(ServletRequest request)
          Sets the ServletRequest received by the servlet container triggering the creation of the Subject instance.
 void setServletResponse(ServletResponse response)
          Sets the paired ServletResponse corresponding to the associated servletRequest.
 
Methods inherited from class org.apache.shiro.subject.support.DefaultSubjectContext
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
 
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 org.apache.shiro.subject.SubjectContext
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultWebSubjectContext

public DefaultWebSubjectContext()

DefaultWebSubjectContext

public DefaultWebSubjectContext(WebSubjectContext context)
Method Detail

resolveHost

public String resolveHost()
Specified by:
resolveHost in interface SubjectContext
Overrides:
resolveHost in class DefaultSubjectContext

getServletRequest

public ServletRequest getServletRequest()
Description copied from interface: WebSubjectContext
Returns the ServletRequest received by the servlet container triggering the creation of the Subject instance.

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

setServletRequest

public void setServletRequest(ServletRequest request)
Description copied from interface: WebSubjectContext
Sets the ServletRequest received by the servlet container triggering the creation of the Subject instance.

Specified by:
setServletRequest in interface WebSubjectContext
Parameters:
request - the ServletRequest received by the servlet container triggering the creation of the Subject instance.

resolveServletRequest

public ServletRequest resolveServletRequest()
Specified by:
resolveServletRequest in interface WebSubjectContext

getServletResponse

public ServletResponse getServletResponse()
Description copied from interface: WebSubjectContext
The paired ServletResponse corresponding to the associated servletRequest.

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

setServletResponse

public void setServletResponse(ServletResponse response)
Description copied from interface: WebSubjectContext
Sets the paired ServletResponse corresponding to the associated servletRequest.

Specified by:
setServletResponse in interface WebSubjectContext
Parameters:
response - The paired ServletResponse corresponding to the associated servletRequest.

resolveServletResponse

public ServletResponse resolveServletResponse()
Specified by:
resolveServletResponse in interface WebSubjectContext


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