Package io.jmix.flowui.backgroundtask
Class BackgroundTaskManager
java.lang.Object
io.jmix.flowui.backgroundtask.BackgroundTaskManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds task to task set.voidInterrupts all tasks.static BackgroundTaskManagerstatic booleanisBound()voidremoveTask(Future<?> task) Stops manage of stopped task.
-
Constructor Details
-
BackgroundTaskManager
public BackgroundTaskManager()
-
-
Method Details
-
addTask
Adds task to task set.- Parameters:
task- Task
-
removeTask
Stops manage of stopped task.- Parameters:
task- Task
-
cleanupTasks
public void cleanupTasks()Interrupts all tasks. -
getInstance
- Returns:
- background task manager instance corresponding current
VaadinSession. Can be invoked anywhere in application code. - Throws:
IllegalStateException- if no background task manager instance is bound to the currentVaadinSession
-
isBound
public static boolean isBound()- Returns:
trueif anBackgroundTaskManagerinstance is currently bound and can be safely obtained bygetInstance()
-