Author: Tiziana Trucco (TILab S.p.a)
Date: 6/12/2001
This is a simple example that describes how an agent can register its service with the DF and respond to ping requests.
To try this example just start the agent
java jade.Boot -gui ping:examples.PingAgent.PingAgent
and then send it a message via the DummyAgent.
PingAgent | |
Description: | |
This agent registers itself with the DF and the waits for ACLMessages. If a QUERY_REF message arrives with content “ping” then it replies with an INFORM message whose content will be “pong”. For every other message received, except for NOT-UNDERSTOOD, it replies with a NOT_UNDERSTOOD message.The exchanged message are written in a log file whose name is the local name of the agent. | |
Jade classes used: | |
SimpleBehaviour,DFService,ServiceDescription,DFAgentDescription | |
Source | |
\src\examples\PingAgent\PingAgent.java |