Class StorkAddressUtils

java.lang.Object
io.smallrye.stork.utils.StorkAddressUtils

public final class StorkAddressUtils extends Object
A set of utility methods around addresses.
  • Field Details

  • Constructor Details

    • StorkAddressUtils

      public StorkAddressUtils()
  • Method Details

    • parseToHostAndPort

      public static HostAndPort parseToHostAndPort(String address, int defaultPort, String configPlace)
      Creates a new HostAndPort instance from an address.
      Parameters:
      address - the address, either host:port or just host
      defaultPort - the default port, used when the address doesn't provide the port
      configPlace - the location of the address in the configuration, for logging purposes
      Returns:
      the new HostAndPort
    • parseToString

      public static String parseToString(HostAndPort hostAndPort)
      Creates a new String instance containing either host:port or just host.
      Parameters:
      hostAndPort - HostAndPort instance from an address.
      Returns:
      the String containing either host:port or just host