|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Async | This interface is empty on purpose, and is used only for tagging of SAGA classes which implement the SAGA task model. |
Task<T,E> | Tasks can only be created through asynchronous method calls. |
TaskContainer | Container object for tasks. |
Class Summary | |
---|---|
TaskFactory | Factory for objects in the task package. |
Enum Summary | |
---|---|
State | This enumeration type describes the possible states of a task. |
TaskMode | This enumeration type describes the possible ways to create a task: Asynchronous (the task is started in RUNNING state), Task (the task is started in NEW state), or Synchronous (the task is started and waited for). |
WaitMode | When waiting for tasks in a task container, the user can either wait for all tasks in the container, or for any task in the container. |
This package provides classes and methods for manipulating tasks and
collections of tasks. Tasks get created by invoking methods that return a task,
so there are no factory methods for them.
A task has two generic type parameters: the type of the object that created
the task, and the type of the return value of the task.
Tasks can be stored in a TaskContainer
.
However, since a task container should be able to contain any task
(and even jobs), the generic type information gets lost.
So, when a task is pulled from a task container, the return type of
getResult()
is
Object
. If necessary, the user can associate information
about the task with the task's UUID, and use that information to cast
the result to the correct type. This is beyond the scope of Java generics.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |