|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface Context
Task context. Can be used to provide status updates to clients.
Null is not allowed for any method arguments or return values. Instances should internally protect any state from concurrent updates and so should require no external synchronisation if shared by multiple threads.
Nested Class Summary | |
---|---|
static class |
Context.Builder
A builder for constructing a background task Context . |
static interface |
Context.Task
A Task is a unit of work. |
Method Summary | |
---|---|
int |
getNumberOfTasksToCompletion()
Returns number of tasks not started yet, after finishing which progress is complete. |
void |
setName(String name)
Set the name of the current step. |
Context.Task |
start(Object input)
Start a new sub-task. |
Method Detail |
---|
void setName(String name)
name
- the nameContext.Task start(Object input)
finallyblock.
input
- the object of the task, can be used for tracking currently executing tasks.
int getNumberOfTasksToCompletion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |