Enum ChannelState

java.lang.Object
java.lang.Enum<ChannelState>
io.ably.lib.realtime.ChannelState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ChannelState>, java.lang.constant.Constable

public enum ChannelState
extends java.lang.Enum<ChannelState>
Describes the possible states of a Channel object.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    attached
    The attach has succeeded.
    attaching
    An attach has been initiated by sending a request to Ably.
    detached
    The channel, having previously been ATTACHED, has been detached by the user.
    detaching
    A detach has been initiated on an ATTACHED channel by sending a request to Ably.
    failed
    An indefinite failure condition.
    initialized
    The channel has been initialized but no attach has yet been attempted.
    suspended
    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 Type Method Description
    ChannelEvent getChannelEvent()  
    static ChannelState valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static ChannelState[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • initialized

      public static final ChannelState initialized
      The channel has been initialized but no attach has yet been attempted.
    • attaching

      public static final ChannelState 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

      public static final ChannelState attached
      The attach has succeeded. In the ATTACHED state a client may publish and subscribe to messages, or be present on the channel.
    • detaching

      public static final ChannelState 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

      public static final ChannelState detached
      The channel, having previously been ATTACHED, has been detached by the user.
    • failed

      public static final ChannelState 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

      public static final ChannelState 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

      public static ChannelState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ChannelState valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • getChannelEvent

      public ChannelEvent getChannelEvent()