예제 #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));
 }
예제 #2
0
 private HttpProcessClient(File tempDir, String commandKey) throws IOException {
   this(tempDir, commandKey, NetworkUtils.freePort());
 }