com.vaadin.testbench.
Class IPAddress
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindIPAddress
(Function<InetAddress, Boolean> acceptor) Enumerates the available IP addresses until one is found which is accepted by the given function.
static String
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.
-
Constructor Details
-
IPAddress
public IPAddress()
-
-
Method Details
-
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.
Returns:
An IP address of one of the network interfaces in the machine or an empty optional
Throws:
RuntimeException
- if no IP was found -
findIPAddress
Enumerates the available IP addresses until one is found which is accepted by the given function.
Parameters:
acceptor
- the function which determines if an IP address should be returned or notReturns:
An IP address of one of the network interfaces in the machine or an empty optional.
-