Enum Class Session.State

java.lang.Object
java.lang.Enum<Session.State>
com.pushtechnology.diffusion.client.session.Session.State
All Implemented Interfaces:
Serializable, Comparable<Session.State>, Constable
Enclosing interface:
Session

public static enum Session.State extends Enum<Session.State>
Session state.
  • Enum Constant Details

    • CONNECTING

      public static final Session.State CONNECTING
      The session is establishing its initial connection.
    • CONNECTED_ACTIVE

      public static final Session.State CONNECTED_ACTIVE
      An active connection with the server has been established.
    • RECOVERING_RECONNECT

      public static final Session.State RECOVERING_RECONNECT
      Connection with a server has been lost and the session is attempting reconnection.
    • CLOSED_BY_CLIENT

      public static final Session.State CLOSED_BY_CLIENT
      The session has been closed by the client.
    • CLOSED_BY_SERVER

      public static final Session.State CLOSED_BY_SERVER
      The session has been closed (or rejected) by the server.
    • CLOSED_FAILED

      public static final Session.State CLOSED_FAILED
      The session has lost its connection to a server and could not be recovered.
  • Method Details

    • values

      public static Session.State[] 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

      public static Session.State valueOf(String name)
      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
    • 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