public class FreePortFinder extends Object
Constructor and Description |
---|
FreePortFinder() |
Modifier and Type | Method and Description |
---|---|
static void |
checkFreePort(InetAddress address,
int port) |
static void |
checkFreePortOnLocalHost(int port) |
static int |
findFreePort(InetAddress address) |
static int |
findFreePortInRange(InetAddress address,
int lowerBound,
int higherBound) |
static int |
findFreePortInRangeOnLocalhost(int lowerBound,
int higherBound) |
static int |
findFreePortOnLocalHost() |
static int |
findFreePortOnLoopback() |
static boolean |
isFreePort(InetAddress address,
int port) |
static boolean |
isFreePortOnLocalHost(int port) |
public static boolean isFreePortOnLocalHost(int port)
public static boolean isFreePort(InetAddress address, int port)
public static void checkFreePortOnLocalHost(int port)
public static void checkFreePort(InetAddress address, int port)
public static int findFreePortOnLocalHost() throws IOException
IOException
public static int findFreePortOnLoopback()
public static int findFreePort(InetAddress address)
public static int findFreePortInRangeOnLocalhost(int lowerBound, int higherBound)
public static int findFreePortInRange(InetAddress address, int lowerBound, int higherBound)