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.
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. |
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.
Task
public Task()
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()