1 / 11

The YinYang System

The YinYang System. Manager. Manager. Register/Deregister other Managers Register/Deregister Domains Register/Deregister Active Agents Handle an Agent Service Management the communication between Domains Implement Interface Plug. Domain. Domain. Launch an active agent (local or remote)

isleen
Download Presentation

The YinYang System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The YinYang System

  2. Manager

  3. Manager • Register/Deregister other Managers • Register/Deregister Domains • Register/Deregister Active Agents • Handle an Agent Service • Management the communication between Domains • Implement Interface Plug

  4. Domain

  5. Domain • Launch an active agent (local or remote) • Run an agent (local or remote) • Kill an active agent • Management the communication between active agents • Register its agents, Get agent information, Search agents

  6. Domain Administration

  7. Agents • Status • MOBILE • STATIC • DOWNLOAD • PRIVATE • Manager and Domain are Jini Services, but Agents are not. • Build an agent by extending the abstract class Agent.

  8. Agents • Agent can have an ”AgentFrame” (GUI) • Agent can use ”inbox ” to store messages • Agent can build a KQML Message • Agent can readMessage, can getMessage and handle it. • Agents need to implement the method AgentServiceResult perform(Object par)

  9. HelloAgent • public class HelloAgent extends Agent implements Serializable { ..} • public HelloAgent() { super(Agent.MOBILE); } • public AgentServiceResult perform(Object par) { • AgentServiceResult res = new AgentServiceResult(); String str = doWork(par); res.setResult(str); return res; }

  10. JavaMail • Packages: mail.jar, activation.jar • Send a mail • Make a Session • Make a MimeMessage msg • Send the message: Transport.send(msg)

  11. Read a mail • Make a Session • Get the store and establish the connection • Open the folder • Get all message in the folder • Read a specified message.

More Related