Package org.microproxy.frames
Record Class Http2Frame.Settings
java.lang.Object
java.lang.Record
org.microproxy.frames.Http2Frame.Settings
- Record Components:
ack- whether this acknowledges the peer's SETTINGSvalues- setting identifiers and their unsigned 32-bit values
- All Implemented Interfaces:
Http2Frame,HttpFrame
- Enclosing interface:
Http2Frame
public static record Http2Frame.Settings(boolean ack, Map<Integer,Long> values)
extends Record
implements Http2Frame
SETTINGS (section 6.5): the identifiers and values the frame carries, in order. An
acknowledgement carries none.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanack()Returns the value of theackrecord component.final booleanIndicates whether some other object is "equal to" this one.get(int id) A setting's value in this frame.final inthashCode()Returns a hash code value for this object.intstreamId()The stream the frame belongs to, or 0 for the connection.final StringtoString()Returns a string representation of this record class.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.values()Returns the value of thevaluesrecord component.withoutValue(int id) This frame without one setting.withValue(int id, long value) This frame with one setting set.withValues(Map<Integer, Long> newValues) This frame with other settings.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
-
Settings
Creates SETTINGS.- Parameters:
ack- whether this acknowledges the peer's SETTINGSvalues- setting identifiers (0 to 65535) and values (0 to 2^32-1), copied; empty for an ACK
-
-
Method Details
-
streamId
public int streamId()Description copied from interface:Http2FrameThe stream the frame belongs to, or 0 for the connection.- Specified by:
streamIdin interfaceHttp2Frame- Returns:
- the stream identifier
-
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. -
get
A setting's value in this frame.- Parameters:
id- the setting identifier- Returns:
- the value, or null if the frame does not carry it
-
withValue
This frame with one setting set.- Parameters:
id- the setting identifiervalue- the value- Returns:
- a copy with the setting
-
withoutValue
This frame without one setting.- Parameters:
id- the setting identifier- Returns:
- a copy without it
-
withValues
This frame with other settings.- Parameters:
newValues- the settings- Returns:
- a copy with them
-
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
-