Class AnnotationGlobalClientInterceptorConfigurer
java.lang.Object
net.devh.boot.grpc.client.interceptor.AnnotationGlobalClientInterceptorConfigurer
- All Implemented Interfaces:
GlobalClientInterceptorConfigurer
public class AnnotationGlobalClientInterceptorConfigurer
extends Object
implements GlobalClientInterceptorConfigurer
Automatically find and configure
annotated
global ClientInterceptor
s.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationGlobalClientInterceptorConfigurer
(ApplicationContext applicationContext) Creates a new AnnotationGlobalClientInterceptorConfigurer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
configureClientInterceptors
(List<ClientInterceptor> interceptors) Configures the given list of client interceptors, possibly adding new elements, removing unwanted elements, or reordering the existing ones.protected Map<String,
ClientInterceptor> Helper method used to get theGrpcGlobalClientInterceptor
annotatedClientInterceptor
s from the application context.
-
Constructor Details
-
AnnotationGlobalClientInterceptorConfigurer
Creates a new AnnotationGlobalClientInterceptorConfigurer.- Parameters:
applicationContext
- The application context to fetch theGrpcGlobalClientInterceptor
annotatedClientInterceptor
beans from.
-
-
Method Details
-
getClientInterceptorBeans
Helper method used to get theGrpcGlobalClientInterceptor
annotatedClientInterceptor
s from the application context.- Returns:
- A map containing the global interceptor beans.
-
configureClientInterceptors
Description copied from interface:GlobalClientInterceptorConfigurer
Configures the given list of client interceptors, possibly adding new elements, removing unwanted elements, or reordering the existing ones.- Specified by:
configureClientInterceptors
in interfaceGlobalClientInterceptorConfigurer
- Parameters:
interceptors
- A mutable list of client interceptors to configure.
-