Class DnsNameResolverProvider


public final class DnsNameResolverProvider extends NameResolverProvider
A provider for DnsNameResolver.

It resolves a target URI whose scheme is "dns". The (optional) authority of the target URI is reserved for the address of alternative DNS server (not implemented yet). The path of the target URI, excluding the leading slash '/', is treated as the host name and the optional port to be resolved by DNS. Example target URIs:

  • "dns:///foo.googleapis.com:8080" (using default DNS)
  • "dns://8.8.8.8/foo.googleapis.com:8080" (using alternative DNS (not implemented yet))
  • "dns:///foo.googleapis.com" (without port)