Class FrameType

java.lang.Object
io.github.mahmoudimus.http2.FrameType

public final class FrameType extends Object
Frame type codes (RFC 9113 §6) and frame flags.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The frame type for a continued field block.
    static final int
    The frame type for stream content.
    static final int
    SETTINGS, PING: an acknowledgement.
    static final int
    HEADERS, PUSH_PROMISE, CONTINUATION: the field block is complete.
    static final int
    DATA, HEADERS: the last frame the sender will send on the stream.
    static final int
    DATA, HEADERS, PUSH_PROMISE: the payload starts with a pad length and ends in padding.
    static final int
    HEADERS: the payload carries a (deprecated) priority signal.
    static final int
    The size of every frame header.
    static final int
    The frame type for connection shutdown.
    static final int
    The frame type for a header field block fragment.
    static final int
    The extension frame type by which a server names the origins it serves on a connection (RFC 8336).
    static final int
    The frame type for a connection probe.
    static final int
    The frame type for a deprecated priority signal.
    static final int
    The frame type for a promised stream and field block.
    static final int
    The frame type for stream termination.
    static final int
    The frame type for connection settings.
    static final int
    The frame type for flow-control credit.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    name(int type)
    A readable name for a frame type code, for messages.

    Methods inherited from class java.lang.Object

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

    • DATA

      public static final int DATA
      The frame type for stream content.
      See Also:
    • HEADERS

      public static final int HEADERS
      The frame type for a header field block fragment.
      See Also:
    • PRIORITY

      public static final int PRIORITY
      The frame type for a deprecated priority signal.
      See Also:
    • RST_STREAM

      public static final int RST_STREAM
      The frame type for stream termination.
      See Also:
    • SETTINGS

      public static final int SETTINGS
      The frame type for connection settings.
      See Also:
    • PUSH_PROMISE

      public static final int PUSH_PROMISE
      The frame type for a promised stream and field block.
      See Also:
    • PING

      public static final int PING
      The frame type for a connection probe.
      See Also:
    • GOAWAY

      public static final int GOAWAY
      The frame type for connection shutdown.
      See Also:
    • WINDOW_UPDATE

      public static final int WINDOW_UPDATE
      The frame type for flow-control credit.
      See Also:
    • CONTINUATION

      public static final int CONTINUATION
      The frame type for a continued field block.
      See Also:
    • ORIGIN

      public static final int ORIGIN
      The extension frame type by which a server names the origins it serves on a connection (RFC 8336). It is not one of RFC 9113's types: FrameReader returns it as a Frame.Unknown, which OriginFrame reads.
      See Also:
    • FLAG_END_STREAM

      public static final int FLAG_END_STREAM
      DATA, HEADERS: the last frame the sender will send on the stream.
      See Also:
    • FLAG_ACK

      public static final int FLAG_ACK
      SETTINGS, PING: an acknowledgement.
      See Also:
    • FLAG_END_HEADERS

      public static final int FLAG_END_HEADERS
      HEADERS, PUSH_PROMISE, CONTINUATION: the field block is complete.
      See Also:
    • FLAG_PADDED

      public static final int FLAG_PADDED
      DATA, HEADERS, PUSH_PROMISE: the payload starts with a pad length and ends in padding.
      See Also:
    • FLAG_PRIORITY

      public static final int FLAG_PRIORITY
      HEADERS: the payload carries a (deprecated) priority signal.
      See Also:
    • FRAME_HEADER_LENGTH

      public static final int FRAME_HEADER_LENGTH
      The size of every frame header.
      See Also:
  • Method Details

    • name

      public static String name(int type)
      A readable name for a frame type code, for messages.
      Parameters:
      type - the frame type code
      Returns:
      the standard type name, or UNKNOWN with its hexadecimal code