Package io.jmix.flowui.backgroundtask
Interface TaskExecutor<T,V> 
public interface TaskExecutor<T,V> 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCancels the execution and removes task formBackgroundTaskWatchDogand fromBackgroundTaskManager.Joins task thread to current and waits if task is not finished.getTask()voidhandleProgress(T... changes) Handles changes from working thread.booleanbooleanbooleanisDone()voidsetFinalizer(Runnable finalizer) Sets done handler for clear resources.voidExecutes background task.
- 
Method Details- 
startExecutionvoid startExecution()Executes background task.
- 
cancelExecutionboolean cancelExecution()Cancels the execution and removes task formBackgroundTaskWatchDogand fromBackgroundTaskManager.- Returns:
- trueif the canceling was successful
 
- 
getResultJoins task thread to current and waits if task is not finished.- Returns:
- result of the task
 
- 
getTaskBackgroundTask<T,V> getTask()- Returns:
- the task
 
- 
isCancelledboolean isCancelled()
- 
isDoneboolean isDone()
- 
inProgressboolean inProgress()
- 
setFinalizerSets done handler for clear resources.- Parameters:
- finalizer- Runnable handler
 
- 
getFinalizerRunnable getFinalizer()
- 
handleProgressHandles changes from working thread.- Parameters:
- changes- Changes
 
 
-