(isDown ? "down" : "up");
(isDown ? "down" : "up") + ((limit >= 0) ? ("?limit="+limit) : "");
  public static List getLocalThread(      AgentMapping am,      boolean isDown,      String agentName,       List uids) {    try {      // get host and port      String host = am.getHost(agentName);      int port = am.getPort(agentName);      // create URL      String surl =         "http://"+host+":"+port+        "/$"+        URLEncoder.encode(agentName)+        SEARCH_PSP_NAME+        "?format=data"+        "?find="+        (isDown ? "down" : "up");      // connect, upload List of Strings      System.out.println("ThreadUtils: connecting to: " + surl);      URL url = new URL(surl);      URLConnection conn = url.openConnection();      conn.setDoOutput(true);      OutputStream os = conn.getOutputStream();      ObjectOutputStream oos = new ObjectOutputStream(os);      oos.writeObject(uids);      oos.close();      // receive result List of PropertyTrees      InputStream is = conn.getInputStream();      ObjectInputStream ois = new ObjectInputStream(is);      Object inObj = ois.readObject();      ois.close();      // return result      return (List)inObj;    } catch (Exception e) {      System.err.println("Query agent "+agentName+" failed:");      e.printStackTrace();      return null;    }  }