Package org.microproxy.frames
Record Class Http2Frame.Unknown
java.lang.Object
java.lang.Record
org.microproxy.frames.Http2Frame.Unknown
- Record Components:
type- the type code, 10 to 255flags- the flags, 0 to 255streamId- the stream, or 0 for the connectionpayload- 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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.microproxy.frames.Http2Frame
Http2Frame.Data, Http2Frame.GoAway, Http2Frame.Headers, Http2Frame.Ping, Http2Frame.Priority, Http2Frame.PushPromise, Http2Frame.RstStream, Http2Frame.Settings, Http2Frame.Unknown, Http2Frame.WindowUpdate -
Field Summary
Fields inherited from interface org.microproxy.frames.Http2Frame
ERROR_NAMES, SETTING_NAMES, SETTINGS_ENABLE_CONNECT_PROTOCOL, SETTINGS_ENABLE_PUSH, SETTINGS_HEADER_TABLE_SIZE, SETTINGS_INITIAL_WINDOW_SIZE, SETTINGS_MAX_CONCURRENT_STREAMS, SETTINGS_MAX_FRAME_SIZE, SETTINGS_MAX_HEADER_LIST_SIZE, TYPE_CONTINUATION, TYPE_DATA, TYPE_GOAWAY, TYPE_HEADERS, TYPE_PING, TYPE_PRIORITY, TYPE_PUSH_PROMISE, TYPE_RST_STREAM, TYPE_SETTINGS, TYPE_WINDOW_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionUnknown(int type, int flags, int streamId, byte[] payload) Creates an extension frame. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares the payload's content, not the array's identity.intflags()Returns the value of theflagsrecord component.inthashCode()Returns a hash code value for this object.byte[]payload()Returns the value of thepayloadrecord component.intstreamId()Returns the value of thestreamIdrecord component.toString()Returns a string representation of this record class.inttype()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.Http2Frame
protocol
-
Constructor Details
-
Unknown
public Unknown(int type, int flags, int streamId, byte[] payload) Creates an extension frame.- Parameters:
type- the type code, 10 to 255flags- the flags, 0 to 255streamId- the stream, or 0payload- 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. -
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 int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
streamId
public int streamId()Returns the value of thestreamIdrecord component.- Specified by:
streamIdin interfaceHttp2Frame- Returns:
- the value of the
streamIdrecord component
-
payload
public byte[] payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-