/** * Returns a valid address for Akka. It returns a String of format 'host:port'. * When an IPv6 address is specified, it normalizes the IPv6 address to avoid * complications with the exact URL match policy of Akka. * @param host The hostname, IPv4 or IPv6 address * @param port The port * @return host:port where host will be normalized if it is an IPv6 address */ public static String unresolvedHostAndPortToNormalizedString(String host, int port) { Preconditions.checkArgument(port >= 0 && port < 65536, "Port is not within the valid range,"); return unresolvedHostToNormalizedString(host) + ":" + port; }
/** * Returns a valid address for Akka. It returns a String of format 'host:port'. * When an IPv6 address is specified, it normalizes the IPv6 address to avoid * complications with the exact URL match policy of Akka. * @param host The hostname, IPv4 or IPv6 address * @param port The port * @return host:port where host will be normalized if it is an IPv6 address */ public static String unresolvedHostAndPortToNormalizedString(String host, int port) { Preconditions.checkArgument(port >= 0 && port < 65536, "Port is not within the valid range,"); return unresolvedHostToNormalizedString(host) + ":" + port; }
/** * Returns a valid address for Akka. It returns a String of format 'host:port'. * When an IPv6 address is specified, it normalizes the IPv6 address to avoid * complications with the exact URL match policy of Akka. * @param host The hostname, IPv4 or IPv6 address * @param port The port * @return host:port where host will be normalized if it is an IPv6 address */ public static String unresolvedHostAndPortToNormalizedString(String host, int port) { Preconditions.checkArgument(port >= 0 && port < 65536, "Port is not within the valid range,"); return unresolvedHostToNormalizedString(host) + ":" + port; }