Package io.github.mahmoudimus.http2
Record Class Frame.RstStream
java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.RstStream
- Record Components:
streamId- the nonzero stream identifiererrorCode- the raw 32-bit error code
- All Implemented Interfaces:
Frame
- Enclosing interface:
Frame
RST_STREAM (§6.4).
errorCode is the raw wire value; see error().-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.error()Interprets the raw wire error code.intReturns the value of theerrorCoderecord component.final inthashCode()Returns a hash code value for this object.intstreamId()Returns the value of thestreamIdrecord component.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
-
RstStream
public RstStream(int streamId, int errorCode) Creates RST_STREAM for a nonzero stream.- Parameters:
streamId- the nonzero stream identifiererrorCode- the raw 32-bit error code
-
RstStream
Creates a frame with the given error code.- Parameters:
streamId- the nonzero stream identifiererror- the error code to send
-
-
Method Details
-
type
public int type()Description copied from interface:FrameThe frame type code, one of theFrameTypeconstants (or any value forFrame.Unknown). -
error
Interprets the raw wire error code.- Returns:
- the known code, or INTERNAL_ERROR for an unknown value
-
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 '=='. -
streamId
public int streamId()Returns the value of thestreamIdrecord component. -
errorCode
public int errorCode()Returns the value of theerrorCoderecord component.- Returns:
- the value of the
errorCoderecord component
-