Record Class Http2Frame.Unknown

java.lang.Object
java.lang.Record
org.microproxy.frames.Http2Frame.Unknown
Record Components:
type - the type code, 10 to 255
flags - the flags, 0 to 255
streamId - the stream, or 0 for the connection
payload - the payload, not copied
All Implemented Interfaces:
Http2Frame, HttpFrame
Enclosing interface:
Http2Frame

public static record Http2Frame.Unknown(int type, int flags, int streamId, byte[] payload) extends Record implements Http2Frame
A frame of an extension type (section 5.5), such as ALTSVC (10) or PRIORITY_UPDATE (16).
  • Constructor Details

    • Unknown

      public Unknown(int type, int flags, int streamId, byte[] payload)
      Creates an extension frame.
      Parameters:
      type - the type code, 10 to 255
      flags - the flags, 0 to 255
      streamId - the stream, or 0
      payload - the payload, not copied
  • Method Details

    • typeName

      public String typeName()
      Description copied from interface: HttpFrame
      The frame type's name as the protocol's RFC spells it (DATA, HEADERS, SETTINGS, ...), or UNKNOWN for an extension or reserved type.
      Specified by:
      typeName in interface HttpFrame
      Returns:
      the frame type name
    • typeCode

      public long typeCode()
      Description copied from interface: HttpFrame
      The frame type's code on the wire.
      Specified by:
      typeCode in interface HttpFrame
      Returns:
      the unsigned type code
    • withPayload

      public Http2Frame.Unknown withPayload(byte[] newPayload)
      This frame with another payload.
      Parameters:
      newPayload - the new payload
      Returns:
      a copy with it
    • equals

      public boolean equals(Object o)
      Compares the payload's content, not the array's identity.
      Specified by:
      equals in class Record
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • type

      public int type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • flags

      public int flags()
      Returns the value of the flags record component.
      Returns:
      the value of the flags record component
    • streamId

      public int streamId()
      Returns the value of the streamId record component.
      Specified by:
      streamId in interface Http2Frame
      Returns:
      the value of the streamId record component
    • payload

      public byte[] payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component