All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface calypso.util.tasc.Task

public interface Task
extends Runnable
An interface for tasks. The tasks are executable objects that are executed by calling their run() methods. Usually this is done by schedulers. To enable this, the concrete tasks classes must implement the java.lang.Runnable interface. See the Scheduler interface for more information about scheduling mechanisms.

Requirement 1: A task must return from its run() method as quickly as possible, so that the associated scheduler can execute the next task and that control can be given up to the other threads. Due to this, long-lasting tasks must be divided into shorter-lasting subtasks, and tasks that block (for example, in wait() method) must be executed asynchronously in their own threads.

Author:
Petteri Koponen
See Also:
Scheduler, TaskScheduler, TaskSHandle


All Packages  Class Hierarchy  This Package  Previous  Next  Index