Record Class WebsocketCloseReason
java.lang.Object
java.lang.Record
io.fluxzero.sdk.common.websocket.WebsocketCloseReason
- Record Components:
code- the numeric WebSocket close status codereason- the optional close reason, normalized to an empty string whennull
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intStandard close code used when an endpoint is going away.static final intSynthetic close code used when no status code was received from the peer.static final intStandard close code for a normal, intentional shutdown.static final intStandard close code used when the client aborts because an unexpected condition occurred. -
Constructor Summary
ConstructorsConstructorDescriptionWebsocketCloseReason(int code, String reason) Creates an instance of aWebsocketCloseReasonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
NORMAL_CLOSURE
public static final int NORMAL_CLOSUREStandard close code for a normal, intentional shutdown.- See Also:
-
GOING_AWAY
public static final int GOING_AWAYStandard close code used when an endpoint is going away.- See Also:
-
NO_STATUS_CODE
public static final int NO_STATUS_CODESynthetic close code used when no status code was received from the peer.- See Also:
-
UNEXPECTED_CONDITION
public static final int UNEXPECTED_CONDITIONStandard close code used when the client aborts because an unexpected condition occurred.- See Also:
-
-
Constructor Details
-
WebsocketCloseReason
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
code
-
reason
-