DnsClient (driver-core 5.4.0 API) (original) (raw)
An interface describing a DNS client.
Since:
4.6
See Also:
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 up
type
- 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](DnsException.html "class in com.mongodb.spi.dns")
- the exception