| java.lang.Object org.cougaar.lib.vishnu.client.PluginHelper org.cougaar.lib.vishnu.client.DirectResultHandler
DirectResultHandler | public class DirectResultHandler extends PluginHelper implements ResultHandler(Code) | |
For Direct mode. Handles results returned directly from scheduler.
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.prepareVishnuObjects |
debugParseAnswer | protected boolean debugParseAnswer(Code) | | |
knownTimeResourceIDPairs | Set knownTimeResourceIDPairs(Code) | | For every assignment, remember the start time + resource id, which uniquely identifies each assignment
This way we can tell if the resource has been used before
|
resourcesToTimeSpanSet | Map resourcesToTimeSpanSet(Code) | |
Directly handle assignments.
If the assignment is a one-to-one assignment, call parseAssignment directly.
parseAssignment will call the resultHandler's handleAssignment. This typically
results in an allocation or expansion.
Otherwise if it's a multi-task assignment, calls handleMultiAssignment. This
typically results in an aggregation set and an MPTask.
Asks the scheduler for which assignment is being done.
Asks the scheduler data for the list of tasks and resources.
Uses the time ops object to convert Vishnu time into ALP time.
WARNING WARNING WARNING WARNING WARNING WARNING
The multitask flag must be set to grouped if using a VishnuAggregator.
If not, things won't work properly here.
WARNING WARNING WARNING WARNING WARNING WARNING
See Also: com.bbn.vishnu.scheduling.Scheduler.assignmentsMultitask See Also: com.bbn.vishnu.scheduling.SchedulingData.getTasks See Also: com.bbn.vishnu.scheduling.SchedulingData.getResources See Also: ResultListener.handleAssignment See Also: ResultListener.handleMultiAssignment |
writeXMLToFile | protected boolean writeXMLToFile(Code) | | parameter -- write xml to a file
|
directlyHandleAssignments | public void directlyHandleAssignments(Scheduler sched, SchedulingData data, TimeOps timeOps)(Code) | | |
getAssignedAsset | protected Asset getAssignedAsset(String resource)(Code) | | Asks resultListener for asset corresponding to key resource
Parameters: resource - key returned from assignment xml equivalent ALP asset |
getTaskFromAssignment | protected Task getTaskFromAssignment(String task)(Code) | | Asks resultListener for task corresponding to key task.
Removes the task from the the list of known tasks kept in the plugin
See Also: VishnuPlugin.removeTask Parameters: task - key returned from assignment xml equivalent ALP task |
localSetup | protected void localSetup()(Code) | | sets parameter : debugParseAnswer
|
|
|