Java Doc for VishnuExpanderPlugin.java in  » Science » Cougaar12_4 » org » cougaar » lib » vishnu » client » 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.lib.vishnu.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.cougaar.lib.vishnu.client.VishnuPlugin
   org.cougaar.lib.vishnu.client.VishnuExpanderPlugin

VishnuExpanderPlugin
public class VishnuExpanderPlugin extends VishnuPlugin implements UTILExpanderPlugin(Code)
 A simple expander base class.  
 Must subclass to get full behavior.  
 Especially consider overriding handleAssignment to make the subtasks 
 appropriate for your application.
 

See Also:   VishnuExpanderPlugin.handleAssignment


Field Summary
protected  UTILExpandableTaskCallbackmyInputTaskCallback
    


Method Summary
public  voidchangeExpansion(Expansion exp)
     The plugin changes the expansion.
protected  UTILFilterCallbackcreateExpansionCallback()
    
protected  UTILFilterCallbackcreateThreadCallback(UTILGenericListener bufferingThread)
    
 Provide the callback that is paired with the buffering thread, which is a
 listener.
public  VectorgetSubtasks(Task t)
     Implemented for expand.rPlugin interface The guts of the expansion.
public  voidhandleAssignment(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText)
     Makes expansions given the task-to-asset assignment.

If the task has a setup or wrapup duration, and expansion is made and then the subtasks get allocated with the setup and wrapup durations.

public  voidhandleConstraintViolation(Expansion exp, List violatedConstraints)
     At least one constraint has been violated.
public  voidhandleFailedExpansion(Expansion exp, List failedSubtasks)
    
public  voidhandleIllFormedTask(Task t)
     Implemented for UTILBufferingPlugin Got an ill-formed task, now handle it, by publishing a failed expansion for the task.
public  voidhandleRemovedTask(Task t)
     Here's where we react to a rescinded task.
public  voidhandleSuccessfulExpansion(Expansion exp, List successfulSubtasks)
    
public  voidhandleTask(Task t)
     Implemented for UTILGenericListener interface This method Expands the given Task and publishes the PlanElement.
public  booleaninterestingExpandedTask(Task t)
     Implemented for UTILExpansionListener Gives plugin a way to filter out which expanded tasks it's interested in.
public  voidpublishChangedExpansion(Expansion exp)
    
public  voidreportChangedExpansion(Expansion exp)
     Report to superior that the expansion has changed.
public  voidsetupFilters()
     The idea is to add subscriptions (via the filterCallback), and when they change, to have the callback react to the change, and tell the listener (many times the plugin) what to do.
public  booleanwantToChangeExpansion(Expansion exp)
     Implemented for UTILExpansionListener Does the plugin want to change the expansion? For instance, although no individual preference may have been exceeded, the total score for the expansion may exceed some threshold, and so the plugin may want to alter the expansion.

Field Detail
myInputTaskCallback
protected UTILExpandableTaskCallback myInputTaskCallback(Code)





Method Detail
changeExpansion
public void changeExpansion(Expansion exp)(Code)
The plugin changes the expansion. Only called if wantToChangeExpansion returns true. Default does nothing.
See Also:   VishnuExpanderPlugin.wantToChangeExpansion
Parameters:
  exp - to change



createExpansionCallback
protected UTILFilterCallback createExpansionCallback()(Code)
create the expansion callback



createThreadCallback
protected UTILFilterCallback createThreadCallback(UTILGenericListener bufferingThread)(Code)
 Provide the callback that is paired with the buffering thread, which is a
 listener.  The buffering thread is the listener to the callback
 Creates an instance of the ExpandableTaskCallback, which means the plugin
 is looking for tasks that are naked, and not yet expanded or part of workflows.
 

Parameters:
  bufferingThread - -- the thread the callback informs when there are new input tasks an ExpandableTaskCallback with the buffering thread as its listener
See Also:   org.cougaar.lib.callback.UTILWorkflowCallback



getSubtasks
public Vector getSubtasks(Task t)(Code)
Implemented for expand.rPlugin interface The guts of the expansion. Default does nothing! Subclass should override.



handleAssignment
public void handleAssignment(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText)(Code)
Makes expansions given the task-to-asset assignment.

If the task has a setup or wrapup duration, and expansion is made and then the subtasks get allocated with the setup and wrapup durations.

Subclasses should override with a method that attaches information representing the assignment via a preposition and also call makeSetupAndWrapupTasks to create the optional setup and wrapup tasks. Probably a downstream allocator will use the preposition information to create an allocation to the assigned asset.
See Also:   org.cougaar.lib.vishnu.client.VishnuPlugin.makeSetupAndWrapupTasks
Parameters:
  task - task being assigned to asset
