|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ITaskInstance
Task instance representation.
This is a wrapper for running instance of a task.
The class implementing this interface is not the main class of the
task. It is not possible to get the reference to it using this API. Please
use task function mechanism to implement interaction between tasks
getTaskFunction(Class).
ITask| Method Summary | ||
|---|---|---|
void |
addStateListener(ITaskInstanceStateListener listener)
Adds a listener for the user task's TaskState changes. |
|
Throwable |
getError()
Gets the exception which caused termination of the task instance. |
|
List<Object> |
getParameters()
Gets all parameters with which the instance was started. |
|
|
getTaskFunction(Class<F> functionClass)
Returns an instance of the type represented by the given task function class that allows access to the task function provided this task instance. |
|
void |
removeStateListener(ITaskInstanceStateListener listener)
Unregisters a TaskState change event listener. |
|
| Method Detail |
|---|
List<Object> getParameters()
<F> F getTaskFunction(Class<F> functionClass)
This proxy allows the methods of the task function to be called only when
the providing task instance is running. If you access the task function
methods while the providing instance is not running yet or has stopped
running, an InstanceNotRunningException will be thrown from the
method. If you need to wait for the availability of the task function,
you can create a TaskFunctionMonitor.
F - The type of the task function.functionClass - The task function class.
FunctionNotAvailableException - if this instance does not provide task functions of the given
typevoid addStateListener(ITaskInstanceStateListener listener)
TaskState changes. The
listeners will be called synchronously from a separate, single thread
before resuming with the execution.
listener - the event listener to registervoid removeStateListener(ITaskInstanceStateListener listener)
TaskState change event listener.
listener - the event listener to unregisterThrowable getError()
null if instance was finished normally.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||