Java Doc for GLMStimulatorPlugin.java in  » Science » Cougaar12_4 » org » cougaar » glm » plugins » tools » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » Cougaar12_4 » org.cougaar.glm.plugins.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.)
 

Inner Class :class GLMButtonListener implements ActionListener

Field Summary
final public static  RoleSUPPORTING
    
 JFrameframe
    
 AssetUtilglmAssetUtil
    
 GLMButtonListenermyGLMListener
    
protected  GLMOrganizationCallbackmyOrgCallback
    
 booleanreportedSeenOrgs
    
protected  CollectiontasksSent
     Collection of tasks that have been sent.


Method Summary
protected  voidallocateTasks(Collection tasks, Collection supportedOrgs)
     Allocate the tasks to each supportedOrg.
protected  voidallocateToOrg(Task task, Organization supportedOrg)
     Create and publish the allocation.
protected  TaskcloneTask(Task toClone)
    
protected  voidcreateGUI(String infile)
     Actually create the GUI window.
protected  GLMOrganizationCallbackcreateOrganizationCallback()
     Create the filter for all organizations...
public  ConfigFindergetFinder()
    
protected  GLMOrganizationCallbackgetOrganizationCallback()
     Filter out/listen for all organizations...
public  CollectiongetOrgs()
    
protected  CollectiongetSupportedOrgs()
     Find the organizations that we will allocate to.
public  voidhandleChangedOrganization(Enumeration e)
     needed to implement the GLMOrganizationListener interface.
public  voidhandleNewOrganization(Enumeration e)
     needed to implement the GLMOrganizationListener interface.
public  voidlocalSetup()
     Reads the ClusterInputFile parameter, brings up the GUI.
protected  voidpublishMyPlanElement(PlanElement pe)
    
 Helper function to publish a plan element.
protected  CollectionreadXmlTasks(String xmlTaskFile)
     Parse the xml file and return the COUGAAR tasks.
protected  voidrescindTasks(JLabel label)
     When the rescind task button is pressed, rescind the task.
protected  voidsendTasks(JLabel label, String xmlTaskFile)
    
 Parses the xml file xmlTaskFile and creates a collection of
 the tasks that will be allocated to organizations.
public  voidsetupFilters()
     Add the filter for all organizations...
protected  booleansubordinatesHaveReported()
    
 Are there any subordinates yet?  
 This could be false if this plugin's cluster is declared 
 early in the node .ini file.

Field Detail
SUPPORTING
final public static Role SUPPORTING(Code)



frame
JFrame frame(Code)
frame for 2-button UI



glmAssetUtil
AssetUtil glmAssetUtil(Code)



myGLMListener
GLMButtonListener myGLMListener(Code)



myOrgCallback
protected GLMOrganizationCallback myOrgCallback(Code)
The callback mediating the org subscription



reportedSeenOrgs
boolean reportedSeenOrgs(Code)



tasksSent
protected Collection tasksSent(Code)
Collection of tasks that have been sent. Needed for later rescinds





Method Detail
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.



createOrganizationCallback
protected GLMOrganizationCallback createOrganizationCallback()(Code)
Create the filter for all organizations...



getFinder
public ConfigFinder getFinder()(Code)
needed so internal class can find the xml task file



getOrganizationCallback
protected GLMOrganizationCallback getOrganizationCallback()(Code)
Filter out/listen for all organizations...



getOrgs
public Collection getOrgs()(Code)
get Organizations



getSupportedOrgs
protected Collection getSupportedOrgs()(Code)
Find the organizations that we will allocate to. Collection of supporting, subordinate, and provider organizations



handleChangedOrganization
public void handleChangedOrganization(Enumeration e)(Code)
needed to implement the GLMOrganizationListener interface. Does nothing.
See Also:   org.cougaar.glm.callback.GLMOrganizationListener



handleNewOrganization
public void handleNewOrganization(Enumeration e)(Code)
needed to implement the GLMOrganizationListener interface. Does nothing.
See Also:   org.cougaar.glm.callback.GLMOrganizationListener



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.



