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


org.cougaar.lib.filter.UTILPluginAdapter
   org.cougaar.lib.filter.UTILBufferingPluginAdapter

All known Subclasses:   org.cougaar.logistics.plugin.trans.base.SequentialPlannerPlugin,  org.cougaar.lib.vishnu.client.VishnuPlugin,  org.cougaar.lib.filter.UTILAggregatorPluginAdapter,  org.cougaar.lib.filter.UTILExpanderPluginAdapter,  org.cougaar.lib.filter.UTILAllocatorPluginAdapter,
UTILBufferingPluginAdapter
abstract public class UTILBufferingPluginAdapter extends UTILPluginAdapter implements UTILBufferingPlugin(Code)
 Example implementation of a plugin that buffers tasks 
 until a certain threshold is reached.  processTasks is then called.
 allocators, expanders, and aggregators should all be derived from 
 this instead of PluginAdapter; we can then turn on buffering at a higher
 level by changing the default for buffering from 1. (which is = to no 
 buffering at all)
 Abstract because these are undefined:
 createThreadCallback -- half of the determination of the flavor of a plugin
 (Allocator, Expander, Aggregator).  The other half is declaring them listeners
 of the right type.
 processTasks -- different for each plugin flavor
 

Inner Class :public class PluginAlarm implements Alarm

Field Summary
protected  AgentIdentificationServiceagentIDService
    
protected  UTILBufferingThreadbufferingThread
    
protected  PluginAlarmcurrentAlarm
    
protected  UTILPreferenceprefHelper
    
protected  QuiescenceReportServiceqService
    
protected  Schedulableschedulable
    
protected  ThreadServicethreadService
    
protected  UTILVerifyverify
    


Method Summary
protected  UTILBufferingThreadcreateBufferingThread()
     The listening buffering thread communicates with the plugin across the UTILBufferingPlugin interface.
abstract protected  UTILFilterCallbackcreateThreadCallback(UTILGenericListener listener)
     Provide the callback that is paired with the buffering thread, which is a listener.
public  voidexamineBufferAgainIn(long delayTime)
    
protected  voidexecute()
     Called every time one of the filterCallback subscriptions change.
protected  UTILBufferingThreadgetBufferingThread()
    
public  booleaninterestingTask(Task t)
     Implemented for UTILBufferingPlugin OVERRIDE to specialize tasks you find interesting.
public  booleanisTaskWellFormed(Task t)
    
 Examines task to see if task looks like what the plugin 
 expects it to look like.
 This is plugin-dependent.
public  voidlocalSetup()
    
 Start up the task buffering thread.
 Note that localSetup is called AFTER setupFilters, so 
 getBufferingThread will not return null;
 IT IS CRUCIAL that this gets called with super () if this
 is overridden!  Otherwise, plugin will be effectively dead.
abstract public  voidprocessTasks(List tasks)
     Implemented for UTILBufferingPlugin Deal with the tasks that we have accumulated.
protected  voidreportIllFormedTask(Task t)
    
public  voidresume()
    
final public  voidsetQuiescenceReportService(QuiescenceReportService qService)
    
public  voidsetupFilters()
    
public  voidwakeUp()
    

Field Detail
agentIDService
protected AgentIdentificationService agentIDService(Code)



bufferingThread
protected UTILBufferingThread bufferingThread(Code)



currentAlarm
protected PluginAlarm currentAlarm(Code)



prefHelper
protected UTILPreference prefHelper(Code)



qService
protected QuiescenceReportService qService(Code)



schedulable
protected Schedulable schedulable(Code)



threadService
protected ThreadService threadService(Code)



verify
protected UTILVerify verify(Code)





Method Detail
createBufferingThread
protected UTILBufferingThread createBufferingThread()(Code)
The listening buffering thread communicates with the plugin across the UTILBufferingPlugin interface. This plugin is NOT a workflow listener. UTILListeningBufferingThread with this as the BufferingPlugin
See Also:   UTILBufferingPlugin
See Also:   UTILListeningBufferingThread



createThreadCallback
abstract protected UTILFilterCallback createThreadCallback(UTILGenericListener listener)(Code)
Provide the callback that is paired with the buffering thread, which is a listener. The buffering thread is the listener to the callback a FilterCallback with the buffering thread as its listener



examineBufferAgainIn
public void examineBufferAgainIn(long delayTime)(Code)
Buffering runnable wants to restart later



execute
protected void execute()(Code)
Called every time one of the filterCallback subscriptions change. What the plugin does in response to a changed subscription. Directs the filterCallback with the changed subscription to react to the change in some way.



getBufferingThread
protected UTILBufferingThread getBufferingThread()(Code)
accessor



interestingTask
public boolean interestingTask(Task t)(Code)
Implemented for UTILBufferingPlugin OVERRIDE to specialize tasks you find interesting.
Parameters:
  t - Task to check for interest boolean true if task is interesting



isTaskWellFormed
public boolean isTaskWellFormed(Task t)(Code)
 Examines task to see if task looks like what the plugin 
 expects it to look like.
 This is plugin-dependent.  For example, the
 planning factor for unloading a ship is 2 days, but
 if the task's time window is 1 day, the task is
 not "well formed."  Duration is a common test, but others
 could also be a good idea...
 This is an explicit contract with the plugin
 that feeds this plugins tasks, governing which tasks
 are possible for this plugin to handle.
 

Parameters:
  t - Task to check for consistency true if task is OK



localSetup
public void localSetup()(Code)
 Start up the task buffering thread.
 Note that localSetup is called AFTER setupFilters, so 
 getBufferingThread will not return null;
 IT IS CRUCIAL that this gets called with super () if this
 is overridden!  Otherwise, plugin will be effectively dead. 
 



processTasks
abstract public void processTasks(List tasks)(Code)
Implemented for UTILBufferingPlugin Deal with the tasks that we have accumulated. ABSTRACT, so derived plugins must implement this.
Parameters:
  tasks - List of tasks to handle



reportIllFormedTask
protected void reportIllFormedTask(Task t)(Code)



resume
public void resume()(Code)



setQuiescenceReportService
final public void setQuiescenceReportService(QuiescenceReportService qService)(Code)



setupFilters
public void setupFilters()(Code)
Note that setupFilters is called BEFORE localSetup, so getBufferingThread will not return null;



wakeUp
public void wakeUp()(Code)



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.