private static void initCouple(Properties basePP, String prefix, int index) { String senderClass = "jade.core.ScalabilityTest$BitrateSenderAgent"; String receiverClass = "jade.core.ScalabilityTest$BitrateReceiverAgent"; if (measure == RTT_MEASURE) { senderClass = "jade.core.ScalabilityTest$RTTSenderAgent"; receiverClass = "jade.core.ScalabilityTest$RTTReceiverAgent"; } Properties pp = (Properties) basePP.clone(); /*Properties pp = new Properties(); if (host != null) { pp.setProperty(MicroRuntime.HOST_KEY, host); } if (port != null) { pp.setProperty(MicroRuntime.PORT_KEY, port); } if (proto != null) { pp.setProperty(MicroRuntime.PROTO_KEY, proto); } if (maxDiscTime != null) { pp.setProperty(JICPProtocol.MAX_DISCONNECTION_TIME_KEY, maxDiscTime); }*/ String sName = "S-" + prefix + "-" + index; pp.setProperty(PDPContextManager.MSISDN, sName); String rName = "R-" + prefix + "-" + index; String prop = sName + ":" + senderClass + "(" + rName + ")"; pp.setProperty(MicroRuntime.AGENTS_KEY, prop); // pp.setProperty(JICPProtocol.KEEP_ALIVE_TIME_KEY, "-1"); FrontEndContainer fes = new FrontEndContainer(); fes.start(pp); pp = (Properties) basePP.clone(); /*pp = new Properties(); if (host != null) { pp.setProperty(MicroRuntime.HOST_KEY, host); } if (port != null) { pp.setProperty(MicroRuntime.PORT_KEY, port); } if (proto != null) { pp.setProperty(MicroRuntime.PROTO_KEY, proto); } if (maxDiscTime != null) { pp.setProperty(JICPProtocol.MAX_DISCONNECTION_TIME_KEY, maxDiscTime); }*/ pp.setProperty(PDPContextManager.MSISDN, rName); prop = rName + ":" + receiverClass; pp.setProperty(MicroRuntime.AGENTS_KEY, prop); // pp.setProperty(JICPProtocol.KEEP_ALIVE_TIME_KEY, "-1"); FrontEndContainer fer = new FrontEndContainer(); fer.start(pp); }
// #MIDP_EXCLUDE_BEGIN public synchronized Object clone() { ACLMessage result; try { result = (ACLMessage) super.clone(); result.persistentID = null; if (source != null) { result.source = (AID) source.clone(); } // Deep clone receivers if (dests != null) { result.dests = new ArrayList(dests.size()); Iterator it = dests.iterator(); while (it.hasNext()) { AID id = (AID) it.next(); result.dests.add(id.clone()); } } // Deep clone reply_to if (reply_to != null) { result.reply_to = new ArrayList(reply_to.size()); Iterator it = reply_to.iterator(); while (it.hasNext()) { AID id = (AID) it.next(); result.reply_to.add(id.clone()); } } // Deep clone user-def-properties if present if (userDefProps != null) result.userDefProps = (Properties) userDefProps.clone(); // Deep clone envelope if present if (messageEnvelope != null) result.messageEnvelope = (Envelope) messageEnvelope.clone(); } catch (CloneNotSupportedException cnse) { throw new InternalError(); // This should never happen } return result; }