public class NatsUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Path |
download(URL source,
Path target) |
static String |
getEnv(String key) |
static String |
getEnv(String key,
Supplier<String> fallback) |
static int |
getNextFreePort(int startPort) |
static String |
getSystem() |
static boolean |
isEmpty(String string) |
static boolean |
isPortAvailable(int port) |
static boolean |
isPortInUse(int portNumber) |
static String |
removeQuotes(String string) |
static String |
resolveEnvs(String input,
Map<NatsStreamingConfig,MapValue> config) |
static Path |
unzip(Path source,
Path target) |
static void |
validatePort(int port,
long timeoutMs,
boolean untilFree,
Supplier<Exception> onFail) |
static boolean |
waitForPort(int port,
long timeoutMs,
boolean isFree) |
public static String resolveEnvs(String input, Map<NatsStreamingConfig,MapValue> config)
public static String getSystem()
public static Path unzip(Path source, Path target) throws IOException
IOExceptionpublic static void validatePort(int port,
long timeoutMs,
boolean untilFree,
Supplier<Exception> onFail)
throws Exception
Exceptionpublic static boolean waitForPort(int port,
long timeoutMs,
boolean isFree)
public static boolean isPortAvailable(int port)
public static int getNextFreePort(int startPort)
public static boolean isPortInUse(int portNumber)
public static boolean isEmpty(String string)
Copyright © 2022. All rights reserved.