|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface Task
An interface for generic tasks.
Unlike a Runnable, a Task should not process indefinitely.
It has some finite work to do; it does it; and returns a result.
A Task can be interrupted, although this does not garrantee that it will return immediately.
| Field Summary | |
|---|---|
static int |
DATA_ERROR
A data error has halted Task processing |
static int |
ERROR
An error has halted Task processing |
static int |
FINISHED
Task has finished processing |
static int |
INTERRUPTED
Task was been interrupted |
static int |
PROMPT
Task is prompting, waiting for input |
static int |
RUNNING
Task is processing |
static int |
START
Task has started processing |
static int |
SUCCESS
Task has finished processing successfully |
| Method Summary | |
|---|---|
Element |
getDefinition()
|
String |
getName()
|
Task |
getParent()
|
Map<String,String> |
getProperties()
|
String |
getType()
|
void |
interrupt()
Tells the Task to stop processing. |
int |
process(ExecutionContext context)
The central work method. |
int |
validate(ValidationContext context)
Check whether this task should be able to run. |
| Field Detail |
|---|
static final int DATA_ERROR
static final int ERROR
static final int FINISHED
static final int INTERRUPTED
static final int PROMPT
static final int RUNNING
static final int START
static final int SUCCESS
| Method Detail |
|---|
Element getDefinition()
String getName()
Task getParent()
Map<String,String> getProperties()
String getType()
void interrupt()
int process(ExecutionContext context)
throws Exception
context - A concrete ExecutionContext
Exceptionint validate(ValidationContext context)
context - A concrete ValidationContext
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||