Fields inherited from org.cougaar.lib.filter.UTILPluginAdapter
protected double HIGH_CONFIDENCE(Code)(Java Doc)
protected UTILAggregate aggregateHelper(Code)(Java Doc)
protected UTILAllocate allocHelper(Code)(Java Doc)
protected UTILAsset assetHelper(Code)(Java Doc)
protected boolean checkedDidRehydrate(Code)(Java Doc)
protected UTILExpand expandHelper(Code)(Java Doc)
protected PlanningFactory ldmf(Code)(Java Doc)
protected LoggingService logger(Code)(Java Doc)
protected String myClusterName(Code)(Java Doc)
protected String myName(Code)(Java Doc)
protected ParamMap myParams(Code)(Java Doc)
protected Vector mySubscriptions(Code)(Java Doc)
protected ParamParser paramParser(Code)(Java Doc)
protected PersistentState persistentState(Code)(Java Doc)
protected UTILPreference prefHelper(Code)(Java Doc)
protected UTILPrepPhrase prepHelper(Code)(Java Doc)
protected Plan realityPlan(Code)(Java Doc)
protected boolean showinfoOnFailure(Code)(Java Doc)
protected boolean skipLowConfidence(Code)(Java Doc)
protected UTILVerify verifyHelper(Code)(Java Doc)

Methods inherited from org.cougaar.lib.filter.UTILPluginAdapter
public void addFilter(UTILFilterCallback callbackObj)(Code)(Java Doc)
protected ParamMap createParamTable(Vector envParams, MessageAddress ident)(Code)(Java Doc)
protected void debug(String message)(Code)(Java Doc)
protected boolean didSpawn()(Code)(Java Doc)
protected void error(String message)(Code)(Java Doc)
protected void execute()(Code)(Java Doc)
protected void fatal(String message)(Code)(Java Doc)
protected PersistentState findState()(Code)(Java Doc)
protected String getClassName()(Code)(Java Doc)
protected String getClassName(Object obj)(Code)(Java Doc)
public String getClusterName()(Code)(Java Doc)
public void getEnvData()(Code)(Java Doc)
final protected LDMService getLDMService()(Code)(Java Doc)
protected LoggingService getLoggingService()(Code)(Java Doc)
public ParamMap getMyParams()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
protected MessageAddress getOriginalAgentID()(Code)(Java Doc)
protected void info(String message)(Code)(Java Doc)
protected boolean isDebugEnabled()(Code)(Java Doc)
protected boolean isErrorEnabled()(Code)(Java Doc)
protected boolean isFatalEnabled()(Code)(Java Doc)
protected boolean isInfoEnabled()(Code)(Java Doc)
protected boolean isWarnEnabled()(Code)(Java Doc)
protected void justRehydrated()(Code)(Java Doc)
public void localSetup()(Code)(Java Doc)
public void preFilterSetup()(Code)(Java Doc)
final protected void publishAdd(Object o)(Code)(Java Doc)
final protected void publishChange(Object o)(Code)(Java Doc)
final protected void publishRemove(Object o)(Code)(Java Doc)
protected void registerPersistentState(Object obj)(Code)(Java Doc)
protected void rehydrateState(List stuff)(Code)(Java Doc)
public void removeFilter(UTILFilterCallback callbackObj)(Code)(Java Doc)
final public void setLDMService(LDMService s)(Code)(Java Doc)
public void setLoggingService(LoggingService bs)(Code)(Java Doc)
public void setupFilters()(Code)(Java Doc)
final protected void setupSubscriptions()(Code)(Java Doc)
public IncrementalSubscription subscribeFromCallback(UnaryPredicate pred)(Code)(Java Doc)
public IncrementalSubscription subscribeFromCallback(UnaryPredicate pred, Collection specialContainer)(Code)(Java Doc)
public void updateAllocationResult(PlanElement cpe)(Code)(Java Doc)
protected void warn(String message)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.