public final class NetworkUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.net.ServerSocket> |
findFreePorts(java.util.List<java.lang.String> portNames)
Returns a map of free ports on localhost.
|
static int |
getFreePort()
Get available port.
|
static java.lang.String |
printStackTrace() |
public static int getFreePort()
public static java.lang.String printStackTrace()
public static java.util.Map<java.lang.String,java.net.ServerSocket> findFreePorts(java.util.List<java.lang.String> portNames)
java.lang.IllegalStateException
- if unable to find specified free ports