|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openmrs.scheduler.tasks.AbstractTask
public abstract class AbstractTask
Base class for all other task classes.
| Field Summary | |
|---|---|
protected boolean |
isExecuting
|
protected TaskDefinition |
taskDefinition
|
| Constructor Summary | |
|---|---|
protected |
AbstractTask()
Default constructor |
protected |
AbstractTask(TaskDefinition taskDefinition)
Constructor |
| Method Summary | |
|---|---|
protected void |
authenticate()
Authenticate the context so the task can call service layer. |
abstract void |
execute()
Executes the task defined in the task definition. |
void |
initialize(TaskDefinition definition)
Initializes the task and sets the task definition. |
boolean |
isExecuting()
Returns true if the task is currently in its execute() method. |
void |
shutdown()
Callback method used to clean up resources used during the tasks execution. |
void |
startExecuting()
Callback method that tells the task that it has started executing. |
void |
stopExecuting()
Callback method that tells the task that it has stopped executing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean isExecuting
protected TaskDefinition taskDefinition
| Constructor Detail |
|---|
protected AbstractTask()
protected AbstractTask(TaskDefinition taskDefinition)
definition - the task definition| Method Detail |
|---|
public abstract void execute()
Task
execute in interface TaskTask.execute()public boolean isExecuting()
Task
isExecuting in interface TaskTask.isExecuting()public void initialize(TaskDefinition definition)
Task
initialize in interface Taskorg.openmrs.scheduler.Task#initialize(org.openmrs.scheduler.TaskConfig)public void shutdown()
Task
shutdown in interface TaskTask.shutdown()public void startExecuting()
public void stopExecuting()
protected void authenticate()
|
OpenMRS-trunk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||