Package javax.websocket
Enum CloseReason.CloseCodes
- java.lang.Object
- 
- java.lang.Enum<CloseReason.CloseCodes>
- 
- javax.websocket.CloseReason.CloseCodes
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<CloseReason.CloseCodes>,- CloseReason.CloseCode
 - Enclosing class:
- CloseReason
 
 public static enum CloseReason.CloseCodes extends java.lang.Enum<CloseReason.CloseCodes> implements CloseReason.CloseCode 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description CANNOT_ACCEPTCLOSED_ABNORMALLYGOING_AWAYNO_EXTENSIONNO_STATUS_CODENORMAL_CLOSURENOT_CONSISTENTPROTOCOL_ERRORRESERVEDSERVICE_RESTARTTLS_HANDSHAKE_FAILURETOO_BIGTRY_AGAIN_LATERUNEXPECTED_CONDITIONVIOLATED_POLICY
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CloseReason.CloseCodegetCloseCode(int code)intgetCode()static CloseReason.CloseCodesvalueOf(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_CLOSUREpublic static final CloseReason.CloseCodes NORMAL_CLOSURE 
 - 
GOING_AWAYpublic static final CloseReason.CloseCodes GOING_AWAY 
 - 
PROTOCOL_ERRORpublic static final CloseReason.CloseCodes PROTOCOL_ERROR 
 - 
CANNOT_ACCEPTpublic static final CloseReason.CloseCodes CANNOT_ACCEPT 
 - 
RESERVEDpublic static final CloseReason.CloseCodes RESERVED 
 - 
NO_STATUS_CODEpublic static final CloseReason.CloseCodes NO_STATUS_CODE 
 - 
CLOSED_ABNORMALLYpublic static final CloseReason.CloseCodes CLOSED_ABNORMALLY 
 - 
NOT_CONSISTENTpublic static final CloseReason.CloseCodes NOT_CONSISTENT 
 - 
VIOLATED_POLICYpublic static final CloseReason.CloseCodes VIOLATED_POLICY 
 - 
TOO_BIGpublic static final CloseReason.CloseCodes TOO_BIG 
 - 
NO_EXTENSIONpublic static final CloseReason.CloseCodes NO_EXTENSION 
 - 
UNEXPECTED_CONDITIONpublic static final CloseReason.CloseCodes UNEXPECTED_CONDITION 
 - 
SERVICE_RESTARTpublic static final CloseReason.CloseCodes SERVICE_RESTART 
 - 
TRY_AGAIN_LATERpublic static final CloseReason.CloseCodes TRY_AGAIN_LATER 
 - 
TLS_HANDSHAKE_FAILUREpublic static final CloseReason.CloseCodes TLS_HANDSHAKE_FAILURE 
 
- 
 - 
Method Detail- 
valuespublic 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
 
 - 
valueOfpublic 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 name
- java.lang.NullPointerException- if the argument is null
 
 - 
getCloseCodepublic static CloseReason.CloseCode getCloseCode(int code) 
 - 
getCodepublic int getCode() - Specified by:
- getCodein interface- CloseReason.CloseCode
 
 
- 
 
-