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
private class DelayedClientTransport.PendingStream extends DelayedStream
-
-
Field Summary
Fields Modifier and Type Field Description private LoadBalancer.PickSubchannelArgsargsprivate Contextcontextprivate ClientStreamTracer[]tracers
-
Constructor Summary
Constructors Modifier Constructor Description privatePendingStream(LoadBalancer.PickSubchannelArgs args, ClientStreamTracer[] tracers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendTimeoutInsight(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.voidcancel(Status reason)Abnormally terminates the stream.private java.lang.RunnablecreateRealStream(ClientTransport transport)Runnable may be null.protected voidonEarlyCancellation(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 Detail
-
args
private final LoadBalancer.PickSubchannelArgs args
-
context
private final Context context
-
tracers
private final ClientStreamTracer[] tracers
-
-
Constructor Detail
-
PendingStream
private PendingStream(LoadBalancer.PickSubchannelArgs args, ClientStreamTracer[] tracers)
-
-
Method Detail
-
createRealStream
private java.lang.Runnable createRealStream(ClientTransport transport)
Runnable may be null.
-
cancel
public void cancel(Status reason)
Description copied from interface:ClientStreamAbnormally 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:
cancelin interfaceClientStream- Overrides:
cancelin classDelayedStream- Parameters:
reason- must be non-OK
-
onEarlyCancellation
protected void onEarlyCancellation(Status reason)
- Overrides:
onEarlyCancellationin classDelayedStream
-
appendTimeoutInsight
public void appendTimeoutInsight(InsightBuilder insight)
Description copied from interface:ClientStreamAppend 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:
appendTimeoutInsightin interfaceClientStream- Overrides:
appendTimeoutInsightin classDelayedStream
-
-