public class GlobalClientInterceptorRegistry extends Object
ClientInterceptor
s that should be registered
to all client 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
ClientInterceptors.interceptForward(Channel, ClientInterceptor...)
.
Constructor and Description |
---|
GlobalClientInterceptorRegistry(ApplicationContext applicationContext)
Creates a new GlobalClientInterceptorRegistry.
|
Modifier and Type | Method and Description |
---|---|
ImmutableList<io.grpc.ClientInterceptor> |
getClientInterceptors()
Gets the immutable list of global server interceptors.
|
protected List<io.grpc.ClientInterceptor> |
initClientInterceptors()
Initializes the list of client interceptors.
|
void |
sortInterceptors(List<? extends io.grpc.ClientInterceptor> interceptors)
Sorts the given list of interceptors.
|
public GlobalClientInterceptorRegistry(ApplicationContext applicationContext)
applicationContext
- The application context to fetch the GlobalClientInterceptorConfigurer
beans
from.public ImmutableList<io.grpc.ClientInterceptor> getClientInterceptors()
protected List<io.grpc.ClientInterceptor> initClientInterceptors()
public void sortInterceptors(List<? extends io.grpc.ClientInterceptor> interceptors)
AnnotationAwareOrderComparator
.interceptors
- The interceptors to sort.