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 theHandlerInterceptorinterface, 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:
preHandleActionin interfaceHandlerInterceptor- Parameters:
request- current portlet action requestresponse- current portlet action responsehandler- chosen handler to execute, for type and/or instance evaluation- Returns:
trueif the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortletassumes 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:
afterActionCompletionin 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:
preHandleRenderin interfaceHandlerInterceptor- Parameters:
request- current portlet render requestresponse- current portlet render responsehandler- chosen handler to execute, for type and/or instance evaluation- Returns:
trueif the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortletassumes 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:
postHandleRenderin interfaceHandlerInterceptor- Parameters:
request- current portlet render requestresponse- current portlet render responsehandler- chosen handler to execute, for type and/or instance examinationmodelAndView- theModelAndViewthat 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:
afterRenderCompletionin 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:
preHandleResourcein interfaceHandlerInterceptor- Parameters:
request- current portlet render requestresponse- current portlet render responsehandler- chosen handler to execute, for type and/or instance evaluation- Returns:
trueif the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortletassumes 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:
postHandleResourcein interfaceHandlerInterceptor- Parameters:
request- current portlet render requestresponse- current portlet render responsehandler- chosen handler to execute, for type and/or instance examinationmodelAndView- theModelAndViewthat 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:
afterResourceCompletionin 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:
preHandleEventin interfaceHandlerInterceptor- Parameters:
request- current portlet action requestresponse- current portlet action responsehandler- chosen handler to execute, for type and/or instance evaluation- Returns:
trueif the execution chain should proceed with the next interceptor or the handler itself. Else,DispatcherPortletassumes 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:
afterEventCompletionin 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