Record Class Http2Frame.GoAway

java.lang.Object
java.lang.Record
org.microproxy.frames.Http2Frame.GoAway
Record Components:
lastStreamId - the last stream the sender might have processed
errorCode - the unsigned 32-bit error code
debugData - the diagnostic data, not copied
All Implemented Interfaces:
Http2Frame, HttpFrame
Enclosing interface:
Http2Frame

public static record Http2Frame.GoAway(int lastStreamId, long errorCode, byte[] debugData) extends Record implements Http2Frame
GOAWAY (section 6.8).
  • Constructor Details

    • GoAway

      public GoAway(int lastStreamId, long errorCode, byte[] debugData)
      Creates GOAWAY.
      Parameters:
      lastStreamId - the last stream the sender might have processed, 0 or more
      errorCode - the error code, 0 to 2^32-1
      debugData - the diagnostic data, not copied
  • Method Details

    • streamId

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

      public String typeName()
      Description copied from interface: HttpFrame
      The frame type's name as the protocol's RFC spells it (DATA, HEADERS, SETTINGS, ...), or UNKNOWN for an extension or reserved type.
      Specified by:
      typeName in interface HttpFrame
      Returns:
      the frame type name
    • typeCode

      public long typeCode()
      Description copied from interface: HttpFrame
      The frame type's code on the wire.
      Specified by:
      typeCode in interface HttpFrame
      Returns:
      the unsigned type code
    • errorName

      public String errorName()
      The error code's name (Http2Frame.errorName(long)).
      Returns:
      the name
    • debugText

      public String debugText()
      The debug data as text (malformed UTF-8 replaced).
      Returns:
      the decoded debug data
    • withErrorCode

      public Http2Frame.GoAway withErrorCode(long code)
      This frame with another error code.
      Parameters:
      code - the new error code
      Returns:
      a copy with the code
    • withDebugData

      public Http2Frame.GoAway withDebugData(byte[] data)
      This frame with other debug data.
      Parameters:
      data - the new debug data
      Returns:
      a copy with it
    • equals

      public boolean equals(Object o)
      Compares the debug data's content, not the array's identity.
      Specified by:
      equals in class Record
    • hashCode

      public 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
    • toString

      public 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
    • lastStreamId

      public int lastStreamId()
      Returns the value of the lastStreamId record component.
      Returns:
      the value of the lastStreamId record component
    • errorCode

      public long errorCode()
      Returns the value of the errorCode record component.
      Returns:
      the value of the errorCode record component
    • debugData

      public byte[] debugData()
      Returns the value of the debugData record component.
      Returns:
      the value of the debugData record component