String port = arguments.getProperty(AGENT_PORT);
String port = arguments.getProperty(AGENT_HTTP_PORT);
  private static void setHostToMonitor() {    Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.monitor.viewer.CSMARUL");    ArrayList potentialHosts = new ArrayList();    ArrayList potentialNodes = new ArrayList();    HostComponent[] hosts = experiment.getHostComponents();    for (int i = 0; i < hosts.length; i++) {      NodeComponent[] nodes = hosts[i].getNodes();      // skip hosts that have no nodes      if (nodes == null || nodes.length == 0)        continue;      for (int j = 0; j < nodes.length; j++) {	AgentComponent[] agents = nodes[j].getAgents();	// skip nodes that have no agents	if (agents == null || agents.length == 0)	  continue;        // potential hosts and nodes        agentHost = hosts[i].getShortName();        Properties arguments = nodes[j].getArguments();        if (arguments == null)          continue;        String port = arguments.getProperty(AGENT_PORT);        if (port != null) {          try {            agentPort = Integer.parseInt(port);            break; // have host and specific port          } catch (Exception e) {            if (log.isErrorEnabled())              log.error("Exception parsing " + AGENT_PORT + " : ", e);          }        }      }    }    // FIXME: Use secure mode here if necessary! Perhaps the experiment / host knows?    agentURL = ClientServletUtil.makeURL(agentHost, agentPort);    reset(agentHost, agentPort);  }