Interface Http2SubProtocolSelector.SubProtocolHandler

Enclosing interface:
Http2SubProtocolSelector

public static interface Http2SubProtocolSelector.SubProtocolHandler
Handler of a sub-protocol.
  • Method Details

    • init

      void init()
      Called once the sub-protocol handler is available. Always dispatched on the HTTP/2 stream thread.
    • close

      default void close()
      Release resources when the stream handler exits or its connection closes, including after normal completion. Called at most once for this stream, on either the HTTP/2 connection thread or the stream thread. This may happen before or concurrently with init() or other callbacks. Implementations must tolerate an already completed or cancelled operation and must not block the calling thread or write further frames. The default implementation does nothing.
    • streamState

      Http2StreamState streamState()
      Current stream state.
      Returns:
      stream state
    • rstStream

      void rstStream(Http2RstStream rstStream)
      RST stream was received. Note that this method will be dispatched on the HTTP/2 connection thread, not the stream thread.
      Parameters:
      rstStream - RST stream frame
    • windowUpdate

      void windowUpdate(Http2WindowUpdate update)
      Window update was received. Note that this method will be dispatched on the HTTP/2 connection thread, not the stream thread.
      Parameters:
      update - window update frame
    • data

      void data(Http2FrameHeader header, BufferData data)
      Data was received. Always dispatched on the HTTP/2 stream thread. The data may be empty. Check the Http2FrameHeader.flags(io.helidon.http.http2.Http2FrameTypes) if this is Http2Flag.END_OF_STREAM to identify if this is the last data incoming.
      Parameters:
      header - frame header
      data - frame data