public class DestinationParser extends Object
InetSocketAddress
es by parsing String
values.Modifier and Type | Method and Description |
---|---|
static List<InetSocketAddress> |
parse(String destinations,
int defaultPort)
Constructs
InetSocketAddress es by parsing the given String value. |
public static List<InetSocketAddress> parse(String destinations, int defaultPort)
InetSocketAddress
es by parsing the given String
value.
The string is a comma separated list of destinations in the form of hostName[:portNumber].
For example, "host1.domain.com,host2.domain.com:5560"
If portNumber is not provided, then the given defaultPort will be used.
destinations
- comma-separated list of destinations in the form of hostName[:portNumber]
defaultPort
- the port number to use when a destination does not specify one explicitlyInetSocketAddress
instancesCopyright © 2013–2021. All rights reserved.