Package com.mongodb.spi.dns
Interface DnsClient
An interface describing a DNS client.
- Since:
- 4.6
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetResourceRecordData
(String name, String type) Gets the resource record values for the given name and type.
-
Method Details
-
getResourceRecordData
Gets the resource record values for the given name and type.Implementations should throw
DnsWithResponseCodeException
if the DNS response code is known. Otherwise, the more genericDnsException
should be thrown.- Parameters:
name
- the name of the resource to look uptype
- the resource record type, typically either"SRV"
or"TXT"
.- Returns:
- the list of values for the requested resource, or the empty list if none exist
- Throws:
DnsException
- the exception
-