stamp.util.os
Class Task

java.lang.Object
  |
  +--stamp.util.LinkedListItem
        |
        +--stamp.util.os.Task

public abstract class Task
extends LinkedListItem

A task that is run whenever there are free cycles.


Field Summary
 Task nextTask
           
 int state
          State of the task.
 
Fields inherited from class stamp.util.LinkedListItem
nextItem
 
Constructor Summary
Task()
           
 
Method Summary
 void enterExecute()
           
 void enterWait()
           
abstract  void execute()
          Perform a period task.
 void stop()
           
abstract  void wait()
          If a task is waiting for an event to occur this is a chance for the task to change its state.
 
Methods inherited from class java.lang.Object
equals
 

Field Detail

nextTask

public Task nextTask

state

public int state
State of the task. Initialized to STATE_READY so the task will execute as soon as possible.
Constructor Detail

Task

public Task()
Method Detail

execute

public abstract void execute()
Perform a period task. All subclasses must implement this method. An idle task is executed whenever the GUI is idle. Implementations of execute() should not take more than 100ms to ensure that the interface remains responsive.

wait

public abstract void wait()
If a task is waiting for an event to occur this is a chance for the task to change its state.

enterWait

public void enterWait()

enterExecute

public void enterExecute()

stop

public void stop()