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


org.cougaar.servicediscovery.plugin.SimpleSDClientPlugin
   org.cougaar.pizza.plugin.SDClientPlugin

SDClientPlugin
public class SDClientPlugin extends SimpleSDClientPlugin (Code)
ServiceDiscovery ClientPlugin, responsible for initiating queries for services, taking the resulting service pointer, and sending a Relay to the Provider requesting service.

Service Discovery is initiated by receiving a Find Providers task, and looking for the single Role indicated on the AS Prepositional Phrase, possibly excluding the Providers listed in the NOT Prepositional Phrase. Sends a Disposition on the FindProviders Task when it gets a Relationship with a provider for the service.

This is an extension of the SimpleSDClientPlugin that uses the pizza Domain constants and specically forbids using providers listed in the Find Providers Task. Use this as an example of how you can extend the SimpleSDClientPlugin for your own application.

Limitations: not quiescent aware, doesn't handle time-phased relationships, not guaranteed to work with persistence and restarts, and assumes that providers will not revoke relationships or otherwise change their mind.





Method Summary
protected  UnaryPredicategetFindProvidersPredicate()
     Predicate to get the FindProviders Tasks.
protected  RolegetRole(ServiceDescription serviceDescription)
     Retrieve the Role that the Provider is offering out of the ServiceDescription.
protected  ServiceInfoScorergetServiceInfoScorer(Role role, Task fpTask)
     Create a scoring function to weigh different services registered in the YP, for use by the Matchmaker.



Method Detail
getFindProvidersPredicate
protected UnaryPredicate getFindProvidersPredicate()(Code)
Predicate to get the FindProviders Tasks. In the off-chance that your verb is slightly different, you can over-ride this method to point to your domain-specific Verb Constant. Note that it is not a constant, just so it can be over-ridden.



getRole
protected Role getRole(ServiceDescription serviceDescription)(Code)
Retrieve the Role that the Provider is offering out of the ServiceDescription. Note that this assumes the role is under the CommercialServiceScheme, using the Domain's Constants file. Extenders will over-ride this method.
Parameters:
  serviceDescription - The Description of the Service as advertised in the YP. the Role advertised by the Provider, or null if none found.



getServiceInfoScorer
protected ServiceInfoScorer getServiceInfoScorer(Role role, Task fpTask)(Code)
Create a scoring function to weigh different services registered in the YP, for use by the Matchmaker. In this case, create a function that requires the given role, and forbids any providers named by the given Task.

Extenders of this plugin may over-ride this method to use a different function.
Parameters:
  role - the Role to look for
Parameters:
  fpTask - The FindProviders task this will satisfy the scoring function to hand the Matchmaker




Fields inherited from org.cougaar.servicediscovery.plugin.SimpleSDClientPlugin
protected LoggingService myLoggingService(Code)(Java Doc)

Methods inherited from org.cougaar.servicediscovery.plugin.SimpleSDClientPlugin
protected void execute()(Code)(Java Doc)
protected DomainService getDomainService()(Code)(Java Doc)
protected UnaryPredicate getFindProvidersPredicate()(Code)(Java Doc)
protected Entity getLocalEntity()(Code)(Java Doc)
protected PlanningFactory getPlanningFactory()(Code)(Java Doc)
protected Role getRole(Task findProvidersTask)(Code)(Java Doc)
protected Role getRole(ServiceDescription serviceDescription)(Code)(Java Doc)
protected SDFactory getSDFactory()(Code)(Java Doc)
protected ServiceInfoScorer getServiceInfoScorer(Role role, Task fpTask)(Code)(Java Doc)
public void load()(Code)(Java Doc)
protected void queryServices(Role role, Task findProvidersTask)(Code)(Java Doc)
protected void requestServiceContract(ServiceDescription serviceDescription)(Code)(Java Doc)
public void setDomainService(DomainService domainService)(Code)(Java Doc)
protected void setupSubscriptions()(Code)(Java Doc)
public void unload()(Code)(Java Doc)
protected void updateFindProvidersTaskDispositions(Collection changedServiceContractRelays)(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.