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