Package io.grpc.netty
Class NettyClientStream
- java.lang.Object
-
- io.grpc.internal.AbstractStream
-
- io.grpc.internal.AbstractClientStream
-
- io.grpc.netty.NettyClientStream
-
- All Implemented Interfaces:
ClientStream,MessageFramer.Sink,Stream
class NettyClientStream extends AbstractClientStream
Client stream for a Netty transport. Must only be called from the sending application thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classNettyClientStream.Sinkstatic classNettyClientStream.TransportStateThis should only be called from the transport thread.
-
Field Summary
Fields Modifier and Type Field Description private io.netty.util.AsciiStringauthorityprivate MethodDescriptor<?,?>methodprivate static InternalMethodDescriptormethodDescriptorAccessorprivate io.netty.util.AsciiStringschemeprivate NettyClientStream.Sinksinkprivate NettyClientStream.TransportStatestateprivate io.netty.util.AsciiStringuserAgentprivate WriteQueuewriteQueue
-
Constructor Summary
Constructors Constructor Description NettyClientStream(NettyClientStream.TransportState state, MethodDescriptor<?,?> method, Metadata headers, io.netty.channel.Channel channel, io.netty.util.AsciiString authority, io.netty.util.AsciiString scheme, io.netty.util.AsciiString userAgent, StatsTraceContext statsTraceCtx, TransportTracer transportTracer, CallOptions callOptions, boolean useGetForSafeMethods)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NettyClientStream.SinkabstractClientStreamSink()Sink for transport to be called to perform outbound operations.AttributesgetAttributes()Attributes that the stream holds at the current moment.voidsetAuthority(java.lang.String authority)Override the default authority withauthority.protected NettyClientStream.TransportStatetransportState()Obtain the transport state corresponding to this stream.-
Methods inherited from class io.grpc.internal.AbstractClientStream
appendTimeoutInsight, cancel, deliverFrame, framer, getTransportTracer, halfClose, isReady, setDeadline, setDecompressorRegistry, setFullStreamDecompression, setMaxInboundMessageSize, setMaxOutboundMessageSize, shouldBeCountedForInUse, start
-
Methods inherited from class io.grpc.internal.AbstractStream
endOfMessages, flush, onSendingBytes, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, setOnReadyThreshold, writeMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.grpc.internal.Stream
flush, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, writeMessage
-
-
-
-
Field Detail
-
methodDescriptorAccessor
private static final InternalMethodDescriptor methodDescriptorAccessor
-
sink
private final NettyClientStream.Sink sink
-
state
private final NettyClientStream.TransportState state
-
writeQueue
private final WriteQueue writeQueue
-
method
private final MethodDescriptor<?,?> method
-
authority
private io.netty.util.AsciiString authority
-
scheme
private final io.netty.util.AsciiString scheme
-
userAgent
private final io.netty.util.AsciiString userAgent
-
-
Constructor Detail
-
NettyClientStream
NettyClientStream(NettyClientStream.TransportState state, MethodDescriptor<?,?> method, Metadata headers, io.netty.channel.Channel channel, io.netty.util.AsciiString authority, io.netty.util.AsciiString scheme, io.netty.util.AsciiString userAgent, StatsTraceContext statsTraceCtx, TransportTracer transportTracer, CallOptions callOptions, boolean useGetForSafeMethods)
-
-
Method Detail
-
transportState
protected NettyClientStream.TransportState transportState()
Description copied from class:AbstractClientStreamObtain the transport state corresponding to this stream. Each stream must have its own unique transport state.- Specified by:
transportStatein classAbstractClientStream
-
abstractClientStreamSink
protected NettyClientStream.Sink abstractClientStreamSink()
Description copied from class:AbstractClientStreamSink for transport to be called to perform outbound operations. Each stream must have its own unique sink.- Specified by:
abstractClientStreamSinkin classAbstractClientStream
-
setAuthority
public void setAuthority(java.lang.String authority)
Description copied from interface:ClientStreamOverride the default authority withauthority. May only be called beforeClientStream.start(io.grpc.internal.ClientStreamListener).
-
getAttributes
public Attributes getAttributes()
Description copied from interface:ClientStreamAttributes that the stream holds at the current moment. Thread-safe and can be called at any time, although some attributes are there only after a certain point.
-
-