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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidNonEphemeralPort(int port) static booleanisValidPort(int port) Determines whether the givenportis 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 givenportis 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
portis valid or not.
-
isValidNonEphemeralPort
public static boolean isValidNonEphemeralPort(int port)
-