fipaos.agent.task
Class TaskState

java.lang.Object
  |
  +--fipaos.agent.task.TaskState

public class TaskState
extends java.lang.Object

Represents the current state of a particular Task within the TaskManager


Field Summary
static int TASK_EXECUTING
          Indicates that a Task is currently executing
static int TASK_IDLE
          Indicates that a Task is not executing and has no pending events
static int TASK_READY_TO_CONTINUE
          Indicates that a Task is ready to continue execution (events pending)
static int TASK_READY_TO_START
          Indicates that a Task is ready to start initial execution
 
Constructor Summary
TaskState()
           
 
Method Summary
 TaskEvent getNextEvent()
          Get the next TaskEvent that the Task this belongs to should receive - this removes the event from the pending list
 int getState()
          Get the state of the Task
 TaskEvent peekNextEvent()
          Peek at the next TaskEvent that the Task this belongs to should receive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_IDLE

public static final int TASK_IDLE
Indicates that a Task is not executing and has no pending events

TASK_EXECUTING

public static final int TASK_EXECUTING
Indicates that a Task is currently executing

TASK_READY_TO_START

public static final int TASK_READY_TO_START
Indicates that a Task is ready to start initial execution

TASK_READY_TO_CONTINUE

public static final int TASK_READY_TO_CONTINUE
Indicates that a Task is ready to continue execution (events pending)
Constructor Detail

TaskState

public TaskState()
Method Detail

getState

public int getState()
Get the state of the Task

peekNextEvent

public TaskEvent peekNextEvent()

Peek at the next TaskEvent that the Task this belongs to should receive

Returns:
Return null if getState() != TASK_READY_TO_CONTINUE

getNextEvent

public TaskEvent getNextEvent()

Get the next TaskEvent that the Task this belongs to should receive - this removes the event from the pending list

Returns:
Return null if getState() != TASK_READY_TO_CONTINUE