Class Http3FrameType

java.lang.Object
io.github.mahmoudimus.http3.Http3FrameType

public final class Http3FrameType extends Object
HTTP/3 frame type codes (RFC 9114 §7.2, §11.2.1).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    CANCEL_PUSH (§7.2.3).
    static final long
    DATA (§7.2.1).
    static final long
    GOAWAY (§7.2.6).
    static final long
    HTTP/2's CONTINUATION, forbidden in HTTP/3.
    static final long
    HTTP/2's PING, forbidden in HTTP/3.
    static final long
    HTTP/2 frame types with no HTTP/3 equivalent: PRIORITY (0x02), PING (0x06), WINDOW_UPDATE (0x08) and CONTINUATION (0x09).
    static final long
    HTTP/2's WINDOW_UPDATE, forbidden in HTTP/3.
    static final long
    HEADERS (§7.2.2).
    static final long
    MAX_PUSH_ID (§7.2.7).
    static final long
    PUSH_PROMISE (§7.2.5).
    static final long
    SETTINGS (§7.2.4).
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isHttp2Only(long type)
    Whether the type is an HTTP/2 frame type that is forbidden in HTTP/3.
    static boolean
    isKnown(long type)
    Whether the type is one this codec parses into its own Http3Frame record.
    static boolean
    isReserved(long value)
    Whether value has the form 0x1f * N + 0x21 that HTTP/3 reserves for greasing frame types, stream types, setting identifiers and error codes (RFC 9114 §7.2.8, §6.2.3, §7.2.4.1, §8.1).
    static String
    name(long type)
    A readable name for a frame type, for messages.
    static long
    reserved(long n)
    The nth reserved value, 0x1f * n + 0x21.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DATA

      public static final long DATA
      DATA (§7.2.1).
      See Also:
    • HEADERS

      public static final long HEADERS
      HEADERS (§7.2.2).
      See Also:
    • CANCEL_PUSH

      public static final long CANCEL_PUSH
      CANCEL_PUSH (§7.2.3).
      See Also:
    • SETTINGS

      public static final long SETTINGS
      SETTINGS (§7.2.4).
      See Also:
    • PUSH_PROMISE

      public static final long PUSH_PROMISE
      PUSH_PROMISE (§7.2.5).
      See Also:
    • GOAWAY

      public static final long GOAWAY
      GOAWAY (§7.2.6).
      See Also:
    • MAX_PUSH_ID

      public static final long MAX_PUSH_ID
      MAX_PUSH_ID (§7.2.7).
      See Also:
    • H2_PRIORITY

      public static final long H2_PRIORITY
      HTTP/2 frame types with no HTTP/3 equivalent: PRIORITY (0x02), PING (0x06), WINDOW_UPDATE (0x08) and CONTINUATION (0x09). Receiving one is a connection error H3_FRAME_UNEXPECTED (RFC 9114 §7.2.8).
      See Also:
    • H2_PING

      public static final long H2_PING
      HTTP/2's PING, forbidden in HTTP/3.
      See Also:
    • H2_WINDOW_UPDATE

      public static final long H2_WINDOW_UPDATE
      HTTP/2's WINDOW_UPDATE, forbidden in HTTP/3.
      See Also:
    • H2_CONTINUATION

      public static final long H2_CONTINUATION
      HTTP/2's CONTINUATION, forbidden in HTTP/3.
      See Also:
  • Method Details

    • isKnown

      public static boolean isKnown(long type)
      Whether the type is one this codec parses into its own Http3Frame record.
      Parameters:
      type - the frame type
      Returns:
      whether it has a record of its own
    • isHttp2Only

      public static boolean isHttp2Only(long type)
      Whether the type is an HTTP/2 frame type that is forbidden in HTTP/3.
      Parameters:
      type - the frame type
      Returns:
      whether HTTP/3 forbids it
    • isReserved

      public static boolean isReserved(long value)
      Whether value has the form 0x1f * N + 0x21 that HTTP/3 reserves for greasing frame types, stream types, setting identifiers and error codes (RFC 9114 §7.2.8, §6.2.3, §7.2.4.1, §8.1). Such values have no meaning and must be ignored.
      Parameters:
      value - the frame type, stream type, setting identifier or error code
      Returns:
      whether it is reserved
    • reserved

      public static long reserved(long n)
      The nth reserved value, 0x1f * n + 0x21.
      Parameters:
      n - which reserved value, from 0
      Returns:
      the value
    • name

      public static String name(long type)
      A readable name for a frame type, for messages.
      Parameters:
      type - the frame type
      Returns:
      its name