Class BackgroundTaskManager

java.lang.Object
io.jmix.flowui.backgroundtask.BackgroundTaskManager

public class BackgroundTaskManager extends Object
  • Constructor Details

    • BackgroundTaskManager

      public BackgroundTaskManager()
  • Method Details

    • addTask

      public void addTask(Future<?> task)
      Adds task to task set.
      Parameters:
      task - Task
    • removeTask

      public void removeTask(Future<?> task)
      Stops manage of stopped task.
      Parameters:
      task - Task
    • cleanupTasks

      public void cleanupTasks()
      Interrupts all tasks.
    • getInstance

      public static BackgroundTaskManager 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 current VaadinSession
    • isBound

      public static boolean isBound()
      Returns:
      true if an BackgroundTaskManager instance is currently bound and can be safely obtained by getInstance()