站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

HandlerInterceptorAdapter (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.web.portlet.handler
Class HandlerInterceptorAdapter

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

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(PortletRequest request,
                            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(PortletRequest request,
                               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)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.