|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ls.util.taskrun.Task
Every object implementing this interface provides can be executed as a task. The particular operations of the task
will be implemented by the method run()
Constructor Summary | |
Task()
|
Method Summary | |
Map |
getEnvironment()
Returns the environment map used for this task batch. |
ILogger |
getLogger()
Returns the logger instance used for reporting information concerning task. |
XMLFragment |
getParameter()
Returns the parameters for the current run of the task. |
String |
getTaskId()
Returns the id assigned to this task object. |
void |
reset()
This method can be overwritten to perform some cleanup operations after the task was executed. |
abstract void |
run()
An implementation of this method provides the particular opertations to take when the task is executed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Task()
Method Detail |
public final String getTaskId()
public final Map getEnvironment()
public final ILogger getLogger()
public final XMLFragment getParameter()
public abstract void run() throws TaskException
TaskException
- If the task could not be executed successfully.public void reset()
run()
has returned, even with an exception. Resetting a task instance should
automatically prepare it for the next execution.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |