Package io.grpc.netty
Class NettyServerStream
java.lang.Object
io.grpc.internal.AbstractStream
io.grpc.internal.AbstractServerStream
io.grpc.netty.NettyServerStream
- All Implemented Interfaces:
MessageFramer.Sink,ServerStream,Stream
Server stream for a Netty HTTP2 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 final Attributesprivate final Stringprivate static final Loggerprivate final NettyServerStream.Sinkprivate final NettyServerStream.TransportStateprivate final intprivate final WriteQueue -
Constructor Summary
ConstructorsConstructorDescriptionNettyServerStream(io.netty.channel.Channel channel, NettyServerStream.TransportState state, Attributes transportAttrs, String authority, StatsTraceContext statsTraceCtx) -
Method Summary
Modifier and TypeMethodDescriptionprotected NettyServerStream.SinkSink for transport to be called to perform outbound operations.Attributes describing stream.Gets the authority this stream is addressed to.intstreamId()The HTTP/2 stream id, or-1if not supported.protected NettyServerStream.TransportStateObtain the transport state corresponding to this stream.Methods inherited from class io.grpc.internal.AbstractServerStream
cancel, close, deliverFrame, framer, isReady, setDecompressor, setListener, setOnReadyThreshold, statsTraceContext, writeHeadersMethods inherited from class io.grpc.internal.AbstractStream
endOfMessages, flush, onSendingBytes, optimizeForDirectExecutor, request, setCompressor, setMessageCompression, 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
-
log
-
sink
-
state
-
writeQueue
-
attributes
-
authority
-
streamId
private final int streamId
-
-
Constructor Details
-
NettyServerStream
public NettyServerStream(io.netty.channel.Channel channel, NettyServerStream.TransportState state, Attributes transportAttrs, String authority, StatsTraceContext statsTraceCtx)
-
-
Method Details
-
transportState
Description copied from class:AbstractStreamObtain the transport state corresponding to this stream. Each stream must have its own unique transport state.- Specified by:
transportStatein classAbstractServerStream
-
abstractServerStreamSink
Description copied from class:AbstractServerStreamSink for transport to be called to perform outbound operations. Each stream must have its own unique sink.- Specified by:
abstractServerStreamSinkin classAbstractServerStream
-
getAttributes
Description copied from interface:ServerStreamAttributes describing stream. This is inherited from the transport attributes, and used as the basis ofServerCall.getAttributes().- Specified by:
getAttributesin interfaceServerStream- Overrides:
getAttributesin classAbstractServerStream- Returns:
- Attributes container
-
getAuthority
Description copied from interface:ServerStreamGets the authority this stream is addressed to.- Specified by:
getAuthorityin interfaceServerStream- Overrides:
getAuthorityin classAbstractServerStream- Returns:
- the authority string.
nullif not available.
-
streamId
public int streamId()Description copied from interface:ServerStreamThe HTTP/2 stream id, or-1if not supported.
-