Package io.grpc.stub
Class MetadataUtils.MetadataAttachingServerInterceptor
java.lang.Object
io.grpc.stub.MetadataUtils.MetadataAttachingServerInterceptor
- All Implemented Interfaces:
ServerInterceptor
- Enclosing class:
MetadataUtils
private static final class MetadataUtils.MetadataAttachingServerInterceptor
extends Object
implements ServerInterceptor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<ReqT,RespT>
ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next)
-
Field Details
-
extras
-
-
Constructor Details
-
MetadataAttachingServerInterceptor
MetadataAttachingServerInterceptor(Metadata extras)
-
-
Method Details
-
interceptCall
public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> call, Metadata headers, ServerCallHandler<ReqT, RespT> next) Description copied from interface:ServerInterceptorInterceptServerCalldispatch by thenextServerCallHandler. General semantics ofServerCallHandler.startCall(io.grpc.ServerCall<RequestT, ResponseT>, io.grpc.Metadata)apply and the returnedServerCall.Listenermust not benull.If the implementation throws an exception,
callwill be closed with an error. Implementations must not throw an exception if they started processing that may usecallon another thread.- Specified by:
interceptCallin interfaceServerInterceptor- Parameters:
call- object to receive response messagesheaders- which can contain extra call metadata fromClientCall.start(io.grpc.ClientCall.Listener<RespT>, io.grpc.Metadata), e.g. authentication credentials.next- next processor in the interceptor chain- Returns:
- listener for processing incoming messages for
call, nevernull.
-