Created
October 1, 2016 00:57
-
-
Save JFRode/afdd7ff8e94e2a583feea1da3e922eb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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