Package org.microproxy.frames
Record Class Http3Frame.Unknown
java.lang.Object
java.lang.Record
org.microproxy.frames.Http3Frame.Unknown
- Record Components:
type- the type codepayload- the payload, not copied
- All Implemented Interfaces:
Http3Frame,HttpFrame
- Enclosing interface:
Http3Frame
public static record Http3Frame.Unknown(long type, byte[] payload)
extends Record
implements Http3Frame
A frame of an extension or reserved type, such as a grease frame (type
0x1f * N +
0x21) or PRIORITY_UPDATE (RFC 9218).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.microproxy.frames.Http3Frame
Http3Frame.CancelPush, Http3Frame.Data, Http3Frame.GoAway, Http3Frame.Headers, Http3Frame.MaxPushId, Http3Frame.PushPromise, Http3Frame.Settings, Http3Frame.Unknown -
Field Summary
Fields inherited from interface org.microproxy.frames.Http3Frame
MAX_VARINT, SETTINGS_ENABLE_CONNECT_PROTOCOL, SETTINGS_H3_DATAGRAM, SETTINGS_MAX_FIELD_SECTION_SIZE, SETTINGS_QPACK_BLOCKED_STREAMS, SETTINGS_QPACK_MAX_TABLE_CAPACITY, TYPE_CANCEL_PUSH, TYPE_DATA, TYPE_GOAWAY, TYPE_HEADERS, TYPE_MAX_PUSH_ID, TYPE_PUSH_PROMISE, TYPE_SETTINGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the payload's content, not the array's identity.inthashCode()Returns a hash code value for this object.booleanWhether the type is reserved for greasing (0x1f * N + 0x21).byte[]payload()Returns the value of thepayloadrecord component.toString()Returns a string representation of this record class.longtype()Returns the value of thetyperecord component.longtypeCode()The frame type's code on the wire.typeName()The frame type's name as the protocol's RFC spells it (DATA,HEADERS,SETTINGS, ...), orUNKNOWNfor an extension or reserved type.withPayload(byte[] newPayload) This frame with another payload.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.microproxy.frames.Http3Frame
protocol
-
Constructor Details
-
Unknown
public Unknown(long type, byte[] payload) Creates an extension frame.- Parameters:
type- the type code: 0 to 2^62-1, not a type HTTP/3 defines (0x00, 0x01, 0x03, 0x04, 0x05, 0x07, 0x0d) or forbids as HTTP/2's (0x02, 0x06, 0x08, 0x09)payload- the payload, not copied
-
-
Method Details
-
typeName
Description copied from interface:HttpFrameThe frame type's name as the protocol's RFC spells it (DATA,HEADERS,SETTINGS, ...), orUNKNOWNfor an extension or reserved type. -
typeCode
public long typeCode()Description copied from interface:HttpFrameThe frame type's code on the wire. -
isReserved
public boolean isReserved()Whether the type is reserved for greasing (0x1f * N + 0x21).- Returns:
- whether the frame is grease
-
withPayload
This frame with another payload.- Parameters:
newPayload- the new payload- Returns:
- a copy with it
-
equals
Compares the payload's content, not the array's identity. -
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. -
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. -
type
public long type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
payload
public byte[] payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-