public abstract class HandlerInterceptorAdapter extends Object implements AsyncHandlerInterceptor
AsyncHandlerInterceptor interface,
for simplified implementation of pre-only/post-only interceptors.| Constructor and Description |
|---|
HandlerInterceptorAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex)
This implementation is empty.
|
void |
afterConcurrentHandlingStarted(HttpServletRequest request,
HttpServletResponse response,
Object handler)
This implementation is empty.
|
void |
postHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler,
ModelAndView modelAndView)
This implementation is empty.
|
boolean |
preHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler)
This implementation always returns
true. |
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
true.preHandle in interface HandlerInterceptorrequest - current HTTP requestresponse - current HTTP responsehandler - chosen handler to execute, for type and/or instance evaluationtrue if the execution chain should proceed with the
next interceptor or the handler itself. Else, DispatcherServlet assumes
that this interceptor has already dealt with the response itself.Exception - in case of errorspublic void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception
postHandle in interface HandlerInterceptorrequest - current HTTP requestresponse - current HTTP responsehandler - handler (or HandlerMethod) that started asynchronous
execution, for type and/or instance examinationmodelAndView - the ModelAndView that the handler returned
(can also be null)Exception - in case of errorspublic void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception
afterCompletion in interface HandlerInterceptorrequest - current HTTP requestresponse - current HTTP responsehandler - handler (or HandlerMethod) that started asynchronous
execution, for type and/or instance examinationex - exception thrown on handler execution, if anyException - in case of errorspublic void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
afterConcurrentHandlingStarted in interface AsyncHandlerInterceptorrequest - the current requestresponse - the current responsehandler - the handler (or HandlerMethod) that started async
execution, for type and/or instance examinationException - in case of errors