Interface BackgroundTaskManager

  • All Known Implementing Classes:
    BackgroundTaskManagerImpl

    public interface BackgroundTaskManager
    Manager for background tasks. In the essence, background tasks are tasks, which are executed in background, have a string identifier, and can report it's status.
    • Method Detail

      • findTask

        BackgroundTask findTask​(String id)
        Get a background task by ID (if one exists).
        Parameters:
        id - string task identifier, which was used upon task creation.
        Returns:
        see above
      • getOrCreateTask

        BackgroundTask getOrCreateTask​(String id,
                                       BackgroundActivity action)
        Create a background task or return existing one with given id.
        Parameters:
        id - identifier of the task.
        action - an action to be executed. Action can report progress
        Returns:
        created (or found existing) background task