| java.lang.Object org.cougaar.lib.vishnu.client.PluginHelper org.cougaar.lib.vishnu.client.ExternalMode org.cougaar.lib.vishnu.client.InternalMode org.cougaar.lib.vishnu.client.DirectMode
DirectMode | public class DirectMode extends InternalMode (Code) | | Direct mode.
Creates an internal instance of the scheduler and talks to it, instead
of to a web server. Uses direct translation of Cougaar to Vishnu objects,
and reads the assignments directly. No XML involved.
Needs the plugin to be a DirectResultListener. Mainly this means implementing
the prepareVishnuObjects method.
See Also: DirectResultListener |
debugParseAnswer | protected boolean debugParseAnswer(Code) | | |
vishnuTasksvishnuResourceschangedVishnuResources | protected List vishnuTasksvishnuResourceschangedVishnuResources(Code) | | |
addTasksDirectly | protected void addTasksDirectly(SchedulingData data, List vishnuTasks, List vishnuResources, List changedVishnuResources)(Code) | | calls methods on SchedulingData to add tasks, resources, and changed resources
|
localSetup | protected void localSetup()(Code) | | |
prepareData | public void prepareData(List stuffToSend, Document objectFormatDoc)(Code) | | Handles direct mode differently from external/internal.
Calls prepareVishnuObjects on listener to populate vishnuTasks and
vishnuResources lists with Vishnu objects.
Also sends header with the time window information, and any other
data to scheduler via the internal buffer (in VishnuComm).
Parameters: stuffToSend - Cougaar tasks and assets Parameters: objectFormatDoc - used to figure out info about fields |
run | public void run()(Code) | | Run directly. Give Vishnu tasks and resources to scheduler and get assignments
back, without using XML.
Uses internalBuffer to send the specs, the object format and other data.
Adds the task and resources (addTasksDirectly), and then runs the scheduler
(Scheduler.scheduleInternal). Reads the assignments with
directlyHandleAssignments.
vishnuTasks and vishnuResources are created in prepareData and populated
in #prepareVishnuObjects.
See Also: DirectMode.addTasksDirectly See Also: DirectMode.prepareData See Also: org.cougaar.lib.vishnu.client.VishnuPlugin.prepareVishnuObjects See Also: com.bbn.vishnu.scheduling.Scheduler.scheduleInternal |
|
|