Skip to content

Instantly share code, notes, and snippets.

@JFRode
Created October 1, 2016 00:57
Show Gist options
  • Save JFRode/afdd7ff8e94e2a583feea1da3e922eb8 to your computer and use it in GitHub Desktop.
Save JFRode/afdd7ff8e94e2a583feea1da3e922eb8 to your computer and use it in GitHub Desktop.
/*
A Hello World with JADE - JAVA Agent DEvelopment Framework
API: http://jade.tilab.com/
DOC: http://jade.tilab.com/doc/api/index.html
*/
package jfrode.hellojave;
import jade.core.AID;
public class Agent extends jade.core.Agent {
private AID id = new AID();
public void setup(String nome, String nomeLocal, String endereco) {
id.setName(nome);
id.createGUID(nomeLocal, "plataforma");
//id.setLocalName(nomeLocal);
id.addAddresses(endereco);
System.out.println("Olá eu sou o agente!"
+ "\nnome local: " + id.getName()
+ "\nnome global: "+ id.getLocalName()
+ "\nendereco: " + id.getAddressesArray()[0]);
//doDelete(); // Finaliza o agente
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment