public class GlobalServerInterceptorRegistry extends Object
ServerInterceptors 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<io.grpc.ServerInterceptor> |
getServerInterceptors()
Gets the immutable list of global server interceptors.
|
protected List<io.grpc.ServerInterceptor> |
initServerInterceptors()
Initializes the list of server interceptors.
|
void |
sortInterceptors(List<? extends io.grpc.ServerInterceptor> interceptors)
Sorts the given list of interceptors.
|
public GlobalServerInterceptorRegistry(ApplicationContext applicationContext)
applicationContext - The application context to fetch the GlobalServerInterceptorConfigurer beans
from.public ImmutableList<io.grpc.ServerInterceptor> getServerInterceptors()
protected List<io.grpc.ServerInterceptor> initServerInterceptors()
public void sortInterceptors(List<? extends io.grpc.ServerInterceptor> interceptors)
beanDefinitionAwareOrderComparator.interceptors - The interceptors to sort.