|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.handler.HandlerInterceptorAdapter
public abstract class HandlerInterceptorAdapter
Abstract adapter class for the HandlerInterceptor interface, for simplified implementation of pre-only/post-only interceptors.
Constructor Summary | |
---|---|
HandlerInterceptorAdapter()
|
Method Summary | |
---|---|
void |
afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HandlerInterceptorAdapter()
Method Detail |
---|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
preHandle
in interface HandlerInterceptor
request
- current HTTP requestresponse
- current HTTP responsehandler
- chosen handler to execute, for type and/or instance evaluation
true
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 HandlerInterceptor
request
- current HTTP requestresponse
- current HTTP responsehandler
- chosen handler to execute, 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 HandlerInterceptor
request
- current HTTP requestresponse
- current HTTP responsehandler
- chosen handler to execute, for type and/or instance examinationex
- exception thrown on handler execution, if any (only included as
additional context information for the case where a handler threw an exception;
request execution may have failed even when this argument is null)
Exception
- in case of errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |