Package io.servicetalk.grpc.api
Interface BlockingStreamingGrpcServerResponse<T>
- Type Parameters:
T- the type or response message
public interface BlockingStreamingGrpcServerResponse<T>
The response for streaming use-cases that provides ability to defer sending response meta-data and write the payload
to an
GrpcPayloadWriter.-
Method Summary
Modifier and TypeMethodDescriptioncontext()A response context that will be translated intoHttpMetaData.context().Sends the response meta-data and returns aGrpcPayloadWriterto continue writing the response messages.
-
Method Details
-
context
ContextMap context()A response context that will be translated intoHttpMetaData.context().This is an equivalent of
GrpcMetadata.responseContext().- Returns:
- a response context that will be translated into
HttpMetaData.context() - Throws:
IllegalStateException- ifsendMetaData()is already invoked- See Also:
-
sendMetaData
GrpcPayloadWriter<T> sendMetaData()Sends the response meta-data and returns aGrpcPayloadWriterto continue writing the response messages.Note: calling any other method on this class after calling this method is not allowed. Any modifications to the meta-data won't be visible after this method is invoked.
- Returns:
GrpcPayloadWriterto write response messages
-