public class TaskProgressController extends Object
| Constructor and Description |
|---|
TaskProgressController(TaskProgressView view,
javafx.concurrent.Task<?>... tasks)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
<T> void |
addTask(javafx.concurrent.Task<T> task,
java.util.function.Consumer<T> successCallback,
java.util.function.Consumer<Throwable> errorCallback)
adds a new task with the desired callbacks on either success or error
|
void |
cancel()
cancels all tasks
|
static ExecutorService |
getExecutorservice()
returns executorService
|
public TaskProgressController(TaskProgressView view, javafx.concurrent.Task<?>... tasks)
view - corresponding viewtasks - tasks to executepublic static ExecutorService getExecutorservice()
public <T> void addTask(javafx.concurrent.Task<T> task,
java.util.function.Consumer<T> successCallback,
java.util.function.Consumer<Throwable> errorCallback)
T - throwabletask - task to be executedsuccessCallback - called on successerrorCallback - called on failurepublic void cancel()
Copyright © 2018. All rights reserved.