|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.petals.microkernel.api.jbi.management.TaskProcessor
public class TaskProcessor
The TaskProcessor executes an ordered List of Tasks : it calls the execute method on each Task. It ensures the system state recovery in case of failure during the Tasks processing : it will call the undo method on each allready executed Task before the whole process crash.
Field Summary | |
---|---|
protected Context |
context
|
protected LoggingUtil |
log
|
protected List<Task> |
taskList
|
Constructor Summary | |
---|---|
TaskProcessor(Context context,
LoggingUtil log)
|
Method Summary | |
---|---|
void |
addTask(Task task)
Add a new Task in the List of Tasks to execute. |
Throwable |
process()
Process each Task previously added to the Processor, in the same order as they have been added to it. |
boolean |
unprocess()
Unprocess each Task previously added to the Processor, in the reversed order they have been added to it. |
boolean |
unprocess(int step)
Unprocess each Task previously added to the Processor from the step provided, in the reversed order they have been added to it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List<Task> taskList
protected Context context
protected LoggingUtil log
Constructor Detail |
---|
public TaskProcessor(Context context, LoggingUtil log)
Method Detail |
---|
public void addTask(Task task)
task
- a new Task to processpublic Throwable process()
null
otherwisepublic boolean unprocess(int step)
step
- . The task number reference into the list to start the reverse
processing
true
if the process is successful, false
otherwisepublic boolean unprocess()
true
if the process is successful, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |