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


org.cougaar.planning.plugin.legacy.SimplePlugin
   org.cougaar.servicediscovery.plugin.SDClientPlugin

All known Subclasses:   org.cougaar.logistics.plugin.servicediscovery.ALDynamicSDClientPlugin,  org.cougaar.servicediscovery.plugin.SDMiniClientPlugin,
SDClientPlugin
public class SDClientPlugin extends SimplePlugin (Code)
Look up in YP agents providing roles given as parameters, by creating MMRequests for these. When it gets answers, create relays with those agents asking for the service. Keep asking until have contracts in the relays for all roles and all time intervals.


Field Summary
protected  EventServicemyEventService
    
protected  LoggingServicemyLoggingService
    
protected  SDFactorymySDFactory
    
protected  IncrementalSubscriptionmyServiceContractRelaySubscription
    


Method Summary
protected  booleanalreadyAskedForContractWithProvider(Role role, String providerName, TimeSpan timeSpan)
    
protected  NonOverlappingTimeSpanSetbuildOPCONSchedule()
    
protected  booleancheckProviderCompletelyCovered(Role role, TimeSpan timeSpan)
    
protected  booleancheckProviderCompletelyRequested(Role role, TimeSpan timeSpan)
    
protected  booleancontinuousCoverage(TimeSpan targetTimeSpan, TimeSpanSet timeSpanSet)
    
protected  booleancovered(Role role, TimeSpan timeSpan)
    
public  StringdateString(Date date)
    
public  voidexecute()
    
protected  voidfindProviders()
    
protected  voidgenerateServiceRequests(Collection mmRequests)
     For each answered request, pick an appropriate provider and send them a service request.
protected  LineagegetCommandLineage(TimeSpan timeSpan)
    
protected  CollectiongetCurrentlyUncoveredIntervalsWithoutOutstandingRequests(long desiredStart, long desiredEnd, Role role)
     For this role, check if there is a non-revoked service contract or an unanswered request.
protected  intgetDesiredNumberOfProviders(Role role)
    
protected  IncrementalSubscriptiongetMMRequestSubscription()
    
protected  StringgetMinimumEchelon(Role role)
    
protected  NonOverlappingTimeSpanSetgetOPCONSchedule()
    
protected  TimeSpangetOPCONTimeSpan()
    
protected  SetgetOplanStages(Task task)
    
 StringgetPrefs(Collection prefs)
    
protected  RolegetRole(ServiceDescription serviceDescription)
    
protected  AssetgetSelfOrg()
    
protected  longgetWarningCutoffTime()
    
protected  booleanhandleChangedLineage()
    
protected  voidhandleChangedServiceContractRelays(Collection changedRelays)
    
protected  voidhandleRequestWithNoRemainingProviderOption(Role role, TimeSpan currentInterval)
    
protected  voidinitializeNumberOfProvidersPerRole()
    
protected  booleanmatchingRequest(MMQueryRequest request, Role role, TimeSpan timeSpan, ServiceInfoScorer scorer)
    
protected  booleanneedToFindProviders()
    
protected  CollectionparseRoleParams()
    
protected  voidqueryServices(Role role)
    
protected  voidqueryServices(Role role, TimeSpan timeSpan)
    
protected  voidqueryServices(Role role, ServiceInfoScorer scorer, TimeSpan timeSpan)
    
protected  CollectionreorderAnyTiedServiceDescriptions(ArrayList scoredServiceDescriptions)
    
protected  voidrequestServiceContract(ServiceDescription serviceDescription, TimeSpan interval)
     create & publish a relay with service request to the provider specified in the serviceDescription for the specified time interval.
protected  voidrequestServiceContract(Role role, String providerName, TimeSpan interval)
    
protected  booleanrequested(Role role, TimeSpan timeSpan)
    
protected  voidresetWarningCutoffTime()
    
protected  voidsetNeedToFindProviders(boolean flag)
    
protected  voidsetOPCONSchedule(NonOverlappingTimeSpanSet opconSchedule)
    
protected  voidsetupSubscriptions()
    
public  voidverifyOutstandingRequests(TimeSpanSet currentOPCONSchedule)
    
public  voidverifyServiceContracts(TimeSpanSet currentOPCONSchedule)
    

Field Detail
myEventService
protected EventService myEventService(Code)



myLoggingService
protected LoggingService myLoggingService(Code)



mySDFactory
protected SDFactory mySDFactory(Code)



myServiceContractRelaySubscription
protected IncrementalSubscription myServiceContractRelaySubscription(Code)





Method Detail
alreadyAskedForContractWithProvider
protected boolean alreadyAskedForContractWithProvider(Role role, String providerName, TimeSpan timeSpan)(Code)
return true if you already have a service contract relay with this provider



buildOPCONSchedule
protected NonOverlappingTimeSpanSet buildOPCONSchedule()(Code)

See Also:   SDClientPlugin.setupSubscriptions()
See Also:   SDClientPlugin.handleChangedLineage TimeSpanSet



checkProviderCompletelyCovered
protected boolean checkProviderCompletelyCovered(Role role, TimeSpan timeSpan)(Code)
return true if you have a non-revoked service contract for this role or if you have an unanswered request



checkProviderCompletelyRequested
protected boolean checkProviderCompletelyRequested(Role role, TimeSpan timeSpan)(Code)
return true if you have a non-revoked service contract for this role or if you have an unanswered request



