Class BridgeHostAndPortUtil

java.lang.Object
eu.cloudnetservice.modules.bridge.impl.util.BridgeHostAndPortUtil

public final class BridgeHostAndPortUtil extends Object
This host and port helper provides util methods to create a host and port from socket addresses.
Since:
4.0
  • 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.