Record Class ConnectionError
java.lang.Object
java.lang.Record
io.github.mahmoudimus.quic.connection.ConnectionError
- Record Components:
kind- what ended itcode- the error code: a transport error code (RFC 9000 section 20) forConnectionError.Kind.TRANSPORT_ERRORandConnectionError.Kind.CONNECTION_CLOSED, an application code forConnectionError.Kind.APPLICATION_CLOSEDandConnectionError.Kind.LOCALLY_CLOSED; 0 otherwiseframeType- the frame type a transport error was about, or 0reason- the reason phrase, possibly empty
public record ConnectionError(ConnectionError.Kind kind, long code, long frameType, String reason)
extends Record
Why a connection ended.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConnectionError(ConnectionError.Kind kind, long code, long frameType, String reason) The error. -
Method Summary
Modifier and TypeMethodDescriptionlongcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theframeTyperecord component.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.static ConnectionErrorof(ConnectionError.Kind kind) An error of a kind that has no code.reason()Returns the value of thereasonrecord component.toString()Returns a string representation of this record class.static ConnectionErrorA protocol error this endpoint detected.
-
Constructor Details
-
ConnectionError
The error.- Parameters:
kind- what ended the connectioncode- the error codeframeType- the frame type, or 0reason- the reason phrase
-
-
Method Details
-
of
An error of a kind that has no code.- Parameters:
kind- the kind- Returns:
- the error
-
transport
A protocol error this endpoint detected.- Parameters:
e- the error- Returns:
- the error
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
code
public long code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
frameType
public long frameType()Returns the value of theframeTyperecord component.- Returns:
- the value of the
frameTyperecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-