Enum Class Session.State
- All Implemented Interfaces:
Serializable
,Comparable<Session.State>
,Constable
- Enclosing interface:
- Session
Session state.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe session has been closed by the client.The session has been closed (or rejected) by the server.The session has lost its connection to a server and could not be recovered.An active connection with the server has been established.The session is establishing its initial connection.Connection with a server has been lost and the session is attempting reconnection. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isClosed()
Returns true if a disconnected state.boolean
Returns true if a connected state.boolean
Returns true if a recovering state.static Session.State
Returns the enum constant of this class with the specified name.static Session.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONNECTING
The session is establishing its initial connection. -
CONNECTED_ACTIVE
An active connection with the server has been established. -
RECOVERING_RECONNECT
Connection with a server has been lost and the session is attempting reconnection. -
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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isConnected
public boolean isConnected()Returns true if a connected state.- Returns:
- true if connected state
-
isRecovering
public boolean isRecovering()Returns true if a recovering state.- Returns:
- true if recovering
-
isClosed
public boolean isClosed()Returns true if a disconnected state.- Returns:
- true if disconnected
-