Interface GluonObservable

  • All Superinterfaces:
    EventTarget
    All Known Implementing Classes:
    GluonObservableList, GluonObservableObject

    public interface GluonObservable
    extends EventTarget
    This is the common interface for both GluonObservableObject and GluonObservableList. All operations on the DataProvider 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.
    • 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
      • 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.
      • 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