Serializable, Comparable<CloseReason>public enum CloseReason extends Enum<CloseReason>
| 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 |
| Modifier and Type | Field | Description |
|---|---|---|
int |
code |
|
boolean |
mightBeUsedByEndpoint |
|
String |
text |
| Modifier and Type | Method | Description |
|---|---|---|
static CloseReason |
forCloseCode(int code) |
|
static CloseReason |
valueOf(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.
|
public static final CloseReason NORMAL_CLOSURE
public static final CloseReason GOING_AWAY
public static final CloseReason PROTOCOL_ERROR
public static final CloseReason CANNOT_ACCEPT
public static final CloseReason RESERVED
public static final CloseReason NO_STATUS_CODE
public static final CloseReason CLOSED_ABNORMALLY
public static final CloseReason NOT_CONSISTENT
public static final CloseReason VIOLATED_POLICY
public static final CloseReason TOO_BIG
public static final CloseReason NO_EXTENSION
public static final CloseReason UNEXPECTED_CONDITION
public static final CloseReason SERVICE_RESTART
public static final CloseReason TRY_AGAIN_LATER
public static final CloseReason TLS_HANDSHAKE_FAILURE
public final int code
public final String text
public final boolean mightBeUsedByEndpoint
public static CloseReason[] values()
for (CloseReason c : CloseReason.values()) System.out.println(c);
public static CloseReason 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 CloseReason forCloseCode(int code)
Copyright © 2018. All rights reserved.