Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion`.
`protected void` | `afterCompletion(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, Object handler, Exception ex)` Default callback that both `preHandleRender` and `preHandleAction` delegate to.
`void` | `afterRenderCompletion(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler, Exception ex)` This implementation delegates to `afterCompletion`.
`void` | `postHandleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler, ModelAndView modelAndView)` This implementation is empty.
`protected boolean` | `preHandle(javax.portlet.PortletRequest request, javax.portlet.PortletResponse response, Object handler)` Default callback that both `preHandleRender` and `preHandleAction` delegate to.
`boolean` | `preHandleAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler)` This implementation delegates to `preHandle`.
`boolean` | `preHandleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler)` This implementation delegates to `preHandle`.

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(javax.portlet.ActionRequest request,
                                   javax.portlet.ActionResponse response,
                                   Object handler)
                            throws Exception

  This implementation delegates to `preHandle`.

  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
  See Also:
    `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`

### afterActionCompletion

    public void afterActionCompletion(javax.portlet.ActionRequest request,
                                      javax.portlet.ActionResponse response,
                                      Object handler,
                                      Exception ex)
                               throws Exception

  This implementation delegates to `afterCompletion`.

  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
  See Also:
    `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`

### preHandleRender

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

  This implementation delegates to `preHandle`.

  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
  See Also:
    `preHandle(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object)`

### postHandleRender

    public void postHandleRender(javax.portlet.RenderRequest request,
                                 javax.portlet.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(javax.portlet.RenderRequest request,
                                      javax.portlet.RenderResponse response,
                                      Object handler,
                                      Exception ex)
                               throws Exception

  This implementation delegates to `afterCompletion`.

  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
  See Also:
    `afterCompletion(javax.portlet.PortletRequest, javax.portlet.PortletResponse, java.lang.Object, java.lang.Exception)`

### preHandle

    protected boolean preHandle(javax.portlet.PortletRequest request,
                                javax.portlet.PortletResponse response,
                                Object handler)
                         throws Exception

  Default callback that both `preHandleRender` and `preHandleAction` delegate to.

  This implementation always returns `true`.

  Throws:
    `Exception`
  See Also:
    `preHandleRender(javax.portlet.RenderRequest, javax.portlet.RenderResponse, java.lang.Object)`, `preHandleAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse, java.lang.Object)`

### afterCompletion

    protected void afterCompletion(javax.portlet.PortletRequest request,
                                   javax.portlet.PortletResponse response,
                                   Object handler,
                                   Exception ex)
                            throws Exception

  Default callback that both `preHandleRender` and `preHandleAction` delegate to.

  This implementation is empty.

  Throws:
    `Exception`
  See Also:
    `afterRenderCompletion(javax.portlet.RenderRequest, javax.portlet.RenderResponse, java.lang.Object, java.lang.Exception)`, `afterActionCompletion(javax.portlet.ActionRequest, javax.portlet.ActionResponse, java.lang.Object, java.lang.Exception)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2008 The Spring Framework.