Package jakarta.websocket
Enum CloseReason.CloseCodes
- java.lang.Object
-
- java.lang.Enum<CloseReason.CloseCodes>
-
- jakarta.websocket.CloseReason.CloseCodes
-
- All Implemented Interfaces:
CloseReason.CloseCode
,java.io.Serializable
,java.lang.Comparable<CloseReason.CloseCodes>
- Enclosing class:
- CloseReason
public static enum CloseReason.CloseCodes extends java.lang.Enum<CloseReason.CloseCodes> implements CloseReason.CloseCode
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANNOT_ACCEPT
CLOSED_ABNORMALLY
GOING_AWAY
NO_EXTENSION
NO_STATUS_CODE
NORMAL_CLOSURE
NOT_CONSISTENT
PROTOCOL_ERROR
RESERVED
SERVICE_RESTART
TLS_HANDSHAKE_FAILURE
TOO_BIG
TRY_AGAIN_LATER
UNEXPECTED_CONDITION
VIOLATED_POLICY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CloseReason.CloseCode
getCloseCode(int code)
int
getCode()
static CloseReason.CloseCodes
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CloseReason.CloseCodes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL_CLOSURE
public static final CloseReason.CloseCodes NORMAL_CLOSURE
-
GOING_AWAY
public static final CloseReason.CloseCodes GOING_AWAY
-
PROTOCOL_ERROR
public static final CloseReason.CloseCodes PROTOCOL_ERROR
-
CANNOT_ACCEPT
public static final CloseReason.CloseCodes CANNOT_ACCEPT
-
RESERVED
public static final CloseReason.CloseCodes RESERVED
-
NO_STATUS_CODE
public static final CloseReason.CloseCodes NO_STATUS_CODE
-
CLOSED_ABNORMALLY
public static final CloseReason.CloseCodes CLOSED_ABNORMALLY
-
NOT_CONSISTENT
public static final CloseReason.CloseCodes NOT_CONSISTENT
-
VIOLATED_POLICY
public static final CloseReason.CloseCodes VIOLATED_POLICY
-
TOO_BIG
public static final CloseReason.CloseCodes TOO_BIG
-
NO_EXTENSION
public static final CloseReason.CloseCodes NO_EXTENSION
-
UNEXPECTED_CONDITION
public static final CloseReason.CloseCodes UNEXPECTED_CONDITION
-
SERVICE_RESTART
public static final CloseReason.CloseCodes SERVICE_RESTART
-
TRY_AGAIN_LATER
public static final CloseReason.CloseCodes TRY_AGAIN_LATER
-
TLS_HANDSHAKE_FAILURE
public static final CloseReason.CloseCodes TLS_HANDSHAKE_FAILURE
-
-
Method Detail
-
values
public static CloseReason.CloseCodes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CloseReason.CloseCodes c : CloseReason.CloseCodes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CloseReason.CloseCodes valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCloseCode
public static CloseReason.CloseCode getCloseCode(int code)
-
getCode
public int getCode()
- Specified by:
getCode
in interfaceCloseReason.CloseCode
-
-