Package io.jmix.flowui.backgroundtask
Class BackgroundTaskManager
java.lang.Object
io.jmix.flowui.backgroundtask.BackgroundTaskManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds task to task set.void
Interrupts all tasks.static BackgroundTaskManager
static boolean
isBound()
void
removeTask
(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:
true
if anBackgroundTaskManager
instance is currently bound and can be safely obtained bygetInstance()
-