Class PlannerThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--PlannerThread
All Implemented Interfaces:
java.lang.Runnable

public class PlannerThread
extends java.lang.Thread


Field Summary
static java.lang.String PO_SEPARATOR
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PlannerThread(Agent lA, LinkedListQ obj, LinkedListQ TaskQueue, LinkedListQ WITQ, java.util.Hashtable taskTemplates, Semaphore one, Semaphore two, Semaphore GPGPn)
           
 
Method Summary
 void DebugPlan(java.lang.String Message)
           
 LinkedListQ getNameAndArgs(java.lang.String Message)
           
 boolean getPlan(java.lang.String taskName, java.lang.String reqId, java.lang.String tracingName)
          This function does the following: reads existing plan from the library of plans in the hastable taskTemplates It sets the taskId for each task of the plan Saves the plan and each of its tasks into Hashtables
 void run()
          procedure that runs around and executes.
 void runPlanner()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PO_SEPARATOR

public static java.lang.String PO_SEPARATOR
Constructor Detail

PlannerThread

public PlannerThread(Agent lA,
                     LinkedListQ obj,
                     LinkedListQ TaskQueue,
                     LinkedListQ WITQ,
                     java.util.Hashtable taskTemplates,
                     Semaphore one,
                     Semaphore two,
                     Semaphore GPGPn)
Method Detail

run

public void run()
procedure that runs around and executes. The Planner is notified when an ObjectivesCell is added to the ObjectivesQ It takes the ObjectiveCell off the ObjectivesQ, parses the content string of the kqml message, creates a by value copy of the task to be run, and creates a TaskQuCell to be added to the TaskQ. Note: the copy of the task to be completed is by value and is an exact copy except all of the taskIds, subtasknames, and provision reciever's to's have the objID concated to them. -MM 6/14/1999

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

runPlanner

public void runPlanner()
                throws NonCriticalAgentException,
                       CriticalAgentException
NonCriticalAgentException
CriticalAgentException

getNameAndArgs

public LinkedListQ getNameAndArgs(java.lang.String Message)

getPlan

public boolean getPlan(java.lang.String taskName,
                       java.lang.String reqId,
                       java.lang.String tracingName)
This function does the following:
  1. reads existing plan from the library of plans in the hastable taskTemplates
  2. It sets the taskId for each task of the plan
  3. Saves the plan and each of its tasks into Hashtables


DebugPlan

public void DebugPlan(java.lang.String Message)