Class NetworkUtils
java.lang.Object
org.springframework.data.gemfire.util.NetworkUtils
Abstract utility class providing functions for networking.
- Since:
- 2.2.0
- Author:
- John Blum
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isValidNonEphemeralPort
(int port) static boolean
isValidPort
(int port) Determines whether the givenport
is valid.
-
Field Details
-
INVALID_PORT_MESSAGE
- See Also:
-
INVALID_NO_EPHEMERAL_PORT_MESSAGE
- See Also:
-
-
Constructor Details
-
NetworkUtils
public NetworkUtils()
-
-
Method Details
-
isValidPort
public static boolean isValidPort(int port) Determines whether the givenport
is valid. Technically, port 0 is valid too but no client would use port 0 (the ephemeral port) to connect to a service.- Parameters:
port
- port to evaluate.- Returns:
- a boolean value indicating whether the
port
is valid or not.
-
isValidNonEphemeralPort
public static boolean isValidNonEphemeralPort(int port)
-