/** * Section 4.3.1, Page 66 * * Sending a message to another agent is as simple as filling out the fields * of an ACLMessage object and then calling the send() method of the Agent * class. **/ import jade.core.Agent; import jade.core.AID; import jade.lang.acl.ACLMessage; public class SendingMessages extends Agent { public void setup() { ACLMessage msg = new ACLMessage(ACLMessage.INFORM); msg.addReceiver(new AID("Peter", AID.ISLOCALNAME)); msg.setLanguage("English"); msg.setOntology("Weather-forecast-ontology"); msg.setContent("Today it’s raining"); send(msg); } }