Package gov.nasa.pds.tools.validate.task
Interface TaskManager
- All Known Implementing Classes:
BlockingTaskManager
public interface TaskManager
Defines the operations of a service that can run tasks in the
background. The task manager will generate events when tasks
are run, paused, canceled, or complete.
-
Method Summary
-
Method Details
-
submit
Submits a task to run in the background.- Parameters:
task
- the task to run
-
remove
Removes a task from the task manager. The task manager will attempt to cancel the task if it is running. Once a task is removed, further operations on the task using this task manager may result in exceptions.- Parameters:
task
- the task to remove
-
getStatus
Gets the task status.- Parameters:
task
- the task- Returns:
- the task status
-
cancel
Requests to cancel the task.- Parameters:
task
- the task to cancel
-