public enum CloseCode extends Enum<CloseCode>
| Enum Constant and Description |
|---|
CLOSED_ABNORMALLY |
DATA_TYPE_CONVERSION_ERROR |
GOING_AWAY |
MESSAGE_TOO_LARGE |
MISSING_EXTENSION |
NO_STATUS_CODE |
NORMAL |
POLICY_VIOLATION |
PROTOCOL_ERROR |
RESERVED |
SERVER_ERROR |
SERVICE_RESTART |
TLS_HANDSHAKE_FAILURE |
TRY_AGAIN_LATER |
UNKNOWN_DATA_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static CloseCode |
fromBytes(byte[] bytes) |
static CloseCode |
fromCode(int code) |
int |
getCode() |
byte[] |
getCodeAsBytes() |
static CloseCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CloseCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CloseCode NORMAL
public static final CloseCode GOING_AWAY
public static final CloseCode PROTOCOL_ERROR
public static final CloseCode UNKNOWN_DATA_TYPE
public static final CloseCode RESERVED
public static final CloseCode NO_STATUS_CODE
public static final CloseCode CLOSED_ABNORMALLY
public static final CloseCode DATA_TYPE_CONVERSION_ERROR
public static final CloseCode POLICY_VIOLATION
public static final CloseCode MESSAGE_TOO_LARGE
public static final CloseCode MISSING_EXTENSION
public static final CloseCode SERVER_ERROR
public static final CloseCode SERVICE_RESTART
public static final CloseCode TRY_AGAIN_LATER
public static final CloseCode TLS_HANDSHAKE_FAILURE
public static CloseCode[] values()
for (CloseCode c : CloseCode.values()) System.out.println(c);
public static CloseCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static CloseCode fromCode(int code)
public static CloseCode fromBytes(byte[] bytes)
public int getCode()
public byte[] getCodeAsBytes()
Copyright © 2017. All rights reserved.