Enum Class WebSocketCloseCode
- All Implemented Interfaces:
Serializable,Comparable<WebSocketCloseCode>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionApplication max value.Application min value.Server acting as gateway received an invalid response.Endpoint received an unsupported frame (e.g. binary-only endpoint received text frame).No close code frame has been received.Client is leaving (browser tab closing).Client wanted an extension which server did not negotiate.Expected close status, received none.Code to use withScxWebSocket.close(int, String)to indicate normal close operation.Endpoint received inconsistent message (e.g. malformed UTF-8).Endpoint received a malformed frame.Registered at IANA max value.Registered at IANA min value.Reserved for extensions max value.Reserved for extensions min value.Reserved for later max value.Reserved for later min value.Server/service is restarting.Transport Layer Security handshake failure.Endpoint won't process large frame.Temporary server condition forced blocking client's request.Internal server error while operating.Generic code used for situations other than 1003 and 1009. -
Method Summary
Modifier and TypeMethodDescriptionintcode()reason()static WebSocketCloseCodeReturns the enum constant of this class with the specified name.static WebSocketCloseCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL_CLOSE
Code to use withScxWebSocket.close(int, String)to indicate normal close operation. -
GOING_AWAY
Client is leaving (browser tab closing). -
PROTOCOL_ERROR
Endpoint received a malformed frame. -
CANNOT_ACCEPT
Endpoint received an unsupported frame (e.g. binary-only endpoint received text frame). -
NO_STATUS_CODE
Expected close status, received none. -
CLOSED_ABNORMALLY
No close code frame has been received. -
NOT_CONSISTENT
Endpoint received inconsistent message (e.g. malformed UTF-8). -
VIOLATED_POLICY
Generic code used for situations other than 1003 and 1009. -
TOO_BIG
Endpoint won't process large frame. -
NO_EXTENSION
Client wanted an extension which server did not negotiate. -
UNEXPECTED_CONDITION
Internal server error while operating. -
SERVICE_RESTART
Server/service is restarting. -
TRY_AGAIN_LATER
Temporary server condition forced blocking client's request. -
BAD_GATEWAY
Server acting as gateway received an invalid response. -
TLS_HANDSHAKE_FAIL
Transport Layer Security handshake failure. -
RESERVED_FOR_LATER_MIN
Reserved for later min value. -
RESERVED_FOR_LATER_MAX
Reserved for later max value. -
RESERVED_FOR_EXTENSIONS_MIN
Reserved for extensions min value. -
RESERVED_FOR_EXTENSIONS_MAX
Reserved for extensions max value. -
REGISTERED_AT_IANA_MIN
Registered at IANA min value. -
REGISTERED_AT_IANA_MAX
Registered at IANA max value. -
APPLICATION_MIN
Application min value. -
APPLICATION_MAX
Application max value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
code
public int code() -
reason
-