Package io.jmix.flowui.backgroundtask
Interface BackgroundTaskHandler<V>
- Type Parameters:
- V- type of task's result
- All Known Implementing Classes:
- TaskHandlerImpl
public interface BackgroundTaskHandler<V>
Task handler for 
BackgroundTask.- 
Method SummaryModifier and TypeMethodDescriptionbooleancancel()Cancels task.voidexecute()Executes theBackgroundTask.Waits for the task completion and return its result.booleanisAlive()booleanbooleanisDone()
- 
Method Details- 
executevoid execute()Executes theBackgroundTask.
 This method must be called only once for a handler instance.
- 
cancelboolean cancel()Cancels task.- Returns:
- trueif canceled,- falseif the task was not started or is already stopped
 
- 
getResultWaits for the task completion and return its result.- Returns:
- task's result returned from BackgroundTask.run(TaskLifeCycle)method
 
- 
isDoneboolean isDone()- Returns:
- trueif the task is completed
 
- 
isCancelledboolean isCancelled()- Returns:
- trueif the task has been canceled
 
- 
isAliveboolean isAlive()- Returns:
- trueif the task is running
 
 
-