public interface DomainNameResolver
Modifier and Type | Method and Description |
---|---|
InetAddress[] |
getAllByDomainName(String domainName)
Takes one domain name and returns its IP addresses based on the actual
service discovery methods.
|
String[] |
getAllResolvedHostnameByDomainName(String domainName,
boolean useFQDN)
This function combines getAllByDomainName and getHostnameByIP, for a single
domain name, it will first do a forward lookup to get all of IP addresses,
then for each IP address, it will do a reverse lookup to get the fqdn.
|
String |
getHostnameByIP(InetAddress address)
Reverse lookup an IP address and get the fully qualified domain name(fqdn).
|
InetAddress[] getAllByDomainName(String domainName) throws UnknownHostException
domainName
- UnknownHostException
String getHostnameByIP(InetAddress address)
address
- String[] getAllResolvedHostnameByDomainName(String domainName, boolean useFQDN) throws UnknownHostException
domainName
- UnknownHostException
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.