Enum Class TransportClient.State

java.lang.Object
java.lang.Enum<TransportClient.State>
com.levigo.jadice.web.transport.client.networking.TransportClient.State
All Implemented Interfaces:
Serializable, Comparable<TransportClient.State>, Constable
Enclosing interface:
TransportClient

public static enum TransportClient.State extends Enum<TransportClient.State>
Represents the connection state of the client.
  • Enum Constant Details

    • NOT_CONNECTED

      public static final TransportClient.State NOT_CONNECTED
      State indicating that the client was never connected to a server or disconnected on purpose (by calling the disconnect method).
    • CONNECTED

      public static final TransportClient.State CONNECTED
      State indicating that the client has an active server connection.
    • RECONNECTING_BACKOFF

      public static final TransportClient.State RECONNECTING_BACKOFF
      State indicating that the client tries to reconnect to the server using the backoff algorithm. The connection might have been lost because of an unexpected loss of the server connection (losing the server connection because of failed request/unexpected close of the event stream/unexpected close of the WebSockets connection instead of losing it after calling the disconnect method).
    • RECONNECTING_LONGTIME

      public static final TransportClient.State RECONNECTING_LONGTIME
      State indicating that the client tries to reconnect to the server using longtime reconnects. The connection might have been lost because of an unexpected loss of the server connection (losing the server connection because of failed request/unexpected close of the event stream/unexpected close of the WebSockets connection instead of losing it after calling the disconnect method).
    • FAILED

      public static final TransportClient.State FAILED
      State that indicates that the server connection fails. Possible reasons:
      • The reconnect with backoff and longtime failed because the server is not reachable for too long
      • The only configured transport methods are not supported either by the client or the server
  • Field Details

    • abortPendingCalls

      public final boolean abortPendingCalls
    • isActiveState

      public final boolean isActiveState
      Whether the state is an active one, i.e. it is justified to send calls to the server.
  • Method Details

    • values

      public static TransportClient.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 TransportClient.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
    • abortPendingCalls

      public boolean abortPendingCalls()
      Whether pending service calls should be aborted if the connection changes to the given state.
      Returns:
      whether pending service calls should be aborted