-
- All Superinterfaces:
EventTarget
- All Known Implementing Classes:
GluonObservableList
,GluonObservableListImpl
,GluonObservableObject
,GluonObservableObjectImpl
,GluonObservableRemoteFunctionChunkedListImpl
,GluonObservableRemoteFunctionListImpl
,GluonObservableRemoteFunctionObjectImpl
public interface GluonObservable extends EventTarget
This is the common interface for both GluonObservableObject and GluonObservableList. All operations on theDataProvider
class happen in an asynchronous background thread. This interface can therefor be used to get information about the current state of the observable entity while the operation is running as well as the final state of the entity when the operation has completed.
-
-
Property Summary
Properties Type Property Description ReadOnlyObjectProperty<Throwable>
exception
Holds the exception that was thrown when a synchronization operation failed.ReadOnlyBooleanProperty
initialized
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.ReadOnlyObjectProperty<ConnectState>
state
Holds the current state of this observable.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReadOnlyObjectProperty<Throwable>
exceptionProperty()
Holds the exception that was thrown when a synchronization operation failed.Throwable
getException()
In case an exception occurred during processing, this method will return the exception.ConnectState
getState()
Return the current state of this observable.ReadOnlyBooleanProperty
initializedProperty()
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.boolean
isInitialized()
Return the initialized state of this observable.void
setOnCancelled(EventHandler<ConnectStateEvent> value)
The onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.void
setOnFailed(EventHandler<ConnectStateEvent> value)
The onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.void
setOnReady(EventHandler<ConnectStateEvent> value)
The onReady event handler is called whenever the GluonObservable state transitions to the READY state.void
setOnRemoved(EventHandler<ConnectStateEvent> value)
The onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.void
setOnRunning(EventHandler<ConnectStateEvent> value)
The onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.void
setOnSucceeded(EventHandler<ConnectStateEvent> value)
The onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.ReadOnlyObjectProperty<ConnectState>
stateProperty()
Holds the current state of this observable.-
Methods inherited from interface javafx.event.EventTarget
buildEventDispatchChain
-
-
-
-
Property Detail
-
initialized
ReadOnlyBooleanProperty initializedProperty
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.- See Also:
isInitialized()
-
state
ReadOnlyObjectProperty<ConnectState> stateProperty
Holds the current state of this observable. This property can be used to listen for changes in the synchronization process.- See Also:
getState()
-
exception
ReadOnlyObjectProperty<Throwable> exceptionProperty
Holds the exception that was thrown when a synchronization operation failed.- See Also:
getException()
-
-
Method Detail
-
isInitialized
boolean isInitialized()
Return the initialized state of this observable.- Returns:
- true when the observable is initialized; false otherwise.
-
initializedProperty
ReadOnlyBooleanProperty initializedProperty()
A boolean property that is true when the observable has been initialized successfully after its initial retrieval.- See Also:
isInitialized()
-
getState
ConnectState getState()
Return the current state of this observable.- Returns:
- the current state
-
stateProperty
ReadOnlyObjectProperty<ConnectState> stateProperty()
Holds the current state of this observable. This property can be used to listen for changes in the synchronization process.- See Also:
getState()
-
getException
Throwable getException()
In case an exception occurred during processing, this method will return the exception. Otherwise,null
will be returned.- Returns:
- the exception, if one has occurred; otherwise null.
-
exceptionProperty
ReadOnlyObjectProperty<Throwable> exceptionProperty()
Holds the exception that was thrown when a synchronization operation failed.- See Also:
getException()
-
setOnReady
void setOnReady(EventHandler<ConnectStateEvent> value)
The onReady event handler is called whenever the GluonObservable state transitions to the READY state.- Parameters:
value
- the event handler, can be null to clear it
-
setOnRunning
void setOnRunning(EventHandler<ConnectStateEvent> value)
The onRunning event handler is called whenever the GluonObservable state transitions to the RUNNING state.- Parameters:
value
- the event handler, can be null to clear it
-
setOnFailed
void setOnFailed(EventHandler<ConnectStateEvent> value)
The onFailed event handler is called whenever the GluonObservable state transitions to the FAILED state.- Parameters:
value
- the event handler, can be null to clear it
-
setOnSucceeded
void setOnSucceeded(EventHandler<ConnectStateEvent> value)
The onSucceeded event handler is called whenever the GluonObservable state transitions to the SUCCEEDED state.- Parameters:
value
- the event handler, can be null to clear it
-
setOnCancelled
void setOnCancelled(EventHandler<ConnectStateEvent> value)
The onCancelled event handler is called whenever the GluonObservable state transitions to the CANCELLED state.- Parameters:
value
- the event handler, can be null to clear it
-
setOnRemoved
void setOnRemoved(EventHandler<ConnectStateEvent> value)
The onRemoved event handler is called whenever the GluonObservable state transitions to the REMOVED state.- Parameters:
value
- the event handler, can be null to clear it
-
-