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 class
static class
This should only be called from the transport thread. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.netty.util.AsciiString
private final MethodDescriptor
<?, ?> private static final InternalMethodDescriptor
private final io.netty.util.AsciiString
private final NettyClientStream.Sink
private final NettyClientStream.TransportState
private final io.netty.util.AsciiString
private 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.Sink
Sink for transport to be called to perform outbound operations.Attributes that the stream holds at the current moment.void
setAuthority
(String authority) Override the default authority withauthority
.protected NettyClientStream.TransportState
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 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:AbstractClientStream
Obtain the transport state corresponding to this stream. Each stream must have its own unique transport state.- Specified by:
transportState
in classAbstractClientStream
-
abstractClientStreamSink
Description copied from class:AbstractClientStream
Sink for transport to be called to perform outbound operations. Each stream must have its own unique sink.- Specified by:
abstractClientStreamSink
in classAbstractClientStream
-
setAuthority
Description copied from interface:ClientStream
Override the default authority withauthority
. May only be called beforeClientStream.start(io.grpc.internal.ClientStreamListener)
. -
getAttributes
Description copied from interface:ClientStream
Attributes 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.
-