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
Client stream for a Netty transport. Must only be called from the sending application
thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classstatic classThis should only be called from the transport thread. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.netty.util.AsciiStringprivate final MethodDescriptor<?, ?> private static final InternalMethodDescriptorprivate final io.netty.util.AsciiStringprivate final NettyClientStream.Sinkprivate final NettyClientStream.TransportStateprivate final io.netty.util.AsciiStringprivate final WriteQueue -
Constructor Summary
ConstructorsConstructorDescriptionNettyClientStream(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
Modifier and TypeMethodDescriptionprotected NettyClientStream.SinkSink for transport to be called to perform outbound operations.Attributes that the stream holds at the current moment.voidsetAuthority(String authority) Override the default authority withauthority.protected NettyClientStream.TransportStateObtain 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, startMethods inherited from class io.grpc.internal.AbstractStream
endOfMessages, flush, onSendingBytes, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, setOnReadyThreshold, writeMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.grpc.internal.Stream
flush, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, writeMessage
-
Field Details
-
methodDescriptorAccessor
-
sink
-
state
-
writeQueue
-
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 Details
-
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 Details
-
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
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
Description copied from interface:ClientStreamOverride the default authority withauthority. May only be called beforeClientStream.start(io.grpc.internal.ClientStreamListener). -
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.
-