| |
|
| org.cougaar.lib.filter.UTILPluginAdapter org.cougaar.glm.plugins.tools.GLMStimulatorPlugin
All known Subclasses: org.cougaar.glm.plugins.tools.GLMTestingStimulatorPlugin,
GLMStimulatorPlugin | public class GLMStimulatorPlugin extends UTILPluginAdapter implements GLMOrganizationListener(Code) | |
Parses an XML file defining tasks to send to other clusters.
Creates tasks defined in the XML file and sends them
to any subordinate, supporting, or provider clusters.
Pops up a dialog box which provides a way to specify the
XML file. This defaults to whatever is in the ClusterInputFile
parameter.
In addition to sending tasks, they can also be rescinded.
Tasks that have been sent are rescinded one at a time, with
each button press.
Implements the org listener interface so it can get all
reported orgs.
(This code evolved from a version in the COUGAAR tree.)
|
SUPPORTING | final public static Role SUPPORTING(Code) | | |
myGLMListener | GLMButtonListener myGLMListener(Code) | | |
reportedSeenOrgs | boolean reportedSeenOrgs(Code) | | |
tasksSent | protected Collection tasksSent(Code) | | Collection of tasks that have been sent. Needed for later rescinds
|
allocateTasks | protected void allocateTasks(Collection tasks, Collection supportedOrgs)(Code) | | Allocate the tasks to each supportedOrg.
Parameters: tasks - to send Parameters: supportedOrgs - - the orgs to send them to |
allocateToOrg | protected void allocateToOrg(Task task, Organization supportedOrg)(Code) | | Create and publish the allocation.
Parameters: task - to allocate Parameters: supportedOrg - org to allocate to |
cloneTask | protected Task cloneTask(Task toClone)(Code) | | Clone the input task
Parameters: toClone - task to copy the copy |
createGUI | protected void createGUI(String infile)(Code) | | Actually create the GUI window. Two buttons, a text input box,
and a status line.
Parameters: infile - - default input file. From param "ClusterInputFile" defined in .env.xml. |
getFinder | public ConfigFinder getFinder()(Code) | | needed so internal class can find the xml task file
|
getSupportedOrgs | protected Collection getSupportedOrgs()(Code) | | Find the organizations that we will allocate to.
Collection of supporting, subordinate, and provider organizations |
localSetup | public void localSetup()(Code) | | Reads the ClusterInputFile parameter, brings up the GUI.
|
publishMyPlanElement | protected void publishMyPlanElement(PlanElement pe)(Code) | |
Helper function to publish a plan element.
Expands the direct object and publishes any assets it finds there.
Publishes the tasks before the allocations, since they
would be automatically removed from the log plan otherwise.
Also can provide debug output about whether the task holds a passenger.
Parameters: pe - the plan element to publish |
readXmlTasks | protected Collection readXmlTasks(String xmlTaskFile)(Code) | | Parse the xml file and return the COUGAAR tasks.
Parameters: xmlTaskFile - file defining tasks to stimulate cluster with Collection of tasks defined in xml file |
rescindTasks | protected void rescindTasks(JLabel label)(Code) | | When the rescind task button is pressed, rescind the task.
Parameters: label - provides way to give feedback |
sendTasks | protected void sendTasks(JLabel label, String xmlTaskFile)(Code) | |
Parses the xml file xmlTaskFile and creates a collection of
the tasks that will be allocated to organizations. Then finds all
subordinate, supporting, and provider organizations and allocates a copy
of each task to each asset.
Sets the label on the dialog to provide feedback about the success
or failure of this process.
Note that since this is kicked off from the dialog, we must open a
transaction to do the publishing.
Parameters: label - - a label from the dialog used to provide feedback Parameters: xmlTaskFile - - the file that is used to create the tasks |
setupFilters | public void setupFilters()(Code) | | Add the filter for all organizations...
|
subordinatesHaveReported | protected boolean subordinatesHaveReported()(Code) | |
Are there any subordinates yet?
This could be false if this plugin's cluster is declared
early in the node .ini file.
true if any subordinates have reported. |
|
|
|