public abstract class AbstractTask<V,C> extends Object implements Task<V,C>
Task.Mode, Task.State
Modifier | Constructor and Description |
---|---|
protected |
AbstractTask(String id) |
protected |
AbstractTask(String id,
Task.Mode mode) |
Modifier and Type | Method and Description |
---|---|
void |
done(V value)
This method is invoked once
Task.execute(Tracker) has successfully finished
and is called on the UI thread. |
void |
failed(Throwable cause)
This method is invoked if
Task.execute(Tracker) threw an exception. |
String |
getId()
A id that identifies this task (or a group of tasks).
|
Task.Mode |
getMode() |
void |
process(List<C> chunks)
Calls going to
Tracker.publish(Object[]) from within
Task.execute(Tracker) are routed to this method. |
void |
setMode(Task.Mode mode) |
protected AbstractTask(String id)
public String getId()
Task
TaskListener
on this id that will receive events solely for tasks with a certain id.public void done(V value)
Task
Task.execute(Tracker)
has successfully finished
and is called on the UI thread.public void failed(Throwable cause)
Task
Task.execute(Tracker)
threw an exception. This method
is executed on the UI thread.public void process(List<C> chunks)
Task
Tracker.publish(Object[])
from within
Task.execute(Tracker)
are routed to this method. This method
is invoked on the UI thread.public void setMode(Task.Mode mode)