|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
@Transactional public interface SchedulerService
Defines methods required to schedule a task.
| Method Summary | |
|---|---|
void |
deleteTask(java.lang.Integer id)
Delete the task with the given identifier. |
java.util.Collection<TaskDefinition> |
getRegisteredTasks()
Get the list of tasks that are available to be scheduled. |
java.util.Collection<TaskDefinition> |
getScheduledTasks()
Get scheduled tasks. |
java.lang.String |
getStatus(java.lang.Integer id)
Checks the status of a scheduled task. |
java.util.SortedMap<java.lang.String,java.lang.String> |
getSystemVariables()
Return SchedulerConstants |
TaskDefinition |
getTask(java.lang.Integer id)
Get the task with the given identifier. |
TaskDefinition |
getTaskByName(java.lang.String name)
Get the task with the given name. |
void |
onShutdown()
Stop all tasks and clean up the scheduler instance. |
void |
onStartup()
Start all tasks that are scheduled to run on startup. |
void |
rescheduleAllTasks()
Loop over all currently started tasks and cycle them. |
Task |
rescheduleTask(TaskDefinition task)
Stop and start a scheduled task. |
void |
restoreFromMemento(OpenmrsMemento memento)
Restore the scheduler service to state defined by Memento |
void |
saveTask(TaskDefinition task)
Create the given task |
OpenmrsMemento |
saveToMemento()
Save the state of the scheduler service to Memento |
Task |
scheduleTask(TaskDefinition task)
Start a scheduled task as specified in a TaskDefinition. |
void |
shutdownTask(TaskDefinition task)
Cancel a scheduled task. |
| Method Detail |
|---|
@Authorized(value="Manage Scheduler") java.lang.String getStatus(java.lang.Integer id)
id -
String status of the task with the given identifier@Authorized(value="Manage Scheduler") void onStartup()
onStartup in interface OpenmrsService@Authorized(value="Manage Scheduler") void onShutdown()
onShutdown in interface OpenmrsService
@Authorized(value="Manage Scheduler")
void shutdownTask(TaskDefinition task)
throws SchedulerException
task - the TaskDefinition for the task to cancel
SchedulerException
@Authorized(value="Manage Scheduler")
Task scheduleTask(TaskDefinition task)
throws SchedulerException
task - TaskDefinition to start
Task, or null if there was a problem instantiating or
scheduling the task
SchedulerException
@Authorized(value="Manage Scheduler")
Task rescheduleTask(TaskDefinition task)
throws SchedulerException
task - the TaskDefinition to reschedule
SchedulerException
@Authorized(value="Manage Scheduler")
void rescheduleAllTasks()
throws SchedulerException
SchedulerException@Authorized(value="Manage Scheduler") @Transactional(readOnly=true) java.util.Collection<TaskDefinition> getScheduledTasks()
@Authorized(value="Manage Scheduler") @Transactional(readOnly=true) java.util.Collection<TaskDefinition> getRegisteredTasks()
@Authorized(value="Manage Scheduler") @Transactional(readOnly=true) TaskDefinition getTask(java.lang.Integer id)
id - the identifier of the task@Authorized(value="Manage Scheduler") @Transactional(readOnly=true) TaskDefinition getTaskByName(java.lang.String name)
name - name of the task@Authorized(value="Manage Scheduler") void deleteTask(java.lang.Integer id)
id - the identifier of the task@Authorized(value="Manage Scheduler") void saveTask(TaskDefinition task)
task - the task to be created@Transactional(readOnly=true) java.util.SortedMap<java.lang.String,java.lang.String> getSystemVariables()
OpenmrsMemento saveToMemento()
void restoreFromMemento(OpenmrsMemento memento)
memento -
|
OpenMRS-1.7.x | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||