Java Doc for SimpleSDRegistrationPlugin.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.core.plugin.ComponentPlugin
   org.cougaar.servicediscovery.plugin.SimpleSDRegistrationPlugin

All known Subclasses:   org.cougaar.pizza.plugin.SDRegistrationPlugin,
SimpleSDRegistrationPlugin
public class SimpleSDRegistrationPlugin extends ComponentPlugin (Code)
Simplified version of SDRegistrationPlugin that registers this agent using the -profile.owl file if any in the plugin parameter-named YP agent.

This version of the plugin is somewhat simplified -- fewer error checks for example. It does not create org.cougaar.servicediscovery.description.ProviderCapabilities objects (used by more complex SDProviderPlugins).

First plugin argument is the name of the agent hosting the YP that we will register with.

The SDRegistrationPluginBase and extensions are more complex; they handle more errors, dynamic changes to the services provided, deal with society quiescence issues, create ProviderCapabilities, etc. Complex applications will likely want to use those plugins, but most users will prefer to extend this plugin. Extensions should over-rider the getServiceProfileURL() method, to specify where their application's service profiles are located. For an example, see the pizza application.
See Also:   org.cougaar.pizza.plugin.SDRegistrationPlugin



Field Summary
final protected static  StringOWL_IDENTIFIER
    
protected  LoggingServicelog
    


Method Summary
protected  voidexecute()
     If this agent has a -profile.owl file, then ask for a handle on the named (in the only plugin parameter) YP agent's YP community.
protected  voidfindYPCommunity()
     Issue an asynchronous query to the CommunityService, looking for the YP Community named by SimpleSDRegistrationPlugin.getYPCommunityName(String) , with a registered org.cougaar.servicediscovery.plugin.SimpleSDRegistrationPlugin.YPCommunityResponseListener to learn about changes.
protected  ProviderDescriptiongetPD()
     Get a ProviderDescription for this agent, us it to register in the YP.
protected  URLgetServiceProfileURL()
     Get the URL for the service profiles directory for this application.
protected  StringgetYPCommunityName(String ypAgentName)
     Construct the name of the YP Community hosted at the given named agent.
protected  voidinitYPInfo()
     Create the YPInfo object for this instance.
protected  voidinitialRegister()
     Do the actual registration of this provider in the YP.
protected  booleanisProvider()
     This agent is a provider if there is a provider file for it.
public  voidsetCommunityService(CommunityService cs)
    
public  voidsetLoggingService(LoggingService log)
    
public  voidsetRegistrationService(RegistrationService rs)
    
protected  voidsetupSubscriptions()
     This plugin has no subscriptions.
public  voidsuspend()
     When the agent moves, we don't want dangling callbacks - so clear them.

Field Detail
OWL_IDENTIFIER
final protected static String OWL_IDENTIFIER(Code)



log
protected LoggingService log(Code)





Method Detail
execute
protected void execute()(Code)
If this agent has a -profile.owl file, then ask for a handle on the named (in the only plugin parameter) YP agent's YP community. Once we have the community (may be a subsequent execute when our CommunityListener tells us we found the YP community), we call initialRegister to register this agent in the YP.



findYPCommunity
protected void findYPCommunity()(Code)
Issue an asynchronous query to the CommunityService, looking for the YP Community named by SimpleSDRegistrationPlugin.getYPCommunityName(String) , with a registered org.cougaar.servicediscovery.plugin.SimpleSDRegistrationPlugin.YPCommunityResponseListener to learn about changes.



getPD
protected ProviderDescription getPD()(Code)
Get a ProviderDescription for this agent, us it to register in the YP. We do so by looking for a file in the SimpleSDRegistrationPlugin.getServiceProfileURL() directory, named <AgentName>+ SimpleSDRegistrationPlugin.OWL_IDENTIFIER , and passing it through Jena.

Extenders could have an alternate mechanism for creating a ProviderDescription, including hard-coded content, messaging based, etc. ProviderDescription to register, null if unable to parse the provider description




getServiceProfileURL
protected URL getServiceProfileURL()(Code)
Get the URL for the service profiles directory for this application. This is the only method application specific versions of this plugin will likely over-ride.



getYPCommunityName
protected String getYPCommunityName(String ypAgentName)(Code)
Construct the name of the YP Community hosted at the given named agent. This version produces <AgentName>-YPCOMMUNITY.

Extenders could use a different convention for naming YP Communities.
Parameters:
  ypAgentName - String name of the agent hosting a YP Server String name of the YP Community to look for.




initYPInfo
protected void initYPInfo()(Code)
Create the YPInfo object for this instance. Takes the first plugin parameter as the name of the agent hosting the YP that we will register with.

Extenders might want a different mechanism for specifying the YP server to register with.




initialRegister
protected void initialRegister()(Code)
Do the actual registration of this provider in the YP. Get the ProviderDescription, and then invoke the UDDI4JRegistrationService, with a Callback to notify us when the registration completes (or fails).

Extenders might choose to over-ride this in an attempt to avoid using ProviderDescriptions at all.




isProvider
protected boolean isProvider()(Code)
This agent is a provider if there is a provider file for it.



setCommunityService
public void setCommunityService(CommunityService cs)(Code)



setLoggingService
public void setLoggingService(LoggingService log)(Code)



setRegistrationService
public void setRegistrationService(RegistrationService rs)(Code)



setupSubscriptions
protected void setupSubscriptions()(Code)
This plugin has no subscriptions. It will execute exactly once, since the infrastructure calls the execute() method once at plugin startup.



suspend
public void suspend()(Code)
When the agent moves, we don't want dangling callbacks - so clear them. On resume, we'll just re-register from scratch, since we can't otherwise recover where we'd gotten to.



Methods inherited from org.cougaar.core.plugin.ComponentPlugin
abstract protected void execute()(Code)(Java Doc)
protected ConfigFinder getConfigFinder()(Code)(Java Doc)
abstract protected void setupSubscriptions()(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.