Package io.github.mahmoudimus.http2
Record Class Frame.Settings
java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.Settings
- Record Components:
ack- whether this acknowledges the peer settingsvalues- setting identifiers and unsigned 32-bit values; empty for an ACK
- All Implemented Interfaces:
Frame
- Enclosing interface:
Frame
public static record Frame.Settings(boolean ack, Map<Integer,Long> values)
extends Record
implements Frame
SETTINGS (§6.5).
values maps setting identifiers to their (unsigned 32-bit) values in
the order they first appeared; a repeated identifier keeps its last value, which is what
processing them in order would give. Unknown identifiers are kept so callers can see them,
and must be ignored. An ACK has no values.-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanack()Returns the value of theackrecord component.static Frame.SettingsThe acknowledgement of a peer's SETTINGS.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intstreamId()The stream this frame belongs to, or 0 for the connection.final StringtoString()Returns a string representation of this record class.inttype()The frame type code, one of theFrameTypeconstants (or any value forFrame.Unknown).values()Returns the value of thevaluesrecord component.
-
Constructor Details
-
Settings
Creates SETTINGS with an immutable copy of its values.- Parameters:
ack- whether this acknowledges the peer settingsvalues- setting identifiers and unsigned 32-bit values; empty for an ACK
-
-
Method Details
-
acknowledgement
The acknowledgement of a peer's SETTINGS.- Returns:
- an empty SETTINGS frame with ACK set
-
streamId
public int streamId()Description copied from interface:FrameThe stream this frame belongs to, or 0 for the connection. -
type
public int type()Description copied from interface:FrameThe frame type code, one of theFrameTypeconstants (or any value forFrame.Unknown). -
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 '=='. -
ack
public boolean ack()Returns the value of theackrecord component.- Returns:
- the value of the
ackrecord component
-
values
Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-