Package io.github.mahmoudimus.http2
Record Class Frame.Ping
java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.Ping
- Record Components:
ack- whether this acknowledges a peer PINGopaqueData- the eight opaque octets represented as a big-endian long
- All Implemented Interfaces:
Frame
- Enclosing interface:
Frame
PING (§6.7). The 8 opaque octets are carried as a big-endian long.
-
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
ConstructorsConstructorDescriptionPing(boolean ack, long opaqueData) Creates an instance of aPingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanack()Returns the value of theackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theopaqueDatarecord component.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).
-
Constructor Details
-
Ping
public Ping(boolean ack, long opaqueData) Creates an instance of aPingrecord class.- Parameters:
ack- the value for theackrecord componentopaqueData- the value for theopaqueDatarecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
ack
public boolean ack()Returns the value of theackrecord component.- Returns:
- the value of the
ackrecord component
-
opaqueData
public long opaqueData()Returns the value of theopaqueDatarecord component.- Returns:
- the value of the
opaqueDatarecord component
-