Class InetSocketAddressParser
java.lang.Object
org.springframework.data.elasticsearch.client.InetSocketAddressParser
Utility to parse endpoints in
host:port
format into InetSocketAddress
.- Since:
- 3.2
- Author:
- Mark Paluch
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic InetSocketAddress
Parse a host and port string into aInetSocketAddress
.
-
Constructor Details
-
InetSocketAddressParser
public InetSocketAddressParser()
-
-
Method Details
-
parse
Parse a host and port string into aInetSocketAddress
.- Parameters:
hostPortString
- Hostname/IP address and port formatted ashost:port
orhost
.defaultPort
- default port to apply ifhostPostString
does not contain a port.- Returns:
- a
InetSocketAddress
that is unresolved to avoid DNS lookups. - See Also:
-