|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.sapia.taskman.TaskContext
Models the execution context of a Task.
| Method Summary | |
void |
execAsyncNestedTask(String name,
Task t)
Triggers the asynchronous execution of the passed-in task. |
void |
execSyncNestedTask(String name,
Class taskClass,
TaskContext ctx)
Triggers the synchronous execution of the task whose class is given. |
void |
execSyncNestedTask(String name,
Task t)
Triggers the synchronous execution of the passed-in task. |
TaskContext |
exportVal(Object key,
Object value)
"Exports" the given value to this context - binding it to the given key. |
TaskOutput |
getTaskOutput()
Returns a TaskOutput. |
Object |
importVal(Object key)
"Imports" the value corresponding to the given key. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public TaskOutput getTaskOutput()
TaskOutput.
TaskOutput.
public TaskContext exportVal(Object key,
Object value)
key - the key under which to import the given value.value - the Object to export - if an object
is already bound to the given key, it is overwritten.
public Object importVal(Object key)
key - the key for which to retrieve the value.
Object that was bound to the given
key, or null if no object could be found.exportVal(Object, Object)
public void execSyncNestedTask(String name,
Task t)
name - the name of the task to execute.t - the Task to execute.
public void execAsyncNestedTask(String name,
Task t)
name - the name of the task to execute.t - the Task to execute.
public void execSyncNestedTask(String name,
Class taskClass,
TaskContext ctx)
throws IllegalAccessException,
InstantiationException
name - the name of the task to execute.ctx - the TaskContext that will be passed to
the task in its execution.
IllegalAccessException - if the current thread does not have access
to the class' no-arg constructor, or if the class is not public.
InstantiationException - if the task instance corresponding to the
class could not be created.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||