public void setup() {
Object[] arguments = getArguments();
if (arguments != null) {
destinationLocalName = (String) arguments[0];
fullServiceName = NODE_AGENT_SERVICE_PREFIX + destinationLocalName;
DFAgentDescription dfd = new DFAgentDescription();
dfd.setName(getAID());
ServiceDescription sd = new ServiceDescription();
sd.setType(NODE_AGENT_TYPE);
sd.setName(fullServiceName);
dfd.addServices(sd);
try {
DFService.register(this, dfd);
} catch (FIPAException fe) {
Logger.getLogger(NodeAgent.class.getName()).log(Level.SEVERE, null, fe);