Package io.grpc.netty

Class NettyServerStream.TransportState

All Implemented Interfaces:
ApplicationThreadDeframer.TransportExecutor, ApplicationThreadDeframerListener.TransportExecutor, MessageDeframer.Listener, StreamIdHolder
Enclosing class:
NettyServerStream

public static class NettyServerStream.TransportState extends AbstractServerStream.TransportState implements StreamIdHolder
This should only be called from the transport thread.
  • Field Details

    • http2Stream

      private final io.netty.handler.codec.http2.Http2Stream http2Stream
    • handler

      private final NettyServerHandler handler
    • eventLoop

      private final io.netty.channel.EventLoop eventLoop
    • tag

      private final io.perfmark.Tag tag
  • Constructor Details

  • Method Details

    • runOnTransportThread

      public void runOnTransportThread(Runnable r)
      Specified by:
      runOnTransportThread in interface ApplicationThreadDeframerListener.TransportExecutor
    • bytesRead

      public void bytesRead(int processedBytes)
      Description copied from interface: MessageDeframer.Listener
      Called when the given number of bytes has been read from the input source of the deframer. This is typically used to indicate to the underlying transport that more data can be accepted.
      Specified by:
      bytesRead in interface MessageDeframer.Listener
      Parameters:
      processedBytes - the number of bytes read from the deframer's input source.
    • deframeFailed

      public void deframeFailed(Throwable cause)
      Description copied from interface: MessageDeframer.Listener
      Called when a MessageDeframer.deframe(ReadableBuffer) operation failed.
      Specified by:
      deframeFailed in interface MessageDeframer.Listener
      Parameters:
      cause - the actual failure
    • onWriteFrameData

      private void onWriteFrameData(io.netty.channel.ChannelFuture future, int numMessages, int numBytes)
    • handleWriteFutureFailures

      private void handleWriteFutureFailures(io.netty.channel.ChannelFuture future)
    • http2ProcessingFailed

      protected void http2ProcessingFailed(Status status)
      Called to process a failure in HTTP/2 processing.
    • inboundDataReceived

      void inboundDataReceived(io.netty.buffer.ByteBuf frame, boolean endOfStream)
    • id

      public int id()
      Description copied from interface: StreamIdHolder
      Returns the id.
      Specified by:
      id in interface StreamIdHolder
    • tag

      public io.perfmark.Tag tag()
      Specified by:
      tag in interface StreamIdHolder