Package org.springframework.web.servlet
Class HandlerExecutionChain
java.lang.Object
org.springframework.web.servlet.HandlerExecutionChain
Handler execution chain, consisting of handler object and any handler interceptors.
Returned by HandlerMapping's
HandlerMapping.getHandler(jakarta.servlet.http.HttpServletRequest)
method.- Since:
- 20.06.2003
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionHandlerExecutionChain
(Object handler) Create a new HandlerExecutionChain.HandlerExecutionChain
(Object handler, List<HandlerInterceptor> interceptorList) Create a new HandlerExecutionChain.HandlerExecutionChain
(Object handler, HandlerInterceptor... interceptors) Create a new HandlerExecutionChain. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInterceptor
(int index, HandlerInterceptor interceptor) Add the given interceptor at the specified index of this chain.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.Return the handler object to execute.Return the list of interceptors to apply (in the given order).Return the array of interceptors to apply (in the given order).toString()
Delegates to the handler'stoString()
implementation.
-
Constructor Details
-
HandlerExecutionChain
Create a new HandlerExecutionChain.- Parameters:
handler
- the handler object to execute
-
HandlerExecutionChain
Create a new HandlerExecutionChain.- Parameters:
handler
- the handler object to executeinterceptors
- the array of interceptors to apply (in the given order) before the handler itself executes
-
HandlerExecutionChain
Create a new HandlerExecutionChain.- Parameters:
handler
- the handler object to executeinterceptorList
- the list of interceptors to apply (in the given order) before the handler itself executes- Since:
- 5.3
-
-
Method Details
-
getHandler
Return the handler object to execute. -
addInterceptor
Add the given interceptor to the end of this chain. -
addInterceptor
Add the given interceptor at the specified index of this chain.- Since:
- 5.2
-
addInterceptors
Add the given interceptors to the end of this chain. -
getInterceptors
Return the array of interceptors to apply (in the given order).- Returns:
- the array of HandlerInterceptors instances (may be
null
)
-
getInterceptorList
Return the list of interceptors to apply (in the given order).- Returns:
- the list of HandlerInterceptors instances (potentially empty)
- Since:
- 5.3
-
toString
Delegates to the handler'stoString()
implementation.
-