|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.common.web.interceptor.ChainedHandlerInterceptor
public class ChainedHandlerInterceptor
HandlerInterceptor that delegates calls to a list of interceptors. Supported interceptor types are HandlerInterceptor and WebRequestInterceptor.
setInterceptors(List)
Constructor Summary | |
---|---|
ChainedHandlerInterceptor()
|
Method Summary | |
---|---|
protected HandlerInterceptor |
adaptInterceptor(Object interceptor)
Adapt the given interceptor object to the HandlerInterceptor interface. |
void |
afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Exception ex)
Delegates the call to all configured interceptors. |
void |
afterPropertiesSet()
Calls the initInterceptors() method. |
protected void |
initInterceptors()
Initialize the specified interceptors, adapting them where necessary. |
void |
postHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler,
ModelAndView modelAndView)
Delegates the call to all configured interceptors. |
boolean |
preHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler)
Delegates the call to all configured interceptors. |
void |
setInterceptors(List<HandlerInterceptor> interceptors)
Set the interceptors to apply in a chain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChainedHandlerInterceptor()
Method Detail |
---|
public void setInterceptors(List<HandlerInterceptor> interceptors)
Supported interceptor types are HandlerInterceptor and WebRequestInterceptor.
interceptors
- array of handler interceptors, or null
if noneHandlerInterceptor
,
WebRequestInterceptor
public void afterPropertiesSet() throws Exception
initInterceptors()
method.
afterPropertiesSet
in interface InitializingBean
Exception
protected void initInterceptors()
setInterceptors(java.util.List)
,
adaptInterceptor(java.lang.Object)
protected HandlerInterceptor adaptInterceptor(Object interceptor)
Supported interceptor types are HandlerInterceptor and WebRequestInterceptor. Each given WebRequestInterceptor will be wrapped in a WebRequestHandlerInterceptorAdapter. Can be overridden in subclasses.
interceptor
- the specified interceptor object
HandlerInterceptor
,
WebRequestInterceptor
,
WebRequestHandlerInterceptorAdapter
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
false
the chain is not further processes and the
method returns false
itself. Otherwise true
is returned after all interceptors have been called.
preHandle
in interface HandlerInterceptor
Exception
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception
postHandle
in interface HandlerInterceptor
Exception
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception
afterCompletion
in interface HandlerInterceptor
Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |