Package io.grpc
Interface ServerCallHandler<RequestT,ResponseT>
-
@ThreadSafe public interface ServerCallHandler<RequestT,ResponseT>Interface to initiate processing of incoming remote calls. Advanced applications and generated code will implement this interface to allowsServers to invoke service methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerCall.Listener<RequestT>startCall(ServerCall<RequestT,ResponseT> call, Metadata headers)Produce a non-nulllistener for the incoming call.
-
-
-
Method Detail
-
startCall
ServerCall.Listener<RequestT> startCall(ServerCall<RequestT,ResponseT> call, Metadata headers)
Produce a non-nulllistener for the incoming call. Implementations are free to call methods oncallbefore this method has returned.Since
Metadatais not thread-safe, the caller must not access (read or write)headersafter this point.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.- Parameters:
call- object for responding to the remote client.- Returns:
- listener for processing incoming request messages for
call
-
-