co.cask.tigon.utils
Class Networks

java.lang.Object
  extended by co.cask.tigon.utils.Networks

public final class Networks
extends Object

Utility class to provide methods for common network related operations.


Constructor Summary
Networks()
           
 
Method Summary
static int getRandomPort()
          Find a random free port in localhost for binding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Networks

public Networks()
Method Detail

getRandomPort

public static int getRandomPort()
Find a random free port in localhost for binding.

Returns:
A port number or -1 for failure.


Copyright © 2014 Cask Data, Inc. Licensed under the Apache License, Version 2.0.