Enum CloseReason
- java.lang.Object
-
- java.lang.Enum<CloseReason>
-
- ch.squaredesk.nova.comm.websockets.CloseReason
-
- All Implemented Interfaces:
Serializable,Comparable<CloseReason>
public enum CloseReason extends Enum<CloseReason>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANNOT_ACCEPTCLOSED_ABNORMALLYGOING_AWAYNO_EXTENSIONNO_STATUS_CODENORMAL_CLOSURENOT_CONSISTENTPROTOCOL_ERRORRESERVEDSERVICE_RESTARTTLS_HANDSHAKE_FAILURETOO_BIGTRY_AGAIN_LATERUNEXPECTED_CONDITIONVIOLATED_POLICY
-
Field Summary
Fields Modifier and Type Field Description intcodebooleanmightBeUsedByEndpointStringtext
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CloseReasonforCloseCode(int code)static CloseReasonvalueOf(String name)Returns the enum constant of this type with the specified name.static CloseReason[]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 NORMAL_CLOSURE
-
GOING_AWAY
public static final CloseReason GOING_AWAY
-
PROTOCOL_ERROR
public static final CloseReason PROTOCOL_ERROR
-
CANNOT_ACCEPT
public static final CloseReason CANNOT_ACCEPT
-
RESERVED
public static final CloseReason RESERVED
-
NO_STATUS_CODE
public static final CloseReason NO_STATUS_CODE
-
CLOSED_ABNORMALLY
public static final CloseReason CLOSED_ABNORMALLY
-
NOT_CONSISTENT
public static final CloseReason NOT_CONSISTENT
-
VIOLATED_POLICY
public static final CloseReason VIOLATED_POLICY
-
TOO_BIG
public static final CloseReason TOO_BIG
-
NO_EXTENSION
public static final CloseReason NO_EXTENSION
-
UNEXPECTED_CONDITION
public static final CloseReason UNEXPECTED_CONDITION
-
SERVICE_RESTART
public static final CloseReason SERVICE_RESTART
-
TRY_AGAIN_LATER
public static final CloseReason TRY_AGAIN_LATER
-
TLS_HANDSHAKE_FAILURE
public static final CloseReason TLS_HANDSHAKE_FAILURE
-
-
Field Detail
-
code
public final int code
-
text
public final String text
-
mightBeUsedByEndpoint
public final boolean mightBeUsedByEndpoint
-
-
Method Detail
-
values
public static CloseReason[] 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 c : CloseReason.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 valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forCloseCode
public static CloseReason forCloseCode(int code)
-
-