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 |
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 eventsCopyright © 2018. All rights reserved.