request.setOntology(JADEManagementOntology.getInstance().getName());
return request;
}
private AID createController(String containerName) throws FIPAException {
ACLMessage request = createAMSRequest();
CreateAgent ca = new CreateAgent();
String localName = myAgent.getLocalName()+"-helper-on-"+containerName;
ca.setAgentName(localName);
ca.setClassName("jade.tools.logging.LogHelperAgent");
ca.addArguments(myAgent.getAID());
ca.setContainer(new ContainerID(containerName, null));
Action act = new Action();
act.setActor(myAgent.getAMS());
act.setAction(ca);
try {
myAgent.getContentManager().fillContent(request, act);
ACLMessage inform = FIPAService.doFipaRequestClient(myAgent, request, 10000);
if (inform != null) {
return new AID(localName, AID.ISLOCALNAME);
}
else {
throw new FIPAException("Response timeout expired");