URL url = new URL(clusterURL + "agents?all&text");
URL url = new URL(clusterURL + "agents?scope=all&format=text");
  public Hashtable getClusterIdsAndURLs() throws MalformedURLException, ClassNotFoundException, IOException {    ConnectionHelper debugConnection;    Hashtable results = new Hashtable();    Hashtable results2 = new Hashtable();    try {      /*get host:port from clusterURLopen url connection to host:port/agents?all&textget input stream from connectionwrap in BufferedReaderread lines of response into temporary ArrayLIst (get agent-names)fill "results" with (agent-name, http://host:port/$ + agent-name + /)return results       */            int p = clusterURL.lastIndexOf(":");      URL url = new URL(clusterURL + "agents?all&text");      //System.out.println(url.toString());      URLConnection urlconn = null;       InputStream in;      try {	urlconn = url.openConnection();	in = urlconn.getInputStream();	BufferedReader input = new BufferedReader(new InputStreamReader(in));		try { 	  while(input !=null) {	    String n = input.readLine();	    if( n==null )	      break;	    String u = ((clusterURL.substring(0,p+1)) + "8800/$" + n + "/");	    //System.out.println(u);	    results.put(n, u);	  }	} catch(IOException e) {	  System.out.println("Error reading agent list: " + e.getMessage());	}      } catch(IOException e) {	System.out.println("Error reaching agents list: " + e.getMessage());      }                  // we don't want this code:      /*      if (!isDebugPSP) {        int i = clusterURL.lastIndexOf(":");        if (i == -1)          throw new MalformedURLException("Expected host:port");        debugConnection = new ConnectionHelper(clusterURL.substring(0,i+1) + "5555/");      } else {        debugConnection = this;      }      debugConnection.sendData("LIST_CLUSTERS");      ObjectInputStream ois =         new ObjectInputStream(debugConnection.getInputStream());      while (true) {        String nextName = (String)ois.readObject();        String nextURL = (String)ois.readObject();        results.put(nextName, nextURL);      }//          } catch (java.io.EOFException e) {      // ignore this one    }      */    } catch (Exception e) {      // ignore    }    return results;  }