org.springframework.web.servlet
Class HandlerExecutionChain

java.lang.Object
  extended by org.springframework.web.servlet.HandlerExecutionChain

public class HandlerExecutionChain
extends java.lang.Object

Handler execution chain, consisting of handler object and any handler interceptors. Returned by HandlerMapping's HandlerMapping.getHandler(HttpServletRequest) method.

Since:
20.06.2003
Author:
Juergen Hoeller
See Also:
HandlerInterceptor

Field Summary
private  java.lang.Object handler
           
private  java.util.List<HandlerInterceptor> interceptorList
           
private  HandlerInterceptor[] interceptors
           
 
Constructor Summary
HandlerExecutionChain(java.lang.Object handler)
          Create a new HandlerExecutionChain.
HandlerExecutionChain(java.lang.Object handler, HandlerInterceptor[] interceptors)
          Create a new HandlerExecutionChain.
 
Method Summary
 void addInterceptor(HandlerInterceptor interceptor)
           
 void addInterceptors(HandlerInterceptor[] interceptors)
           
 java.lang.Object getHandler()
          Return the handler object to execute.
 HandlerInterceptor[] getInterceptors()
          Return the array of interceptors to apply (in the given order).
private  void initInterceptorList()
           
 java.lang.String toString()
          Delegates to the handler's toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

handler

private final java.lang.Object handler

interceptors

private HandlerInterceptor[] interceptors

interceptorList

private java.util.List<HandlerInterceptor> interceptorList
Constructor Detail

HandlerExecutionChain

public HandlerExecutionChain(java.lang.Object handler)
Create a new HandlerExecutionChain.

Parameters:
handler - the handler object to execute

HandlerExecutionChain

public HandlerExecutionChain(java.lang.Object handler,
                             HandlerInterceptor[] interceptors)
Create a new HandlerExecutionChain.

Parameters:
handler - the handler object to execute
interceptors - the array of interceptors to apply (in the given order) before the handler itself executes
Method Detail

getHandler

public java.lang.Object getHandler()
Return the handler object to execute.

Returns:
the handler object

addInterceptor

public void addInterceptor(HandlerInterceptor interceptor)

addInterceptors

public void addInterceptors(HandlerInterceptor[] interceptors)

initInterceptorList

private void initInterceptorList()

getInterceptors

public HandlerInterceptor[] getInterceptors()
Return the array of interceptors to apply (in the given order).

Returns:
the array of HandlerInterceptors instances (may be null)

toString

public java.lang.String toString()
Delegates to the handler's toString().

Overrides:
toString in class java.lang.Object