jetbrains.buildServer.backgroundTasks
Interface BackgroundTaskManager


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 Summary
 BackgroundTask findTask(java.lang.String id)
          Get a background task by ID (if one exists).
 BackgroundTask getOrCreateTask(java.lang.String id, BackgroundActivity action)
          Create a background task or return existing one with given id.
 

Method Detail

findTask

BackgroundTask findTask(java.lang.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(java.lang.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