public enum ConnectionStatus extends Enum<ConnectionStatus>
Enum Constant and Description |
---|
CONNECTED
The core has successfully connected to the other side.
|
CONNECTING
The core is currently connecting to the other side.
|
CONNECTING_FAILED
The current attempt to connect failed, another attempt is being made (id = 2)
|
CONNECTING_FINALLY_FAILED
Eventually the connection could not be established.
|
CONNECTION_CLOSED
The connection to the other side was closed, for instance when the core is stopped or the other side has disconnected itself.
|
Modifier and Type | Field and Description |
---|---|
int |
id
The id.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionStatus |
byId(int id)
Returns the value that corresponds to the specified id.
|
int |
getId() |
static ConnectionStatus |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionStatus[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionStatus CONNECTING
public static final ConnectionStatus CONNECTED
public static final ConnectionStatus CONNECTING_FAILED
public static final ConnectionStatus CONNECTING_FINALLY_FAILED
UbiErrorCode.CONNECTION_FINALLY_FAILED_TIMEOUT_OR_OTHER_REASON
is send back to the client.
Additionally in case the connection failed for authentication reasons the error code UbiErrorCode.CONNECTION_FINALLY_FAILED_AUTHENTICATION_FAILURE
is send back to the client.public static final ConnectionStatus CONNECTION_CLOSED
public static ConnectionStatus[] values()
for (ConnectionStatus c : ConnectionStatus.values()) System.out.println(c);
public static ConnectionStatus 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 int getId()
public static ConnectionStatus byId(int id)
id
-