public static enum Session.State extends Enum<Session.State>
Enum Constant and Description |
---|
CLOSED_BY_CLIENT
The session has been closed by the client.
|
CLOSED_BY_SERVER
The session has been closed (or rejected) by the server.
|
CLOSED_FAILED
The session has lost its connection to a server and could not be
recovered.
|
CONNECTED_ACTIVE
An active connection with the server has been established.
|
CONNECTING
The session is establishing its initial connection.
|
RECOVERING_RECONNECT
Connection with a server has been lost and the session is attempting
reconnection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isClosed()
Returns true if a disconnected state.
|
boolean |
isConnected()
Returns true if a connected state.
|
boolean |
isRecovering()
Returns true if a recovering state.
|
static Session.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Session.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Session.State CONNECTING
public static final Session.State CONNECTED_ACTIVE
public static final Session.State RECOVERING_RECONNECT
public static final Session.State CLOSED_BY_CLIENT
public static final Session.State CLOSED_BY_SERVER
public static final Session.State CLOSED_FAILED
public static Session.State[] values()
for (Session.State c : Session.State.values()) System.out.println(c);
public static Session.State 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 boolean isConnected()
public boolean isRecovering()
public boolean isClosed()
Copyright © 2024 DiffusionData Ltd. All Rights Reserved.