Package io.ably.lib.realtime
Enum Class ChannelState
- All Implemented Interfaces:
-
Serializable
,Comparable<ChannelState>
,Constable
Describes the possible states of a
Channel
object.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe attach has succeeded.An attach has been initiated by sending a request to Ably.The channel, having previously been ATTACHED, has been detached by the user.A detach has been initiated on an ATTACHED channel by sending a request to Ably.An indefinite failure condition.The channel has been initialized but no attach has yet been attempted.The channel, having previously been ATTACHED, has lost continuity, usually due to the client being disconnected from Ably for longer than two minutes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static ChannelState
Returns the enum constant of this class with the specified name.static ChannelState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
initialized
The channel has been initialized but no attach has yet been attempted. -
attaching
An attach has been initiated by sending a request to Ably. This is a transient state, followed either by a transition to ATTACHED, SUSPENDED, or FAILED. -
attached
The attach has succeeded. In the ATTACHED state a client may publish and subscribe to messages, or be present on the channel. -
detaching
A detach has been initiated on an ATTACHED channel by sending a request to Ably. This is a transient state, followed either by a transition to DETACHED or FAILED. -
detached
The channel, having previously been ATTACHED, has been detached by the user. -
failed
An indefinite failure condition. This state is entered if a channel error has been received from the Ably service, such as an attempt to attach without the necessary access rights. -
suspended
The channel, having previously been ATTACHED, has lost continuity, usually due to the client being disconnected from Ably for longer than two minutes. It will automatically attempt to reattach as soon as connectivity is restored.
-
-
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 name -
NullPointerException
- if the argument is null
-
getChannelEvent
-
isReattachable
public boolean isReattachable()
-