RemoteListenable rl = remoteNode.getRemoteListenable();
  public RemoteProcess restartNode(String nodeName) {    NodeInfo nodeInfo = (NodeInfo)nodeToNodeInfo.get(nodeName);    String hostName = nodeInfo.hostName;    Properties properties = nodeInfo.properties;    java.util.List args = nodeInfo.args;    boolean doRun = false;    synchronized (runningNodes) {      if (oldNodes.size() + runningNodes.size() == 1)        doRun = true;    } // end synchronized    if (doRun) {      runButton_actionPerformed();      return null; // return null, caller (ConsoleInternalFrame) is going away    }    properties.remove(Experiment.PERSIST_CLEAR);    int remotePort = appServerSupport.getAppServerPort(properties);    RemoteHost remoteAppServer =       appServerSupport.getAppServer(hostName, remotePort);    if (remoteAppServer == null)      return null;    // close the log file and remove the old node event listener    ConsoleNodeListener listener =       (ConsoleNodeListener)nodeListeners.remove(nodeName);    listener.closeLogFile();    // reuse old document    ConsoleStyledDocument doc = listener.getDocument();    // create a node event listener to get events from the node    String logFileName = getLogFileName(nodeName);    try {      listener = new ConsoleNodeListener(this,                                         nodeName,                                         logFileName,                                         getNodeStatusButton(nodeName),                                         doc);    } catch (Exception e) {      if(log.isErrorEnabled()) {        log.error("Unable to create output for: " + nodeName, e);      }      return null;    }    if (displayFilter != null)      listener.setFilter(displayFilter);    nodeListeners.put(nodeName, listener);    RemoteProcess remoteNode = null;    try {      String experimentName = "";      if (experiment != null)        experimentName = experiment.getExperimentName();      String procName = experimentName + "-" + nodeName;      String groupName = "csmart";      ProcessDescription desc =        new ProcessDescription(procName,                               groupName,                               properties,                               args);      RemoteListenableConfig conf =        new RemoteListenableConfig(listener,                                    new OutputPolicy(10));      remoteNode =         remoteAppServer.createRemoteProcess(desc, conf);      RemoteListenable rl = remoteNode.getRemoteListenable();      if (log.isDebugEnabled())	log.debug("Adding listener: " +                         CSMART.getNodeListenerId() +                         " for: " + procName);      rl.addListener(listener, CSMART.getNodeListenerId());      if (remoteNode != null) {        synchronized (runningNodesLock) {          runningNodes.put(nodeName, remoteNode);        } // end synchronized      }    } catch (Exception e) {      if(log.isErrorEnabled()) {        log.error("Exception", e);      }    }    return remoteNode;  }