Package com.vaadin.flow.testutil.net
Class PortProber
- java.lang.Object
-
- com.vaadin.flow.testutil.net.PortProber
-
public class PortProber extends Object
Class for determining a free localhost port that is not used by any ipv4 or ipv6 interfaces.Derived from SeleniumHQ / selenium
For internal use only. May be renamed or removed in a future release.
-
-
Field Summary
Fields Modifier and Type Field Description static intHIGHEST_PORTstatic intSTART_OF_USER_PORTS
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intfindFreePort()Get a free localhost port that is not in use by any interface.
-
-
-
Field Detail
-
HIGHEST_PORT
public static final int HIGHEST_PORT
- See Also:
- Constant Field Values
-
START_OF_USER_PORTS
public static final int START_OF_USER_PORTS
- See Also:
- Constant Field Values
-
-
Method Detail
-
findFreePort
public static int findFreePort()
Get a free localhost port that is not in use by any interface.- Returns:
- found free port
- Throws:
RuntimeException- if no free port was found
-
-