org.cougaar.core.relay

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.core.relay 
org.cougaar.core.relay
This package contains the Cougaar support for "relays", which are generic blackboard objects that transfer data between agents.

The {@link org.cougaar.core.relay.RelayLP} is included in the {@link org.cougaar.core.domain.RootDomain}, which is loaded by default. The {@link org.cougaar.core.relay.Relay} API is divided into a sender-side {@link org.cougaar.core.relay.Relay.Source} and destination-side {@link org.cougaar.core.relay.Relay.Target}, although most relay implementations implement both APIs. A source specifies one or more target agents, the content, and a {@link org.cougaar.core.relay.Relay.TargetFactory} factory for creating the target-side representation of the relay. Each target-side relay specifies an optional response to send back to the source. A relay with an {@link org.cougaar.multicast.AttributeBasedAddress} target will be sent to all members of the community and dynamically added/removed as community members are added/removed.

The relay API is complex to allow maximal flexability. A simple example is included: {@link org.cougaar.core.relay.SimpleRelayExample} is a plugin that publishes a {@link org.cougaar.core.relay.SimpleRelay} to send a "ping" object to a target agent, and the target sends back an "echo-ping" acknowledgement. See the {@link org.cougaar.core.relay.SimpleRelayExample} javadoc for details.

For more detail, see the Cougaar Developers' Guide.

Java Source File NameTypeComment
Relay.javaInterface A Relay is a blackboard object that allows a source agent to stream content changes to multiple target agents, and for each target to stream back a response.

The Relay API is a intended to be a generic mechanism for transfering data between agents.

RelayChangeReport.javaClass A ChangeReport to change the targets of a relay.
RelayDirective.javaClass A org.cougaar.core.blackboard.Directive for relay messages, which can add/change/remove a Relay.Target and send responses back to the Relay.Source .
RelayLP.javaClass A LogicProvider to transmit and update Relay objects.
SimpleRelay.javaInterface A blackboard object API to send a query object to a remote agent, which can optionally reply back to the sender.
SimpleRelayBase.javaClass Abstract base class for SimpleRelay implementations.
SimpleRelayExample.javaClass This component is an example SimpleRelay client, which both sends relays and replies to them.

To use, add this component to an agent and specify a target, for example in "AgentA" with a target of "AgentB":

 
 <component
 name='org.cougaar.core.relay.SimpleRelayExample(target=AgentB)'
 class='org.cougaar.core.relay.SimpleRelayExample'
 priority='COMPONENT'
 insertionpoint='Node.AgentManager.Agent.PluginManager.Plugin'>
 <argument>target=AgentB>/argument>
 </component>
 
In the target agent add the component without a target argument:
 <component
 name='org.cougaar.core.relay.SimpleRelayExample(target=AgentB)'
 class='org.cougaar.core.relay.SimpleRelayExample'
 priority='COMPONENT'
 insertionpoint='Node.AgentManager.Agent.PluginManager.Plugin'/>
 
You should see output similar to the following, which excludes logging timestamps and other details:
 
 ..
SimpleRelaySource.javaClass Source-side implementation of SimpleRelay , which creates the SimpleRelayTarget on the target's blackboard.

Note that this class, SimpleRelaySource , and the target-side implementation, SimpleRelayTarget , could be easily merged into a single "SimpleRelayImpl" class.

SimpleRelayTarget.javaClass Target-side implementation of SimpleRelay , constructed by the SimpleRelaySource .
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.