|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD | |||||||
public interface Task
A long-running task.
The contract is this of UIThreadWorker with the difference that in case of an execution exception the failed(Throwable) method is invoked and done(Object) is not.| Nested Class Summary | |
|---|---|
enum |
Task.Mode
@author Eike Kettner |
enum |
Task.State
@author Eike Kettner |
| Method Summary | |
|---|---|
void
|
done(Object value)
This method is invoked once execute(Tracker) has successfully finished and is called on the UI thread. |
Object
|
execute(Tracker tracker)
This method implements the long-running work and returns a result. |
void
|
failed(Throwable cause)
This method is invoked if execute(Tracker) threw an exception. |
String
|
getId()
A id that identifies this task (or a group of tasks). |
Task.Mode
|
getMode()
|
void
|
process(List chunks)
Calls going to Tracker.publish from within execute(Tracker) are routed to this method. |
Task
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
Task
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
Task[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Task[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Method Detail |
|---|
public void done(Object value)
public Object execute(Tracker tracker)
tracker - to publish intermediate results
public void failed(Throwable cause)
public String getId()
public Task.Mode getMode()
public void process(List chunks)
Task valueOf(String name)
Task valueOf(String name)
Task[] values()
Task[] values()
Groovy Documentation