类 HandlerExecutionChain
- java.lang.Object
- org.springframework.web.servlet.HandlerExecutionChain
public class HandlerExecutionChain extends Object
Handler execution chain, consisting of handler object and any handler interceptors. Returned by HandlerMapping'sHandlerMapping.getHandler(javax.servlet.http.HttpServletRequest)
method.- 从以下版本开始:
- 20.06.2003
- 作者:
- Juergen Hoeller
- 另请参阅:
HandlerInterceptor
构造器概要
构造器 构造器 说明 HandlerExecutionChain(Object handler)
Create a new HandlerExecutionChain.HandlerExecutionChain(Object handler, HandlerInterceptor... interceptors)
Create a new HandlerExecutionChain.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addInterceptor(HandlerInterceptor interceptor)
Add the given interceptor to the end of this chain.void
addInterceptors(HandlerInterceptor... interceptors)
Add the given interceptors to the end of this chain.Object
getHandler()
Return the handler object to execute.HandlerInterceptor[]
getInterceptors()
Return the array of interceptors to apply (in the given order).String
toString()
Delegates to the handler'stoString()
implementation.
构造器详细资料
HandlerExecutionChain
public HandlerExecutionChain(Object handler)
Create a new HandlerExecutionChain.- 参数:
handler
- the handler object to execute
HandlerExecutionChain
public HandlerExecutionChain(Object handler, HandlerInterceptor... interceptors)
Create a new HandlerExecutionChain.- 参数:
handler
- the handler object to executeinterceptors
- the array of interceptors to apply (in the given order) before the handler itself executes
方法详细资料
getHandler
public Object getHandler()
Return the handler object to execute.- 返回:
- the handler object (may be
null
)
addInterceptor
public void addInterceptor(HandlerInterceptor interceptor)
Add the given interceptor to the end of this chain.
addInterceptors
public void addInterceptors(HandlerInterceptor... interceptors)
Add the given interceptors to the end of this chain.
getInterceptors
public HandlerInterceptor[] getInterceptors()
Return the array of interceptors to apply (in the given order).- 返回:
- the array of HandlerInterceptors instances (may be
null
)