Beispiel #1
0
 private static void setDefaultPort(
     Props props, String propertyKey, int defaultPort, String label) {
   int port = props.intOf(propertyKey, -1);
   if (port == -1) {
     port = defaultPort;
   } else if (port == 0) {
     port = NetworkUtils.freePort();
   }
   props.set(propertyKey, String.valueOf(port));
 }
 private HttpProcessClient(File tempDir, String commandKey) throws IOException {
   this(tempDir, commandKey, NetworkUtils.freePort());
 }