Package com.rabbitmq.client
Class DnsRecordIpAddressResolver
java.lang.Object
com.rabbitmq.client.DnsRecordIpAddressResolver
- All Implemented Interfaces:
AddressResolver
AddressResolver
that resolves DNS record IPs.
Uses InetAddress
internally.
The first returned address is used when automatic recovery is NOT enabled
at the ConnectionFactory
level.
When automatic recovery is enabled, a random address will be picked up
from the returned list of Address
es.-
Constructor Summary
ConstructorDescriptionDnsRecordIpAddressResolver
(Address address) DnsRecordIpAddressResolver
(Address address, boolean ssl) DnsRecordIpAddressResolver
(String hostname) DnsRecordIpAddressResolver
(String hostname, int port) DnsRecordIpAddressResolver
(String hostname, int port, boolean ssl) -
Method Summary
Modifier and TypeMethodDescriptionGet the IP addresses from a DNS queryprotected InetAddress[]
resolveIpAddresses
(String hostName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.rabbitmq.client.AddressResolver
maybeShuffle
-
Constructor Details
-
DnsRecordIpAddressResolver
-
DnsRecordIpAddressResolver
-
DnsRecordIpAddressResolver
public DnsRecordIpAddressResolver() -
DnsRecordIpAddressResolver
-
DnsRecordIpAddressResolver
-
DnsRecordIpAddressResolver
-
-
Method Details
-
getAddresses
Get the IP addresses from a DNS query- Specified by:
getAddresses
in interfaceAddressResolver
- Returns:
- candidate
Address
es - Throws:
IOException
- if DNS resolution failsUnknownHostException
-
resolveIpAddresses
- Throws:
UnknownHostException
-