continuousCoverage
protected boolean continuousCoverage(TimeSpan targetTimeSpan, TimeSpanSet timeSpanSet)(Code)



covered
protected boolean covered(Role role, TimeSpan timeSpan)(Code)



dateString
public String dateString(Date date)(Code)



execute
public void execute()(Code)



findProviders
protected void findProviders()(Code)



generateServiceRequests
protected void generateServiceRequests(Collection mmRequests)(Code)
For each answered request, pick an appropriate provider and send them a service request. Note that input is the changed service requests only. Also need HashMap of number of providers desired for each role.



getCommandLineage
protected Lineage getCommandLineage(TimeSpan timeSpan)(Code)



getCurrentlyUncoveredIntervalsWithoutOutstandingRequests
protected Collection getCurrentlyUncoveredIntervalsWithoutOutstandingRequests(long desiredStart, long desiredEnd, Role role)(Code)
For this role, check if there is a non-revoked service contract or an unanswered request. If so, return an empty collection. If not, return a collection containing the time interval between desiredStart and desiredEnd.



getDesiredNumberOfProviders
protected int getDesiredNumberOfProviders(Role role)(Code)



getMMRequestSubscription
protected IncrementalSubscription getMMRequestSubscription()(Code)



getMinimumEchelon
protected String getMinimumEchelon(Role role)(Code)



getOPCONSchedule
protected NonOverlappingTimeSpanSet getOPCONSchedule()(Code)



getOPCONTimeSpan
protected TimeSpan getOPCONTimeSpan()(Code)



getOplanStages
protected Set getOplanStages(Task task)(Code)



getPrefs
String getPrefs(Collection prefs)(Code)



getRole
protected Role getRole(ServiceDescription serviceDescription)(Code)



getSelfOrg
protected Asset getSelfOrg()(Code)



getWarningCutoffTime
protected long getWarningCutoffTime()(Code)



handleChangedLineage
protected boolean handleChangedLineage()(Code)



handleChangedServiceContractRelays
protected void handleChangedServiceContractRelays(Collection changedRelays)(Code)
If a changed relay is revoked and you are the client, do a new service query for this role



handleRequestWithNoRemainingProviderOption
protected void handleRequestWithNoRemainingProviderOption(Role role, TimeSpan currentInterval)(Code)
Log a warning that you couldn't find a provider for this option



initializeNumberOfProvidersPerRole
protected void initializeNumberOfProvidersPerRole()(Code)



matchingRequest
protected boolean matchingRequest(MMQueryRequest request, Role role, TimeSpan timeSpan, ServiceInfoScorer scorer)(Code)



needToFindProviders
protected boolean needToFindProviders()(Code)



parseRoleParams
protected Collection parseRoleParams()(Code)



queryServices
protected void queryServices(Role role)(Code)



queryServices
protected void queryServices(Role role, TimeSpan timeSpan)(Code)
create and publish a MMQueryRequest for this role



queryServices
protected void queryServices(Role role, ServiceInfoScorer scorer, TimeSpan timeSpan)(Code)
create and publish a MMQueryRequest for this role



reorderAnyTiedServiceDescriptions
protected Collection reorderAnyTiedServiceDescriptions(ArrayList scoredServiceDescriptions)(Code)
Modify the order of scoredServiceDescriptions so that ties are in the order you want them to be



requestServiceContract
protected void requestServiceContract(ServiceDescription serviceDescription, TimeSpan interval)(Code)
create & publish a relay with service request to the provider specified in the serviceDescription for the specified time interval.



requestServiceContract
protected void requestServiceContract(Role role, String providerName, TimeSpan interval)(Code)



requested
protected boolean requested(Role role, TimeSpan timeSpan)(Code)



resetWarningCutoffTime
protected void resetWarningCutoffTime()(Code)



setNeedToFindProviders
protected void setNeedToFindProviders(boolean flag)(Code)



setOPCONSchedule
protected void setOPCONSchedule(NonOverlappingTimeSpanSet opconSchedule)(Code)

See Also:   org.cougaar.servicediscovery.plugin.SDClientPlugin.setupSubscriptions
See Also:   SDClientPlugin.handleChangedLineage
Parameters:
  opconSchedule -



setupSubscriptions
protected void setupSubscriptions()(Code)



verifyOutstandingRequests
public void verifyOutstandingRequests(TimeSpanSet currentOPCONSchedule)(Code)



verifyServiceContracts
public void verifyServiceContracts(TimeSpanSet currentOPCONSchedule)(Code)



Methods inherited from org.cougaar.planning.plugin.legacy.SimplePlugin
public AllocationResult createEstimatedAllocationResult(Task t, double confidenceRating, boolean success)(Code)(Java Doc)
public void createPublishExpansion(Task parent)(Code)(Java Doc)
final protected void cycle()(Code)(Java Doc)
abstract protected void execute()(Code)(Java Doc)
final public void initialize() throws StateModelException(Code)(Java Doc)
public void load(Object object) throws StateModelException(Code)(Java Doc)
final protected void prerun()(Code)(Java Doc)
final public void resume() throws StateModelException(Code)(Java Doc)
protected void setExecutionDelay(long minDelay, long maxDelay)(Code)(Java Doc)
abstract protected void setupSubscriptions()(Code)(Java Doc)
final public void start() throws StateModelException(Code)(Java Doc)
final public void stop() throws StateModelException(Code)(Java Doc)
final public void suspend() throws StateModelException(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.