Interface Http2ConnectionEncoder

All Superinterfaces:
AutoCloseable, Closeable, Http2DataWriter, Http2FrameWriter
All Known Implementing Classes:
CompressorHttp2ConnectionEncoder, DecoratingHttp2ConnectionEncoder, DefaultHttp2ConnectionEncoder, Http2ControlFrameLimitEncoder, StreamBufferingEncoder

public interface Http2ConnectionEncoder extends Http2FrameWriter
Handler for outbound HTTP/2 traffic.
  • Method Details

    • lifecycleManager

      void lifecycleManager(Http2LifecycleManager lifecycleManager)
      Sets the lifecycle manager. Must be called as part of initialization before the encoder is used.
    • connection

      Http2Connection connection()
      Provides direct access to the underlying connection.
    • flowController

      Http2RemoteFlowController flowController()
      Provides the remote flow controller for managing outbound traffic.
    • frameWriter

      Http2FrameWriter frameWriter()
      Provides direct access to the underlying frame writer object.
    • pollSentSettings

      Http2Settings pollSentSettings()
      Gets the local settings on the top of the queue that has been sent but not ACKed. This may return null.
    • remoteSettings

      void remoteSettings(Http2Settings settings) throws Http2Exception
      Sets the settings for the remote endpoint of the HTTP/2 connection.
      Throws:
      Http2Exception
    • writeFrame

      ChannelFuture writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload, ChannelPromise promise)
      Writes the given data to the internal Http2FrameWriter without performing any state checks on the connection/stream.
      Specified by:
      writeFrame in interface Http2FrameWriter
      Parameters:
      ctx - the context to use for writing.
      frameType - the frame type identifier.
      streamId - the stream for which to send the frame.
      flags - the flags to write for this frame.
      payload - the payload to write for this frame. This will be released by this method.
      promise - the promise for the write.
      Returns:
      the future for the write.