/** * Kill an agent. This method terminates an agent running within the active Front End container. * * @param name The local name (i.e. without the platform ID) of the agent to kill. * @throws NotFoundException If no agent with the given local name are running within the active * Front End. */ public static void killAgent(String name) throws NotFoundException { if (myFrontEnd != null) { try { myFrontEnd.killAgent(name); } catch (IMTPException imtpe) { // Should never happen as this is a local call imtpe.printStackTrace(); } } }
/** * Shut down the JADE runtime. This method stops the JADE Front End container currently running in * this JVM, if one such container exists. */ public static void stopJADE() { if (myFrontEnd != null) { try { // Self-initiated shutdown myFrontEnd.exit(true); } catch (IMTPException imtpe) { // Should never happen as this is a local call imtpe.printStackTrace(); } } }
private void notifySynchronized() { synchronized (frontEndSynchLock) { Iterator it = fronEndSynchBuffer.iterator(); while (it.hasNext()) { try { MessageSenderPair msp = (MessageSenderPair) it.next(); messageOut(msp.getMessage(), msp.getSender()); } catch (NotFoundException nfe) { // The sender does not exist --> nothing to notify nfe.printStackTrace(); } catch (IMTPException imtpe) { // Should never happen since this is a local call imtpe.printStackTrace(); } } fronEndSynchBuffer.clear(); synchronizing = false; } }