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 ClientInterceptors.-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationGlobalClientInterceptorConfigurer(ApplicationContext applicationContext) Creates a new AnnotationGlobalClientInterceptorConfigurer. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureClientInterceptors(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 theGrpcGlobalClientInterceptorannotatedClientInterceptors from the application context.
-
Constructor Details
-
AnnotationGlobalClientInterceptorConfigurer
Creates a new AnnotationGlobalClientInterceptorConfigurer.- Parameters:
applicationContext- The application context to fetch theGrpcGlobalClientInterceptorannotatedClientInterceptorbeans from.
-
-
Method Details
-
getClientInterceptorBeans
Helper method used to get theGrpcGlobalClientInterceptorannotatedClientInterceptors from the application context.- Returns:
- A map containing the global interceptor beans.
-
configureClientInterceptors
Description copied from interface:GlobalClientInterceptorConfigurerConfigures the given list of client interceptors, possibly adding new elements, removing unwanted elements, or reordering the existing ones.- Specified by:
configureClientInterceptorsin interfaceGlobalClientInterceptorConfigurer- Parameters:
interceptors- A mutable list of client interceptors to configure.
-