public class ConcurrentUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static javafx.beans.property.ReadOnlyBooleanProperty |
createIsDoneProperty(javafx.concurrent.Worker<?> worker) |
static <T> DataFxService<T> |
createService(java.util.concurrent.Callable<T> callable) |
static DataFxService<java.lang.Void> |
createService(java.lang.Runnable runnable) |
static <T> DataFxService<T> |
createService(javafx.concurrent.Task<T> task) |
static <T> javafx.concurrent.Worker<T> |
executeService(java.util.concurrent.Executor executor,
javafx.concurrent.Service<T> service) |
static <V> javafx.beans.binding.BooleanBinding |
isFinishedProperty(javafx.concurrent.Worker<V> worker) |
static void |
runAndWait(java.lang.Runnable runnable)
Runs the given Runnable on the JavaFX Application Thread.
|
static <T> T |
runCallableAndWait(java.util.concurrent.Callable<T> callable)
Runs the given Callable on the JavaFX Application Thread.
|
static <T> void |
then(javafx.concurrent.Worker<T> worker,
java.util.function.Consumer<T> consumer) |
public static void runAndWait(java.lang.Runnable runnable)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
runnable - the runnable that will be executed on the JavaFX Application Threadjava.lang.InterruptedException - if the JavaFX Application Thread was interrupted while waitingjava.util.concurrent.ExecutionException - if the call of the run method of the Runnable threw an exceptionpublic static <T> T runCallableAndWait(java.util.concurrent.Callable<T> callable)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
T - return type of the callablecallable - the callable that will be executed on the JavaFX Application Threadjava.lang.InterruptedException - if the JavaFX Application Thread was interrupted while waitingjava.util.concurrent.ExecutionException - if the call of the run method of the Callable threw an exceptionpublic static DataFxService<java.lang.Void> createService(java.lang.Runnable runnable)
public static <T> DataFxService<T> createService(java.util.concurrent.Callable<T> callable)
public static <T> DataFxService<T> createService(javafx.concurrent.Task<T> task)
public static <T> javafx.concurrent.Worker<T> executeService(java.util.concurrent.Executor executor,
javafx.concurrent.Service<T> service)
public static <V> javafx.beans.binding.BooleanBinding isFinishedProperty(javafx.concurrent.Worker<V> worker)
public static <T> void then(javafx.concurrent.Worker<T> worker,
java.util.function.Consumer<T> consumer)
public static javafx.beans.property.ReadOnlyBooleanProperty createIsDoneProperty(javafx.concurrent.Worker<?> worker)