Parameters:
  asset - asset handling the task
Parameters:
  start - start of the main task
Parameters:
  end - end of the main task
Parameters:
  setupStart - start of a setup task, equal to start if there is no setup task
Parameters:
  wrapupEnd - end of a wrapup task, equal to end if there is no wrapup task




handleConstraintViolation
public void handleConstraintViolation(Expansion exp, List violatedConstraints)(Code)
At least one constraint has been violated. It's up to the plugin how to deal with the violation(s). Ideally, this will not happen very often, and when it does, we should hear about it.
Parameters:
  exp - that failed
Parameters:
  violatedConstraints - of Constraints that have been violated



handleFailedExpansion
public void handleFailedExpansion(Expansion exp, List failedSubtasks)(Code)
Handle a failed expansion Also must remove the GSTaskGroup from the GSS SchedulerResult storage
Parameters:
  exp - Expansion that has succeeded.



handleIllFormedTask
public void handleIllFormedTask(Task t)(Code)
Implemented for UTILBufferingPlugin Got an ill-formed task, now handle it, by publishing a failed expansion for the task.
Parameters:
  t - badly-formed task to handle



handleRemovedTask
public void handleRemovedTask(Task t)(Code)
Here's where we react to a rescinded task. does nothing by default



handleSuccessfulExpansion
public void handleSuccessfulExpansion(Expansion exp, List successfulSubtasks)(Code)
Handle a successful expansion Also must remove the GSTaskGroup from the GSS SchedulerResult storage
Parameters:
  exp - Expansion that has succeeded.



handleTask
public void handleTask(Task t)(Code)
Implemented for UTILGenericListener interface This method Expands the given Task and publishes the PlanElement. The method expandTask should be implemented by child classes.
Parameters:
  t - the task to be expanded.



interestingExpandedTask
public boolean interestingExpandedTask(Task t)(Code)
Implemented for UTILExpansionListener Gives plugin a way to filter out which expanded tasks it's interested in.
Parameters:
  t - Task that has been expanded (getTask of Expansion) true if task is interesting to this plugin



publishChangedExpansion
public void publishChangedExpansion(Expansion exp)(Code)
publish the change
See Also:   VishnuExpanderPlugin.wantToChangeExpansion
Parameters:
  exp - to change



reportChangedExpansion
public void reportChangedExpansion(Expansion exp)(Code)
Report to superior that the expansion has changed. Includes a pass through to the UTILPluginAdapter's updateAllocationResult. Updates and publishes allocation result of expansion.
Parameters:
  exp - Expansion that has changed.
See Also:   org.cougaar.lib.filter.UTILPluginAdapter.updateAllocationResult



setupFilters
public void setupFilters()(Code)
The idea is to add subscriptions (via the filterCallback), and when they change, to have the callback react to the change, and tell the listener (many times the plugin) what to do. Override and call super to add new filters, or override createXXXCallback to change callback behaviour.



wantToChangeExpansion
public boolean wantToChangeExpansion(Expansion exp)(Code)
Implemented for UTILExpansionListener Does the plugin want to change the expansion? For instance, although no individual preference may have been exceeded, the total score for the expansion may exceed some threshold, and so the plugin may want to alter the expansion. Defaults to FALSE.
Parameters:
  exp - to check true if plugin wants to change expansion



Fields inherited from org.cougaar.lib.vishnu.client.VishnuPlugin
protected VishnuComm comm(Code)(Java Doc)
protected VishnuConfig config(Code)(Java Doc)
protected VishnuDomUtil domUtil(Code)(Java Doc)
protected int firstTemplateTasks(Code)(Java Doc)
protected boolean incrementalScheduling(Code)(Java Doc)
protected boolean localDidRehydrate(Code)(Java Doc)
protected boolean makeSetupAndWrapupTasks(Code)(Java Doc)
protected SchedulerLifecycle mode(Code)(Java Doc)
protected UTILAssetCallback myAssetCallback(Code)(Java Doc)
protected Map myAssetUIDtoObject(Code)(Java Doc)
protected Set myChangedAssets(Code)(Java Doc)
protected Set myNewAssets(Code)(Java Doc)
protected Map myTaskUIDtoObject(Code)(Java Doc)
protected Document objectFormatDoc(Code)(Java Doc)
protected ResultHandler resultHandler(Code)(Java Doc)
protected boolean runDirectly(Code)(Java Doc)
protected boolean runInternal(Code)(Java Doc)
protected boolean sentFormatAlready(Code)(Java Doc)
protected boolean showTiming(Code)(Java Doc)
protected AllocationResultAggregator skipTransitARA(Code)(Java Doc)
protected boolean stopOnFailure(Code)(Java Doc)
protected int total(Code)(Java Doc)
protected boolean useStoredFormat(Code)(Java Doc)
protected boolean wantMediumConfidenceOnExpansion(Code)(Java Doc)
protected XMLProcessor xmlProcessor(Code)(Java Doc)

