Package org.atmosphere.cpr
Class InterceptorRegistry
java.lang.Object
org.atmosphere.cpr.InterceptorRegistry
Manages
AtmosphereInterceptor registration, configuration, and lifecycle.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd all interceptors to all handler wrappers.booleanaddInterceptor(AtmosphereInterceptor c, boolean initialized) Add anAtmosphereInterceptor.voidAdd an interceptor to all registered handler wrappers.voidaddInterceptorToWrapper(AtmosphereHandlerWrapper wrapper, List<AtmosphereInterceptor> handlerInterceptors) Add framework interceptors and handler-specific interceptors to a wrapper.voidAdd an interceptor to a specific wrapper.voidclear()Clear all interceptors and excluded interceptors.voidConfigure interceptors from servlet init parameters and default list.Class<? extends AtmosphereInterceptor>[]Return the default interceptor classes.voiddestroyInterceptors(Map<String, AtmosphereHandlerWrapper> handlers) Destroy all interceptors in all handler wrappers.Return the list of excluded interceptor class names.voidexcludeInterceptor(String interceptor) Exclude anAtmosphereInterceptorfrom being added at startup.<T extends AtmosphereInterceptor>
Optional<T> findInterceptor(Class<T> c) Find anAtmosphereInterceptorof the given type.<T extends AtmosphereInterceptor>
Tinterceptor(Class<T> c) Deprecated.Return the list ofAtmosphereInterceptors.newInterceptor(Class<? extends AtmosphereInterceptor> a) Create a new interceptor instance.
-
Field Details
-
DEFAULT_ATMOSPHERE_INTERCEPTORS
-
-
Constructor Details
-
InterceptorRegistry
-
-
Method Details
-
addInterceptor
Add anAtmosphereInterceptor. The adding order will be used for invocation. -
interceptors
Return the list ofAtmosphereInterceptors. -
interceptor
@Deprecated(since="4.0.0", forRemoval=false) public <T extends AtmosphereInterceptor> T interceptor(Class<T> c) Deprecated.UsefindInterceptor(Class)which returnsOptionalinstead of null.Find anAtmosphereInterceptorof the given type. -
findInterceptor
Find anAtmosphereInterceptorof the given type. -
excludeInterceptor
Exclude anAtmosphereInterceptorfrom being added at startup. -
excludedInterceptors
Return the list of excluded interceptor class names. -
defaultInterceptors
Return the default interceptor classes. -
configure
Configure interceptors from servlet init parameters and default list. -
newInterceptor
Create a new interceptor instance. -
addDefaultOrAppInterceptors
public void addDefaultOrAppInterceptors()Add all interceptors to all handler wrappers. -
addInterceptorToAllWrappers
Add an interceptor to all registered handler wrappers. -
addInterceptorToWrapper
Add an interceptor to a specific wrapper. -
addInterceptorToWrapper
public void addInterceptorToWrapper(AtmosphereHandlerWrapper wrapper, List<AtmosphereInterceptor> handlerInterceptors) Add framework interceptors and handler-specific interceptors to a wrapper. -
destroyInterceptors
Destroy all interceptors in all handler wrappers. -
clear
public void clear()Clear all interceptors and excluded interceptors.
-
findInterceptor(Class)which returnsOptionalinstead of null.