public final class RequestMatcherDelegatingAccessDeniedHandler extends java.lang.Object implements AccessDeniedHandler
AccessDeniedHandler
that delegates to other AccessDeniedHandler
instances based upon the type of HttpServletRequest
passed into
handle(HttpServletRequest, HttpServletResponse, AccessDeniedException)
.Constructor and Description |
---|
RequestMatcherDelegatingAccessDeniedHandler(java.util.LinkedHashMap<RequestMatcher,AccessDeniedHandler> handlers,
AccessDeniedHandler defaultHandler)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
AccessDeniedException accessDeniedException)
Handles an access denied failure.
|
public RequestMatcherDelegatingAccessDeniedHandler(java.util.LinkedHashMap<RequestMatcher,AccessDeniedHandler> handlers, AccessDeniedHandler defaultHandler)
handlers
- a map of RequestMatcher
s to
AccessDeniedHandler
s that should be used. Each is considered in the order
they are specified and only the first AccessDeniedHandler
is used.defaultHandler
- the default AccessDeniedHandler
that should be used
if none of the matchers match.public void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, AccessDeniedException accessDeniedException) throws java.io.IOException, javax.servlet.ServletException
AccessDeniedHandler
handle
in interface AccessDeniedHandler
request
- that resulted in an AccessDeniedException
response
- so that the user agent can be advised of the failureaccessDeniedException
- that caused the invocationjava.io.IOException
- in the event of an IOExceptionjavax.servlet.ServletException
- in the event of a ServletException