public interface ServerStream extends Stream
Stream to support server-side termination semantics.| Modifier and Type | Method and Description |
|---|---|
void |
close(Status status,
Metadata.Trailers trailers)
Closes the stream for both reading and writing.
|
void |
writeHeaders(Metadata.Headers headers)
Writes custom metadata as headers on the response stream sent to the client.
|
flush, isReady, request, writeMessagevoid writeHeaders(Metadata.Headers headers)
Stream#writePayload
or #close.headers - to send to client.void close(Status status, Metadata.Trailers trailers)
Status.Code.OK implies normal termination of the
stream. Any other value implies abnormal termination.status - details of the closuretrailers - an additional block of metadata to pass to the client on stream closure.