- java.lang.Object
-
- java.lang.Enum<ConnectState>
-
- com.gluonhq.connect.ConnectState
-
- All Implemented Interfaces:
Serializable,Comparable<ConnectState>
public enum ConnectState extends Enum<ConnectState>
The possible states aGluonObservablecan be in while aDataProvideroperation is in progress. All observables begin in theREADYstate. When the operation is started, the observable will enter theRUNNINGstate. Finally, depending on the operation outcome, the observable will always enter one of the following states:SUCCEEDED,FAILED,REMOVEDorCANCELLED. When an exception was thrown during the operation, it will enter theFAILEDstate. When the observable is aGluonObservableObjectand it is passed in as a parameter to theremove method, then the object will enter theREMOVEDstate when the remove operation succeeded successfully. When the operation was cancelled, the state of the observable will be changed toCANCELLED. Signaling the cancellation of an operation is done by throwing aCancellationException. In all other cases, the state will becomeSUCCEEDED.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLEDA GluonObservable object in theCANCELLEDstate signals that the last executed synchronization operation was cancelled.FAILEDA GluonObservable object in theFAILEDstate signals that the last executed synchronization operation failed.READYThis is the initial state of a new GluonObservable object.REMOVEDA GluonObservable object in theREMOVEDstate signals that it is successfully removed after executing theDataProvider.removeObject(GluonObservableObject, ObjectDataRemover)remove operation}.RUNNINGA GluonObservable object in theRUNNINGstate means that a synchronization operation is currently in progress.SUCCEEDEDA GluonObservable object in theSUCCEEDEDstate signals that the last executed synchronization operation completed successfully.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConnectStatevalueOf(String name)Returns the enum constant of this type with the specified name.static ConnectState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READY
public static final ConnectState READY
This is the initial state of a new GluonObservable object. It will remain in theREADYstate until the first synchronization operation is started.
-
RUNNING
public static final ConnectState RUNNING
A GluonObservable object in theRUNNINGstate means that a synchronization operation is currently in progress.
-
FAILED
public static final ConnectState FAILED
A GluonObservable object in theFAILEDstate signals that the last executed synchronization operation failed. You can check theexceptionto find out more about the reason of the failure.
-
SUCCEEDED
public static final ConnectState SUCCEEDED
A GluonObservable object in theSUCCEEDEDstate signals that the last executed synchronization operation completed successfully.
-
CANCELLED
public static final ConnectState CANCELLED
A GluonObservable object in theCANCELLEDstate 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.
-
REMOVED
public static final ConnectState REMOVED
A GluonObservable object in theREMOVEDstate signals that it is successfully removed after executing theDataProvider.removeObject(GluonObservableObject, ObjectDataRemover)remove operation}. TheREMOVEDstate is only applicable toGluonObservableObjectbecause aGluonObservableListcan not be removed.
-
-
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 nameNullPointerException- if the argument is null
-
-