public class TaskProcessor extends Object
Modifier and Type | Field and Description |
---|---|
protected Context |
context |
protected com.ebmwebsourcing.easycommons.log.LoggingUtil |
log |
protected List<Task> |
taskList |
Constructor and Description |
---|
TaskProcessor(Context context,
com.ebmwebsourcing.easycommons.log.LoggingUtil log) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected Context context
protected com.ebmwebsourcing.easycommons.log.LoggingUtil log
public TaskProcessor(Context context, com.ebmwebsourcing.easycommons.log.LoggingUtil log)
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
processingtrue
if the process is successful, false
otherwisepublic boolean unprocess()
true
if the process is successful, false
otherwiseCopyright © 2005-2016 Linagora. All Rights Reserved.