Interface CompletableWorker<V>

Type Parameters:
V - the result type
All Superinterfaces:
javafx.concurrent.Worker<V>
All Known Implementing Classes:
SimpleCompletableWorker

public interface CompletableWorker<V> extends javafx.concurrent.Worker<V>
A CompletableWorker is a Worker that provides value that it produces in a CompletionStage which completes (or fails) on the FX Application Thread.
  • Property Summary

    Properties inherited from interface javafx.concurrent.Worker

    exception, message, progress, running, state, title, totalWork, value, workDone
  • Nested Class Summary

    Nested classes/interfaces inherited from interface javafx.concurrent.Worker

    javafx.concurrent.Worker.State
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    complete(V result)
     
    void
     
    Returns the completion stage of this worker.

    Methods inherited from interface javafx.concurrent.Worker

    cancel, exceptionProperty, getException, getMessage, getProgress, getState, getTitle, getTotalWork, getValue, getWorkDone, isRunning, messageProperty, progressProperty, runningProperty, stateProperty, titleProperty, totalWorkProperty, valueProperty, workDoneProperty
  • Method Details

    • getCompletionStage

      CompletionStage<V> getCompletionStage()
      Returns the completion stage of this worker.

      The completion stage completes (or fails) on the fxApplicationThread when this worker is set to one of the following states:

      • Worker.State.FAILED
      • Worker.State.SUCCEEDED
      Returns:
    • complete

      void complete(V result)
    • completeExceptionally

      void completeExceptionally(Throwable exception)