Class BridgeHostAndPortUtil
java.lang.Object
eu.cloudnetservice.modules.bridge.impl.util.BridgeHostAndPortUtil
This host and port helper provides util methods to create a host and port from socket addresses.
- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull eu.cloudnetservice.driver.network.HostAndPortfromSocketAddress(@NonNull SocketAddress address) Parses a socket address to a new host and port.
-
Constructor Details
-
BridgeHostAndPortUtil
private BridgeHostAndPortUtil()
-
-
Method Details
-
fromSocketAddress
@NonNull public static @NonNull eu.cloudnetservice.driver.network.HostAndPort fromSocketAddress(@NonNull @NonNull SocketAddress address) Parses a socket address to a new host and port.- Parameters:
address- the socket address to parse.- Returns:
- the new host and port from the given socket address.
- Throws:
IllegalArgumentException- if the socket address type is unsupported.
-