Record Class Frame.Ping

java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.Ping
Record Components:
ack - whether this acknowledges a peer PING
opaqueData - the eight opaque octets represented as a big-endian long
All Implemented Interfaces:
Frame
Enclosing interface:
Frame

public static record Frame.Ping(boolean ack, long opaqueData) extends Record implements Frame
PING (§6.7). The 8 opaque octets are carried as a big-endian long.
  • Constructor Details

    • Ping

      public Ping(boolean ack, long opaqueData)
      Creates an instance of a Ping record class.
      Parameters:
      ack - the value for the ack record component
      opaqueData - the value for the opaqueData record component
  • Method Details

    • streamId

      public int streamId()
      Description copied from interface: Frame
      The stream this frame belongs to, or 0 for the connection.
      Specified by:
      streamId in interface Frame
      Returns:
      the stream identifier, or 0 for the connection
    • type

      public int type()
      Description copied from interface: Frame
      The frame type code, one of the FrameType constants (or any value for Frame.Unknown).
      Specified by:
      type in interface Frame
      Returns:
      the unsigned frame type code
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ack

      public boolean ack()
      Returns the value of the ack record component.
      Returns:
      the value of the ack record component
    • opaqueData

      public long opaqueData()
      Returns the value of the opaqueData record component.
      Returns:
      the value of the opaqueData record component