nci.outputPolicy);   remoteNode =
CSMART.getNodeListenerId(), null, nci.outputPolicy); remoteNode =
  private void createNodes() {    int delay = 1;    // get inter-node start delay    String tmp =      Parameters.findParameter("org.cougaar.tools.csmart.startdelay");    if (tmp != null) {      try {        delay = Integer.parseInt(tmp);      } catch (NumberFormatException nfe) {      }    }    final int interNodeStartDelay = delay;    String experimentName = "Experiment";    if (experiment != null)      experimentName = experiment.getExperimentName();    // For each Node to create    for (int i = 0; i < nodeCreationInfoList.size(); i++) {      // First pause      try {        Thread.sleep(interNodeStartDelay);      } catch (Exception e) {      }      if (stopNodeCreation)        break;      final NodeCreationInfo nci =         (NodeCreationInfo)nodeCreationInfoList.get(i);      final RemoteProcess remoteNode;      // Create the process description, then the proccess      try {        String procName =           appServerSupport.getProcessName(experimentName, nci.nodeName);        String groupName = "csmart";        ProcessDescription desc =          new ProcessDescription(procName,                                 groupName,                                 nci.properties,                                 nci.args);        RemoteListenableConfig conf =          new RemoteListenableConfig(nci.listener,                                      nci.outputPolicy);        // register listener        remoteNode =           nci.remoteAppServer.createRemoteProcess(desc, conf);        RemoteListenable rl = remoteNode.getRemoteListenable();	if (log.isDebugEnabled())	  log.debug("Adding listener: " +                           CSMART.getNodeListenerId() +                           " for: " + procName);        rl.addListener(nci.listener, CSMART.getNodeListenerId());      } catch (Exception e) {        if (log.isErrorEnabled()) {          log.error("CSMARTConsole: cannot create node: " +                     nci.nodeName, e);        }        JOptionPane.showMessageDialog(this,                                      "Cannot create node on: " +                                       nci.hostName +                                      "; check that server is running");        continue;      }      synchronized (runningNodesLock) {        runningNodes.put(nci.nodeName, remoteNode);      } // end synchronized      // Set up the UI for the Node      SwingUtilities.invokeLater(new Runnable() {          public void run() {            // don't create gui controls if node creation has been stopped            if (nodeCreator == null) return;            addStatusButton(nci.statusButton);            ConsoleInternalFrame frame =               new ConsoleInternalFrame(nci.nodeName,                                       nci.hostName,                                       nci.properties,                                       nci.args,                                       (ConsoleNodeListener)nci.listener,                                       nci.scrollPane,                                       nci.statusButton,                                       nci.logFileName,                                       remoteNode,                                       console);            frame.addInternalFrameListener(new NodeFrameListener());            desktop.addNodeFrame(frame, nci.nodeName);            updateControls(true);          }        });    }  }