private static enum ConnectionState.State extends java.lang.Enum<ConnectionState.State>
Enum Constant and Description |
---|
CLOSING
The WebSocket is closing
|
DISCONNECTED
The WebSocket connection is disconnected.
|
HANDSHAKING
Initial state of a connection, the upgrade request / response handshake is in progress
|
OPENED
The websocket connection is established and open.
|
OPENING
Intermediate state between HANDSHAKING and OPENED, used to indicate that a upgrade
request/response handshake is successful, but the Application provided socket's
onOpen code has yet completed.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionState.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionState.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionState.State HANDSHAKING
public static final ConnectionState.State OPENING
This state is to allow the local socket endpoint to initiate the sending of messages and frames, but to NOT start reading yet.
public static final ConnectionState.State OPENED
This indicates that the Upgrade has succeed, and the Application provided socket's onOpen code has returned.
It is now time to start reading from the remote endpoint.
public static final ConnectionState.State CLOSING
There are several conditions that would start this state.
- A CLOSE Frame has been received (and parsed) from the remote endpoint - A CLOSE Frame has been enqueued by the local endpoint
public static final ConnectionState.State DISCONNECTED
Connection is complete and no longer valid.
public static ConnectionState.State[] values()
for (ConnectionState.State c : ConnectionState.State.values()) System.out.println(c);
public static ConnectionState.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null