Enum ConnectState

  • All Implemented Interfaces:
    Serializable, Comparable<ConnectState>

    public enum ConnectState
    extends Enum<ConnectState>
    The possible states a GluonObservable can be in while a DataProvider operation is in progress. All observables begin in the READY state. When the operation is started, the observable will enter the RUNNING state. Finally, depending on the operation outcome, the observable will always enter one of the following states: SUCCEEDED, FAILED, REMOVED or CANCELLED. When an exception was thrown during the operation, it will enter the FAILED state. When the observable is a GluonObservableObject and it is passed in as a parameter to the remove method, then the object will enter the REMOVED state when the remove operation succeeded successfully. When the operation was cancelled, the state of the observable will be changed to CANCELLED. Signaling the cancellation of an operation is done by throwing a CancellationException. In all other cases, the state will become SUCCEEDED.
    • Enum Constant Detail

      • READY

        public static final ConnectState READY
        This is the initial state of a new GluonObservable object. It will remain in the READY state until the first synchronization operation is started.
      • RUNNING

        public static final ConnectState RUNNING
        A GluonObservable object in the RUNNING state means that a synchronization operation is currently in progress.
      • FAILED

        public static final ConnectState FAILED
        A GluonObservable object in the FAILED state signals that the last executed synchronization operation failed. You can check the exception to find out more about the reason of the failure.
      • SUCCEEDED

        public static final ConnectState SUCCEEDED
        A GluonObservable object in the SUCCEEDED state signals that the last executed synchronization operation completed successfully.
      • CANCELLED

        public static final ConnectState CANCELLED
        A GluonObservable object in the CANCELLED state signals that the last executed synchronization operation was cancelled. Cancellation is most likely caused by a user that cancels an action that is required to proceed with the operation. For example, when an operation requires an authenticated user, that operation is cancelled when the user aborts the authentication process.
    • Method Detail

      • values

        public static ConnectState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ConnectState c : ConnectState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ConnectState valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null