public enum ConnectionState extends Enum<ConnectionState>
Enum Constant and Description |
---|
CLOSED
[RFC] The websocket connection is closed.
|
CLOSING
[RFC] The websocket closing handshake is started.
|
CONNECTED
[Impl] Intermediate state between CONNECTING and OPEN, used to indicate that a upgrade request/response is successful, but the end-user provided socket's
onOpen code has yet to run.
|
CONNECTING
[RFC] Initial state of a connection, the upgrade request / response is in progress
|
OPEN
[RFC] The websocket connection is established and open.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionState CONNECTING
public static final ConnectionState CONNECTED
This state is to allow the local socket to initiate messages and frames, but to NOT start reading yet.
public static final ConnectionState OPEN
This indicates that the Upgrade has succeed, and the end-user provided socket's onOpen code has completed.
It is now time to start reading from the remote endpoint.
public static final ConnectionState CLOSING
This can be considered a half-closed state.
When receiving this as an event on ConnectionStateListener#onConnectionStateChange(ConnectionState)
a close frame should be sent using
the CloseInfo
available from IOState#getCloseInfo()
public static final ConnectionState CLOSED
Connection should be disconnected and no further reads or writes should occur.
public static ConnectionState[] values()
for (ConnectionState c : ConnectionState.values()) System.out.println(c);
public static ConnectionState 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 nullCopyright © 1995-2015 Webtide. All Rights Reserved.