public class GlobalServerInterceptorRegistry extends Object
ServerInterceptor
s that should be registered
to all server channels. The interceptors will be applied in the same order they as specified by the
sortInterceptors(List)
method.
Note: Custom interceptors will be appended to the global interceptors and applied using
ServerInterceptors.interceptForward(BindableService, ServerInterceptor...)
.
Constructor and Description |
---|
GlobalServerInterceptorRegistry(ApplicationContext applicationContext)
Creates a new GlobalServerInterceptorRegistry.
|
Modifier and Type | Method and Description |
---|---|
ImmutableList<ServerInterceptor> |
getServerInterceptors()
Gets the immutable list of global server interceptors.
|
protected List<ServerInterceptor> |
initServerInterceptors()
Initializes the list of server interceptors.
|
void |
sortInterceptors(List<? extends ServerInterceptor> interceptors)
Sorts the given list of interceptors.
|
public GlobalServerInterceptorRegistry(ApplicationContext applicationContext)
applicationContext
- The application context to fetch the GlobalServerInterceptorConfigurer
beans
from.public ImmutableList<ServerInterceptor> getServerInterceptors()
protected List<ServerInterceptor> initServerInterceptors()
public void sortInterceptors(List<? extends ServerInterceptor> interceptors)
AnnotationAwareOrderComparator
.interceptors
- The interceptors to sort.