Package io.grpc.internal
Class DelayedClientTransport.PendingStream
java.lang.Object
io.grpc.internal.DelayedStream
io.grpc.internal.DelayedClientTransport.PendingStream
- All Implemented Interfaces:
ClientStream
,Stream
- Enclosing class:
DelayedClientTransport
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoadBalancer.PickSubchannelArgs
private final Context
private final ClientStreamTracer[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PendingStream
(LoadBalancer.PickSubchannelArgs args, ClientStreamTracer[] tracers) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTimeoutInsight
(InsightBuilder insight) Append information that will be included in the locally generated DEADLINE_EXCEEDED errors to the givenInsightBuilder
, in order to tell the user about the state of the stream so that they can better diagnose the cause of the error.void
Abnormally terminates the stream.private Runnable
createRealStream
(ClientTransport transport) Runnable may be null.protected void
onEarlyCancellation
(Status reason) Methods inherited from class io.grpc.internal.DelayedStream
flush, getAttributes, getRealStream, halfClose, isReady, optimizeForDirectExecutor, request, setAuthority, setCompressor, setDeadline, setDecompressorRegistry, setFullStreamDecompression, setMaxInboundMessageSize, setMaxOutboundMessageSize, setMessageCompression, setStream, start, writeMessage
-
Field Details
-
args
-
context
-
tracers
-
-
Constructor Details
-
PendingStream
-
-
Method Details
-
createRealStream
Runnable may be null. -
cancel
Description copied from interface:ClientStream
Abnormally terminates the stream. After calling this method, no further messages will be sent or received, however it may still be possible to receive buffered messages for a brief period untilClientStreamListener.closed(io.grpc.Status, io.grpc.internal.ClientStreamListener.RpcProgress, io.grpc.Metadata)
is called. This method may only be called afterClientStream.start(io.grpc.internal.ClientStreamListener)
, but else is safe to be called at any time and multiple times and from any thread.- Specified by:
cancel
in interfaceClientStream
- Overrides:
cancel
in classDelayedStream
- Parameters:
reason
- must be non-OK
-
onEarlyCancellation
- Overrides:
onEarlyCancellation
in classDelayedStream
-
appendTimeoutInsight
Description copied from interface:ClientStream
Append information that will be included in the locally generated DEADLINE_EXCEEDED errors to the givenInsightBuilder
, in order to tell the user about the state of the stream so that they can better diagnose the cause of the error.- Specified by:
appendTimeoutInsight
in interfaceClientStream
- Overrides:
appendTimeoutInsight
in classDelayedStream
-