Class HandlerInterceptorAdapter
- java.lang.Object
- org.springframework.web.portlet.handler.HandlerInterceptorAdapter
- All Implemented Interfaces:
HandlerInterceptor
- Direct Known Subclasses:
ParameterMappingInterceptor
,UserRoleAuthorizationInterceptor
public abstract class HandlerInterceptorAdapter extends Object implements HandlerInterceptor
Abstract adapter class for theHandlerInterceptor
interface, for simplified implementation of pre-only/post-only interceptors.- Since:
- 2.0
- Author:
- Juergen Hoeller, John A. Lewis
Constructor Summary
Constructors Constructor Description HandlerInterceptorAdapter()
Method Summary
Constructor Detail
HandlerInterceptorAdapter
public HandlerInterceptorAdapter()
Method Detail
preHandleAction
public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler) throws Exception
This implementation delegates topreHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)
.- Specified by:
preHandleAction
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet action requestresponse
- current portlet action responsehandler
- chosen handler to execute, for type and/or instance evaluation- Returns:
true
if the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortlet
assumes that this interceptor has already dealt with the response itself- Throws:
Exception
- in case of errors
afterActionCompletion
public void afterActionCompletion(ActionRequest request, ActionResponse response, Object handler, Exception ex) throws Exception
This implementation delegates toafterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)
.- Specified by:
afterActionCompletion
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet action requestresponse
- current portlet action 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 isnull
)- Throws:
Exception
- in case of errors
preHandleRender
public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception
This implementation delegates topreHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)
.- Specified by:
preHandleRender
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance evaluation- Returns:
true
if the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortlet
assumes that this interceptor has already dealt with the response itself- Throws:
Exception
- in case of errors
postHandleRender
public void postHandleRender(RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView) throws Exception
This implementation is empty.- Specified by:
postHandleRender
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance examinationmodelAndView
- theModelAndView
that the handler returned (can also benull
)- Throws:
Exception
- in case of errors
afterRenderCompletion
public void afterRenderCompletion(RenderRequest request, RenderResponse response, Object handler, Exception ex) throws Exception
This implementation delegates toafterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)
.- Specified by:
afterRenderCompletion
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance examinationex
- exception thrown on handler execution, if any- Throws:
Exception
- in case of errors
preHandleResource
public boolean preHandleResource(ResourceRequest request, ResourceResponse response, Object handler) throws Exception
This implementation delegates topreHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)
.- Specified by:
preHandleResource
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance evaluation- Returns:
true
if the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortlet
assumes that this interceptor has already dealt with the response itself- Throws:
Exception
- in case of errors
postHandleResource
public void postHandleResource(ResourceRequest request, ResourceResponse response, Object handler, ModelAndView modelAndView) throws Exception
This implementation is empty.- Specified by:
postHandleResource
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance examinationmodelAndView
- theModelAndView
that the handler returned (can also benull
)- Throws:
Exception
- in case of errors
afterResourceCompletion
public void afterResourceCompletion(ResourceRequest request, ResourceResponse response, Object handler, Exception ex) throws Exception
This implementation delegates toafterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)
.- Specified by:
afterResourceCompletion
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet render requestresponse
- current portlet render responsehandler
- chosen handler to execute, for type and/or instance examinationex
- exception thrown on handler execution, if any- Throws:
Exception
- in case of errors
preHandleEvent
public boolean preHandleEvent(EventRequest request, EventResponse response, Object handler) throws Exception
This implementation delegates topreHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)
.- Specified by:
preHandleEvent
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet action requestresponse
- current portlet action responsehandler
- chosen handler to execute, for type and/or instance evaluation- Returns:
true
if the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortlet
assumes that this interceptor has already dealt with the response itself- Throws:
Exception
- in case of errors
afterEventCompletion
public void afterEventCompletion(EventRequest request, EventResponse response, Object handler, Exception ex) throws Exception
This implementation delegates toafterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)
.- Specified by:
afterEventCompletion
in interfaceHandlerInterceptor
- Parameters:
request
- current portlet action requestresponse
- current portlet action 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 isnull
)- Throws:
Exception
- in case of errors
preHandle
protected boolean preHandle(PortletRequest request, PortletResponse response, Object handler) throws Exception
Default callback that all "pre*" methods delegate to.This implementation always returns
true
.- Throws:
Exception
afterCompletion
protected void afterCompletion(PortletRequest request, PortletResponse response, Object handler, Exception ex) throws Exception
Default callback that all "after*" methods delegate to.This implementation is empty.
- Throws:
Exception