| 
 | ||||||||
| 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_ERRORA data error has halted Task processing | 
| static int | ERRORAn error has halted Task processing | 
| static int | FINISHEDTask has finished processing | 
| static int | INTERRUPTEDTask was been interrupted | 
| static int | PROMPTTask is prompting, waiting for input | 
| static int | RUNNINGTask is processing | 
| static int | STARTTask has started processing | 
| static int | SUCCESSTask 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 | |||||||