Agent Transporter Example Usages

A typical use of the Agent Transporter is shown in the figure below. In this situation, a Java application would like to directly manipulate Concordia Agents once they arrive at the local machine (for example, to extract agent data, or to change an agent's itinerary). To accomplish its goal, the application creates an Agent Transporter object, which allows it to receive and execute agents in its Java Virtual Machine (JVM). Furthermore, the application implements the AgentListener interface so that each time an agent arrives, the application will obtain a reference to the incoming agent from the Agent Transporter. With this reference, the application can then directly invoke methods on the agent. When the application is finished with the agent, the Agent Transporter will automatically send the agent onto its next destination, as specified in its itinerary.

This situation may be especially useful in a Java applet. It would be too costly to embed the entire Concordia Server into an applet just to send and receive agents, but the lightweight Agent Transporter provides an easy way to allow agents to be transferred and executed by the applet.

Now, suppose that reliability and administration are important issues that must be considered. In this case, the full Concordia Server can be used in conjunction with the application on the same machine. One option is to implement the application using the Concordia Service Bridge facility in order to include the application in the same JVM as the Concordia Server.

Another option, if the application is allowed to start independently of the Concordia Server (and in a different JVM), is to have the Concordia Server act as the main point of contact on a given machine for sending and receiving agents across the network, and then have the Concordia Server pass agents along to the local Application, through the use of an Agent Transporter. By configuring the system in this way, the Concordia Server on Host B will provide reliable transmission for any Agents leaving or arriving the machine. This configuration is shown in the figure below: