public class IPAddress extends Object
Constructor and Description |
---|
IPAddress() |
Modifier and Type | Method and Description |
---|---|
static Optional<String> |
findIPAddress(Function<InetAddress,Boolean> acceptor)
Enumerates the available IP addresses until one is found which is
accepted by the given function.
|
static String |
findSiteLocalAddress()
Tries to determine a site local (10.0.0.0, 172.16.0.0 or 192.168.0.0) IP
address of the machine the test is running on.
|
public static String findSiteLocalAddress()
RuntimeException
- if no IP was foundpublic static Optional<String> findIPAddress(Function<InetAddress,Boolean> acceptor)
acceptor
- the function which determines if an IP address should be
returned or notCopyright © 2019. All rights reserved.