Methods inherited from org.cougaar.lib.vishnu.client.VishnuPlugin
protected void appendGlobalDataFormat(Document problemFormatDoc)(Code)(Java Doc)
protected void attachAssociatedFiles(Document problemFormatDoc)(Code)(Java Doc)
public void clearChangedAssets()(Code)(Java Doc)
protected void clearTasks()(Code)(Java Doc)
protected UTILAssetCallback createAssetCallback()(Code)(Java Doc)
protected SchedulerLifecycle createDirectMode()(Code)(Java Doc)
protected DirectResultHandler createDirectResultHandler()(Code)(Java Doc)
protected SchedulerLifecycle createExternalMode()(Code)(Java Doc)
protected SchedulerLifecycle createInternalMode()(Code)(Java Doc)
protected Task createMainTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc)
protected Task createSetupTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc)
protected VishnuComm createVishnuComm()(Code)(Java Doc)
protected VishnuConfig createVishnuConfig()(Code)(Java Doc)
protected VishnuDomUtil createVishnuDomUtil()(Code)(Java Doc)
protected Task createWrapupTask(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc)
protected XMLProcessor createXMLProcessor()(Code)(Java Doc)
protected XMLResultHandler createXMLResultHandler()(Code)(Java Doc)
protected Collection getAllAssets()(Code)(Java Doc)
protected UTILAssetCallback getAssetCallback()(Code)(Java Doc)
public Asset getAssetForKey(StringKey key)(Code)(Java Doc)
public Collection getChangedAssets()(Code)(Java Doc)
public XMLizer getDataXMLizer()(Code)(Java Doc)
public int getNumAssets()(Code)(Java Doc)
public int getNumTasks()(Code)(Java Doc)
protected Vector getPreferences(Task parentTask, Date readyAt, Date earliest, Date best, Date latest)(Code)(Java Doc)
protected Vector getPrepPhrases(Task parentTask, Asset a)(Code)(Java Doc)
public boolean getRunDirectly()(Code)(Java Doc)
public Task getTaskForKey(StringKey key)(Code)(Java Doc)
public String getTaskName()(Code)(Java Doc)
public Collection getTasks()(Code)(Java Doc)
public void handleAssignment(org.cougaar.planning.ldm.plan.Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, String contribs, String taskText)(Code)(Java Doc)
public void handleChangedAssets(Enumeration changedAssets)(Code)(Java Doc)
public void handleIllFormedTask(Task t)(Code)(Java Doc)
protected void handleImpossibleTasks(Collection impossibleTasks)(Code)(Java Doc)
public void handleMultiAssignment(Vector tasks, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd, boolean assetWasUsedBefore)(Code)(Java Doc)
public void handleNewAssets(Enumeration newAssets)(Code)(Java Doc)
protected void handleRemovedTasks(Enumeration removedTasks)(Code)(Java Doc)
protected void initializeWithStoredFormat()(Code)(Java Doc)
public boolean interestingAsset(Asset a)(Code)(Java Doc)
public boolean interestingTask(Task t)(Code)(Java Doc)
public void localSetup()(Code)(Java Doc)
protected List makeSetupWrapupExpansion(Task task, Asset asset, Date start, Date end, Date setupStart, Date wrapupEnd)(Code)(Java Doc)
protected void prepareData(List stuffToSend, Document objectFormatDoc)(Code)(Java Doc)
protected void prepareObjectFormat(List tasks)(Code)(Java Doc)
protected Document prepareStoredObjectFormat()(Code)(Java Doc)
public void prepareVishnuObjects(List tasksAndResources, Collection changedAssets, List vishnuTasks, List vishnuResources, List changedVishnuResources, Document objectFormat, SchedulingData schedData)(Code)(Java Doc)
public void processTasks(List tasks)(Code)(Java Doc)
protected void publishAddWithCheck(Object obj)(Code)(Java Doc)
public void publishSubtasks(boolean wantConfidence, Task t, List subtasks)(Code)(Java Doc)
public void removeTask(StringKey key)(Code)(Java Doc)
protected Map sendFormat(Collection templates, String assetClassName)(Code)(Java Doc)
protected void setUIDToObjectMap(Collection objects, Map UIDtoObject)(Code)(Java Doc)
public void setupFilters()(Code)(Java Doc)
protected void unfreezeTasks(Collection tasks)(Code)(Java Doc)
protected void waitForAnswer()(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.