public final class FailingClientStream extends NoopClientStream
ClientStream
that fails (by calling ClientStreamListener.closed(io.grpc.Status, io.grpc.Metadata)
) when started, and silently does nothing for the other operations.INSTANCE
Constructor and Description |
---|
FailingClientStream(Status error)
Creates a
FailingClientStream that would fail with the given error. |
FailingClientStream(Status error,
ClientStreamListener.RpcProgress rpcProgress)
Creates a
FailingClientStream that would fail with the given error. |
Modifier and Type | Method and Description |
---|---|
void |
appendTimeoutInsight(InsightBuilder insight)
Append information that will be included in the locally generated DEADLINE_EXCEEDED errors to
the given
InsightBuilder , in order to tell the user about the state of the stream so
that they can better diagnose the cause of the error. |
void |
start(ClientStreamListener listener)
Starts stream.
|
cancel, flush, getAttributes, halfClose, isReady, request, setAuthority, setCompressor, setDeadline, setDecompressorRegistry, setFullStreamDecompression, setMaxInboundMessageSize, setMaxOutboundMessageSize, setMessageCompression, writeMessage
public FailingClientStream(Status error)
FailingClientStream
that would fail with the given error.public FailingClientStream(Status error, ClientStreamListener.RpcProgress rpcProgress)
FailingClientStream
that would fail with the given error.public void start(ClientStreamListener listener)
ClientStream
ClientStream.start(io.grpc.internal.ClientStreamListener)
is called.
This method should not throw any exceptions.
start
in interface ClientStream
start
in class NoopClientStream
listener
- non-null
listener of stream eventspublic void appendTimeoutInsight(InsightBuilder insight)
ClientStream
InsightBuilder
, in order to tell the user about the state of the stream so
that they can better diagnose the cause of the error.appendTimeoutInsight
in interface ClientStream
appendTimeoutInsight
in class NoopClientStream
Copyright © 2019. All rights reserved.