public class ServerInterceptors extends Object
ServerInterceptors.| Modifier and Type | Method and Description |
|---|---|
static ServerServiceDefinition |
intercept(ServerServiceDefinition serviceDef,
List<? extends ServerInterceptor> interceptors)
Create a new
ServerServiceDefinition whose ServerCallHandlers will call
interceptors before calling the pre-existing ServerCallHandler. |
static ServerServiceDefinition |
intercept(ServerServiceDefinition serviceDef,
ServerInterceptor... interceptors)
Create a new
ServerServiceDefinition whose ServerCallHandlers will call
interceptors before calling the pre-existing ServerCallHandler. |
public static ServerServiceDefinition intercept(ServerServiceDefinition serviceDef, ServerInterceptor... interceptors)
ServerServiceDefinition whose ServerCallHandlers will call
interceptors before calling the pre-existing ServerCallHandler. The last
interceptor will have its ServerInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.ServerCall<RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>) called first.serviceDef - the service definition for which to intercept all its methods.interceptors - array of interceptors to apply to the service.serviceDef with the interceptors applied.public static ServerServiceDefinition intercept(ServerServiceDefinition serviceDef, List<? extends ServerInterceptor> interceptors)
ServerServiceDefinition whose ServerCallHandlers will call
interceptors before calling the pre-existing ServerCallHandler. The last
interceptor will have its ServerInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.ServerCall<RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>) called first.serviceDef - the service definition for which to intercept all its methods.interceptors - list of interceptors to apply to the service.serviceDef with the interceptors applied.