agentHost = hosts[0].getShortName();
for (int i = 0; i < hosts.length; i++) { NodeComponent[] nodes = hosts[i].getNodes(); if (nodes == null || nodes.length == 0) continue; for (int j = 0; j < nodes.length; j++) { AgentComponent[] agents = nodes[j].getAgents();  if (agents == null || agents.length == 0) continue;  agentHost = hosts[i].getShortName(); break; } }
  private void setHostToMonitor(Experiment experiment) {    HostComponent[] hosts = experiment.getHosts();    agentHost = hosts[0].getShortName();    agentPort = 5555; // default    agentURL = "http://" + agentHost + ":5555/";     agentMap = new CSMARTAgentMap(agentHost, agentPort);  }