public class ServerUtils
extends java.lang.Object
| Constructor and Description |
|---|
ServerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.file.Path |
createConfigFile(int port)
Create the server yml file to override the default configuration
|
static int |
getAvailablePortInRange(int minRangePort,
int maxRangePort)
Scan port in range to find the first available port
|
public static java.nio.file.Path createConfigFile(int port)
throws java.io.IOException
port - the port to overridejava.io.IOException - if an error is occurred during the configuration file creation.public static int getAvailablePortInRange(int minRangePort,
int maxRangePort)
throws java.io.IOException
minRangePort - the min rangemaxRangePort - the max rangejava.io.IOException - if no free port found