Package org.apache.shiro.web.subject
Interface WebSubjectContext
-
- All Superinterfaces:
Map<String,Object>
,RequestPairSource
,SubjectContext
- All Known Implementing Classes:
DefaultWebSubjectContext
public interface WebSubjectContext extends SubjectContext, RequestPairSource
AWebSubjectContext
is aSubjectContext
that additionally provides for type-safe methods to set and retrieve aServletRequest
andServletResponse
.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServletRequest
getServletRequest()
Returns theServletRequest
received by the servlet container triggering the creation of theSubject
instance.ServletResponse
getServletResponse()
The pairedServletResponse
corresponding to the associatedservletRequest
.ServletRequest
resolveServletRequest()
ServletResponse
resolveServletResponse()
void
setServletRequest(ServletRequest request)
Sets theServletRequest
received by the servlet container triggering the creation of theSubject
instance.void
setServletResponse(ServletResponse response)
Sets the pairedServletResponse
corresponding 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
-
Methods inherited from interface org.apache.shiro.subject.SubjectContext
getAuthenticationInfo, getAuthenticationToken, getHost, getPrincipals, getSecurityManager, getSession, getSessionId, getSubject, isAuthenticated, isSessionCreationEnabled, resolveAuthenticated, resolveHost, resolvePrincipals, resolveSecurityManager, resolveSession, setAuthenticated, setAuthenticationInfo, setAuthenticationToken, setHost, setPrincipals, setSecurityManager, setSession, setSessionCreationEnabled, setSessionId, setSubject
-
-
-
-
Method Detail
-
getServletRequest
ServletRequest getServletRequest()
Returns theServletRequest
received by the servlet container triggering the creation of theSubject
instance.- Specified by:
getServletRequest
in interfaceRequestPairSource
- Returns:
- the
ServletRequest
received by the servlet container triggering the creation of theSubject
instance.
-
setServletRequest
void setServletRequest(ServletRequest request)
Sets theServletRequest
received by the servlet container triggering the creation of theSubject
instance.- Parameters:
request
- theServletRequest
received by the servlet container triggering the creation of theSubject
instance.
-
resolveServletRequest
ServletRequest resolveServletRequest()
-
getServletResponse
ServletResponse getServletResponse()
The pairedServletResponse
corresponding to the associatedservletRequest
.- Specified by:
getServletResponse
in interfaceRequestPairSource
- Returns:
- the paired
ServletResponse
corresponding to the associatedservletRequest
.
-
setServletResponse
void setServletResponse(ServletResponse response)
Sets the pairedServletResponse
corresponding to the associatedservletRequest
.- Parameters:
response
- The pairedServletResponse
corresponding to the associatedservletRequest
.
-
resolveServletResponse
ServletResponse resolveServletResponse()
-
-