|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.basher.impl.TaskManagerImpl
public class TaskManagerImpl
Constructor Summary | |
---|---|
TaskManagerImpl()
|
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. |
void |
basherEvent(BasherEvent basherEvent)
|
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 |
initializeService()
|
void |
removeTaskExecutionContext(UUID identifier)
Removes the specified task execution context from the list of active tasks. |
void |
setEventManager(EventManager eventManager)
|
void |
setLog(org.apache.commons.logging.Log logger)
|
void |
setModuleDescriptorTaskContributions(List<ModuleDescriptorTaskContribution> moduleDescriptorTaskContributions)
|
void |
setRandomizer(Randomizer randomizer)
|
void |
setTaskConfigurationExtractor(TaskConfigurationExtractor taskConfigurationExtractor)
|
void |
setTaskCreator(TaskCreator taskCreator)
|
void |
setTaskDecorator(TaskDecorator taskDecorator)
|
void |
setTaskProviders(List<TaskProvider> taskProviders)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskManagerImpl()
Method Detail |
---|
public void setTaskConfigurationExtractor(TaskConfigurationExtractor taskConfigurationExtractor)
public void setTaskCreator(TaskCreator taskCreator)
public void setTaskDecorator(TaskDecorator taskDecorator)
public void setEventManager(EventManager eventManager)
public void setLog(org.apache.commons.logging.Log logger)
public void setRandomizer(Randomizer randomizer)
public void setTaskProviders(List<TaskProvider> taskProviders)
public void addTask(TaskContribution taskContribution)
TaskManager
addTask
in interface TaskManager
taskContribution
- The task contribution to addpublic TaskContribution addTask(Class taskClass, TaskContribution... followers)
TaskManager
Task to the
task manager but must provide an empty constructor (but not necessarily public).
- Specified by:
addTask
in interface TaskManager
- 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
public TaskContribution addTask(Object taskInstance, TaskContribution... followers)
TaskManager
Task to the
task manager.
- Specified by:
addTask
in interface TaskManager
- 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
public TaskExecutionContext getNextTaskExecutionContext()
TaskManager
getNextTaskExecutionContext
in interface TaskManager
public Set<TaskContribution> getTasks()
TaskManager
getTasks
in interface TaskManager
Task
instances.public TaskContribution getTaskByName(String name)
TaskManager
getTaskByName
in interface TaskManager
name
- The name of the task to retrieve.
public void removeTaskExecutionContext(UUID identifier)
TaskManager
removeTaskExecutionContext
in interface TaskManager
identifier
- The identifier of the task execution context to removepublic int getNumberOfTasks()
TaskManager
getNumberOfTasks
in interface TaskManager
public void setModuleDescriptorTaskContributions(List<ModuleDescriptorTaskContribution> moduleDescriptorTaskContributions)
public void initializeService()
public void basherEvent(BasherEvent basherEvent)
basherEvent
in interface BasherEventListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |