Annotation Interface Grpc.GrpcInterceptor

Enclosing interface:
Grpc

@Retention(RUNTIME) @Target(TYPE) @Documented public static @interface Grpc.GrpcInterceptor
Specifies that a class is a gRPC interceptor.

The class should be a discoverable CDI bean, for example it could be discovered by being annotated with a valid CDI scope.

The annotated class can be a ServerInterceptor.

 @Interceptor
 @ApplicationScoped
 public class ValidationInterceptor
         implements io.grpc.ServerInterceptor { ... }
 

Or the annotated class can be a ClientInterceptor.

 @Interceptor
 @ApplicationScoped
 public class ValidationInterceptor
         implements io.grpc.ClientInterceptor { ... }
 

This annotation is optional if the Interceptors annotation or is used to associate the interceptor with the target class. It is required when a interceptor binding is used.