## org.springframework.web.portlet.handler
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 the `HandlerInterceptor` interface, for simplified implementation of pre-only/post-only interceptors.

Since:
  2.0
Author:
  Juergen Hoeller, John A. Lewis

Constructor Summary
`HandlerInterceptorAdapter()`

Method Summary
`void` `afterActionCompletion(ActionRequest request, ActionResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.
`protected void` `afterCompletion(PortletRequest request, PortletResponse response, Object handler, Exception ex)` Default callback that all "after*" methods delegate to.
`void` `afterEventCompletion(EventRequest request, EventResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.
`void` `afterRenderCompletion(RenderRequest request, RenderResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.
`void` `afterResourceCompletion(ResourceRequest request, ResourceResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.
`void` `postHandleRender(RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView)` This implementation is empty.
`void` `postHandleResource(ResourceRequest request, ResourceResponse response, Object handler, ModelAndView modelAndView)` This implementation is empty.
`protected boolean` `preHandle(PortletRequest request, PortletResponse response, Object handler)` Default callback that all "pre*" methods delegate to.
`boolean` `preHandleAction(ActionRequest request, ActionResponse response, Object handler)` This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.
`boolean` `preHandleEvent(EventRequest request, EventResponse response, Object handler)` This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.
`boolean` `preHandleRender(RenderRequest request, RenderResponse response, Object handler)` This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.
`boolean` `preHandleResource(ResourceRequest request, ResourceResponse response, Object handler)` This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HandlerInterceptorAdapter

    public HandlerInterceptorAdapter()

Method Detail

### preHandleAction

    public boolean preHandleAction(ActionRequest request,
                                   ActionResponse response,
                                   Object handler)
                            throws Exception

  This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.

  Specified by:
    `preHandleAction` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet action request
    `response` - current portlet action response
    `handler` - 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 to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.

  Specified by:
    `afterActionCompletion` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet action request
    `response` - current portlet action response
    `handler` - chosen handler to execute, for type and/or instance examination
    `ex` - 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`)
  Throws:
    `Exception` - in case of errors

### preHandleRender

    public boolean preHandleRender(RenderRequest request,
                                   RenderResponse response,
                                   Object handler)
                            throws Exception

  This implementation delegates to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.

  Specified by:
    `preHandleRender` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - 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 interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - chosen handler to execute, for type and/or instance examination
    `modelAndView` - the `ModelAndView` that the handler returned (can also be `null`)
  Throws:
    `Exception` - in case of errors

### afterRenderCompletion

    public void afterRenderCompletion(RenderRequest request,
                                      RenderResponse response,
                                      Object handler,
                                      Exception ex)
                               throws Exception

  This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.

  Specified by:
    `afterRenderCompletion` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - chosen handler to execute, for type and/or instance examination
    `ex` - 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 to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.

  Specified by:
    `preHandleResource` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - 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 interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - chosen handler to execute, for type and/or instance examination
    `modelAndView` - the `ModelAndView` that the handler returned (can also be `null`)
  Throws:
    `Exception` - in case of errors

### afterResourceCompletion

    public void afterResourceCompletion(ResourceRequest request,
                                        ResourceResponse response,
                                        Object handler,
                                        Exception ex)
                                 throws Exception

  This implementation delegates to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.

  Specified by:
    `afterResourceCompletion` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet render request
    `response` - current portlet render response
    `handler` - chosen handler to execute, for type and/or instance examination
    `ex` - 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 to `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`.

  Specified by:
    `preHandleEvent` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet action request
    `response` - current portlet action response
    `handler` - 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 to `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`.

  Specified by:
    `afterEventCompletion` in interface `HandlerInterceptor`
  Parameters:
    `request` - current portlet action request
    `response` - current portlet action response
    `handler` - chosen handler to execute, for type and/or instance examination
    `ex` - 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`)
  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`