Package io.github.mahmoudimus.http2
Record Class Frame.Unknown
java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.Unknown
- Record Components:
type- the extension frame type code from 10 to 255flags- the raw eight-bit flagsstreamId- the stream identifier, or 0 for the connectionpayload- the payload bytes, retained without copying
- All Implemented Interfaces:
Frame
- Enclosing interface:
Frame
public static record Frame.Unknown(int type, int flags, int streamId, byte[] payload)
extends Record
implements Frame
A frame of a type this codec does not know (an extension). The reader discards these unless
FrameReader.setDeliverUnknownFrames(boolean) asks for them; either way they must not
change any state (§5.5).-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.mahmoudimus.http2.Frame
Frame.Continuation, Frame.Data, Frame.GoAway, Frame.Headers, Frame.Ping, Frame.Priority, Frame.PrioritySpec, Frame.PushPromise, Frame.RstStream, Frame.Settings, Frame.Unknown, Frame.WindowUpdate -
Field Summary
Fields inherited from interface io.github.mahmoudimus.http2.Frame
MAX_STREAM_ID -
Constructor Summary
ConstructorsConstructorDescriptionUnknown(int type, int flags, int streamId, byte[] payload) Creates an extension frame with an eight-bit type and flags. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.byte[]payload()Returns the value of thepayloadrecord component.intstreamId()Returns the value of thestreamIdrecord component.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Constructor Details
-
Unknown
public Unknown(int type, int flags, int streamId, byte[] payload) Creates an extension frame with an eight-bit type and flags.- Parameters:
type- the extension frame type code from 10 to 255flags- the raw eight-bit flagsstreamId- the stream identifier, or 0 for the connectionpayload- the payload bytes, retained without copying
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
public int type()Returns the value of thetyperecord 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. -
payload
public byte[] payload()Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-