Interface Http3Frame

All Superinterfaces:
HttpFrame
All Known Implementing Classes:
Http3Frame.CancelPush, Http3Frame.Data, Http3Frame.GoAway, Http3Frame.Headers, Http3Frame.MaxPushId, Http3Frame.PushPromise, Http3Frame.Settings, Http3Frame.Unknown

An HTTP/3 frame (RFC 9114 section 7.2) as a FrameInterceptor sees it, decoded, with header sections as field lists (Field) decoded through QPACK. HTTP/3 frames carry no stream id or flags: the QUIC stream they travel on says which stream, and its end ends the message; FrameContext.streamId() names the stream.

The proxy shows these frames to a FrameInterceptor live where it speaks HTTP/3 (a reverse proxy's HTTP/3 listener, and connections to HTTP/3 servers), and an Http3FramePipeline runs an interceptor over the bytes of HTTP/3 streams relayed by other means. Records are immutable apart from their byte arrays, which are not copied; edit a frame with its with... methods.

  • Field Details

    • TYPE_DATA

      static final long TYPE_DATA
      The type code of DATA.
      See Also:
    • TYPE_HEADERS

      static final long TYPE_HEADERS
      The type code of HEADERS.
      See Also:
    • TYPE_CANCEL_PUSH

      static final long TYPE_CANCEL_PUSH
      The type code of CANCEL_PUSH.
      See Also:
    • TYPE_SETTINGS

      static final long TYPE_SETTINGS
      The type code of SETTINGS.
      See Also:
    • TYPE_PUSH_PROMISE

      static final long TYPE_PUSH_PROMISE
      The type code of PUSH_PROMISE.
      See Also:
    • TYPE_GOAWAY

      static final long TYPE_GOAWAY
      The type code of GOAWAY.
      See Also:
    • TYPE_MAX_PUSH_ID

      static final long TYPE_MAX_PUSH_ID
      The type code of MAX_PUSH_ID.
      See Also:
    • SETTINGS_QPACK_MAX_TABLE_CAPACITY

      static final long SETTINGS_QPACK_MAX_TABLE_CAPACITY
      SETTINGS_QPACK_MAX_TABLE_CAPACITY (RFC 9204).
      See Also:
    • SETTINGS_MAX_FIELD_SECTION_SIZE

      static final long SETTINGS_MAX_FIELD_SECTION_SIZE
      SETTINGS_MAX_FIELD_SECTION_SIZE.
      See Also:
    • SETTINGS_QPACK_BLOCKED_STREAMS

      static final long SETTINGS_QPACK_BLOCKED_STREAMS
      SETTINGS_QPACK_BLOCKED_STREAMS (RFC 9204).
      See Also:
    • SETTINGS_ENABLE_CONNECT_PROTOCOL

      static final long SETTINGS_ENABLE_CONNECT_PROTOCOL
      SETTINGS_ENABLE_CONNECT_PROTOCOL (RFC 9220).
      See Also:
    • SETTINGS_H3_DATAGRAM

      static final long SETTINGS_H3_DATAGRAM
      SETTINGS_H3_DATAGRAM (RFC 9297).
      See Also:
    • MAX_VARINT

      static final long MAX_VARINT
      The largest variable-length integer, 2^62-1.
      See Also:
  • Method Details

    • protocol

      default FrameProtocol protocol()
      Description copied from interface: HttpFrame
      The protocol the frame belongs to.
      Specified by:
      protocol in interface HttpFrame
      Returns:
      FrameProtocol.HTTP_2 or FrameProtocol.HTTP_3
    • data

      static Http3Frame.Data data(byte[] data)
      A DATA frame to inject.
      Parameters:
      data - the content
      Returns:
      the frame
    • headers

      static Http3Frame.Headers headers(List<Field> fields)
      A HEADERS frame to inject.
      Parameters:
      fields - the field section, pseudo-headers first
      Returns:
      the frame
    • unknown

      static Http3Frame.Unknown unknown(long type, byte[] payload)
      A frame of an extension type to inject; peers ignore types they do not know.
      Parameters:
      type - the type code, not one HTTP/3 defines or reserves for HTTP/2
      payload - the payload
      Returns:
      the frame
    • settingName

      static String settingName(long id)
      The name of a setting without its SETTINGS_ prefix, or its hexadecimal identifier for another one.
      Parameters:
      id - the setting identifier
      Returns:
      a name such as QPACK_MAX_TABLE_CAPACITY, or 0x...
    • settingId

      static long settingId(String name)
      The identifier of a setting named as settingName(long) names it (a SETTINGS_ prefix is allowed), or written as a number.
      Parameters:
      name - the setting's name or number
      Returns:
      the identifier
      Throws:
      IllegalArgumentException - for a name that is neither