Package org.microproxy.frames
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 processederrorCode- the unsigned 32-bit error codedebugData- 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).
-
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 TypeMethodDescriptionbyte[]Returns the value of thedebugDatarecord component.The debug data as text (malformed UTF-8 replaced).booleanCompares the debug data's content, not the array's identity.longReturns the value of theerrorCoderecord component.The error code's name (Http2Frame.errorName(long)).inthashCode()Returns a hash code value for this object.intReturns the value of thelastStreamIdrecord component.intstreamId()The stream the frame belongs to, or 0 for the connection.toString()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.withDebugData(byte[] data) This frame with other debug data.withErrorCode(long code) This frame with another error code.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
-
GoAway
public GoAway(int lastStreamId, long errorCode, byte[] debugData) Creates GOAWAY.- Parameters:
lastStreamId- the last stream the sender might have processed, 0 or moreerrorCode- the error code, 0 to 2^32-1debugData- the diagnostic data, not copied
-
-
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. -
errorName
The error code's name (Http2Frame.errorName(long)).- Returns:
- the name
-
debugText
The debug data as text (malformed UTF-8 replaced).- Returns:
- the decoded debug data
-
withErrorCode
This frame with another error code.- Parameters:
code- the new error code- Returns:
- a copy with the code
-
withDebugData
This frame with other debug data.- Parameters:
data- the new debug data- Returns:
- a copy with it
-
equals
Compares the debug data's content, not the array's identity. -
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. -
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. -
lastStreamId
public int lastStreamId()Returns the value of thelastStreamIdrecord component.- Returns:
- the value of the
lastStreamIdrecord component
-
errorCode
public long errorCode()Returns the value of theerrorCoderecord component.- Returns:
- the value of the
errorCoderecord component
-
debugData
public byte[] debugData()Returns the value of thedebugDatarecord component.- Returns:
- the value of the
debugDatarecord component
-