public class InterceptorRegistry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Comparator<java.lang.Object> |
INTERCEPTOR_ORDER_COMPARATOR |
private java.util.List<InterceptorRegistration> |
registrations |
Constructor and Description |
---|
InterceptorRegistry() |
Modifier and Type | Method and Description |
---|---|
InterceptorRegistration |
addInterceptor(HandlerInterceptor interceptor)
Adds the provided
HandlerInterceptor . |
InterceptorRegistration |
addWebRequestInterceptor(WebRequestInterceptor interceptor)
Adds the provided
WebRequestInterceptor . |
protected java.util.List<java.lang.Object> |
getInterceptors()
Return all registered interceptors.
|
private final java.util.List<InterceptorRegistration> registrations
private static final java.util.Comparator<java.lang.Object> INTERCEPTOR_ORDER_COMPARATOR
public InterceptorRegistration addInterceptor(HandlerInterceptor interceptor)
HandlerInterceptor
.interceptor
- the interceptor to addInterceptorRegistration
that allows you optionally configure the
registered interceptor further for example adding URL patterns it should apply to.public InterceptorRegistration addWebRequestInterceptor(WebRequestInterceptor interceptor)
WebRequestInterceptor
.interceptor
- the interceptor to addInterceptorRegistration
that allows you optionally configure the
registered interceptor further for example adding URL patterns it should apply to.protected java.util.List<java.lang.Object> getInterceptors()