|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskManager
Defines operations for interacting with the task manager.
Method Summary | |
---|---|
TaskContribution |
addTask(Class taskClass,
TaskContribution... followers)
Adds a task class to the task manager. |
TaskContribution |
addTask(Object taskInstance,
TaskContribution... followers)
Adds a task instance. |
void |
addTask(TaskContribution taskContribution)
Adds a task to the system in the form of task contribution. |
TaskExecutionContext |
getNextTaskExecutionContext()
Retrieves the next task available. |
int |
getNumberOfTasks()
Retrives the count of the currently registered tasks. |
TaskContribution |
getTaskByName(String name)
Retrieves the task identified by the specified name. |
Set<TaskContribution> |
getTasks()
Retrieves all active tasks with the task manager. |
void |
removeTaskExecutionContext(UUID identifier)
Removes the specified task execution context from the list of active tasks. |
Method Detail |
---|
void addTask(TaskContribution taskContribution)
taskContribution
- The task contribution to addTaskContribution addTask(Class taskClass, TaskContribution... followers)
Task to the
task manager but must provide an empty constructor (but not necessarily public).
- Parameters:
taskClass
- The task class to add. This class must either be annotated or
expose a public method named executeTask
which will be used for task execution.
If not annotated, the class may also expose any of the methods defined in Task
to
control the settings used during invocation.followers
- Followers which will be added to the task instance.
- Returns:
- The task created from adding the specified task instance
- Since:
- 1.3
TaskContribution addTask(Object taskInstance, TaskContribution... followers)
Task to the
task manager.
- Parameters:
taskInstance
- The task instance to add. The instance must either be annotated or
expose a public method named executeTask
which will be used for task executionfollowers
- Followers which will be added to the task instance.
- Returns:
- The task created from adding the specified task instance
- Since:
- 1.3
Set<TaskContribution> getTasks()
Task
instances.TaskContribution getTaskByName(String name)
name
- The name of the task to retrieve.
int getNumberOfTasks()
TaskExecutionContext getNextTaskExecutionContext()
void removeTaskExecutionContext(UUID identifier)
identifier
- The identifier of the task execution context to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |