public interface DNSService
Modifier and Type | Method and Description |
---|---|
Collection<String> |
findMXRecords(String hostname)
Return a prioritized unmodifiable list of host handling mail for the
domain.
|
Collection<String> |
findTXTRecords(String hostname)
Get a collection of DNS TXT Records
|
InetAddress[] |
getAllByName(String host)
Resolve the given hostname to an array of InetAddress based on the DNS
Server.
|
InetAddress |
getByName(String host)
Resolve the given hostname to an InetAddress based on the DNS Server.
|
String |
getHostName(InetAddress addr)
Resolve the given InetAddress to an host name based on the DNS Server.
|
InetAddress |
getLocalHost()
Resolve the local hostname of the machine and returns it.
|
Collection<String> findMXRecords(String hostname) throws TemporaryResolutionException
Return a prioritized unmodifiable list of host handling mail for the domain.
First lookup MX hosts, then MX hosts of the CNAME address, and if no server is found return the IP of the hostname
hostname
- domain name to look upTemporaryResolutionException
- get thrown on temporary problemsCollection<String> findTXTRecords(String hostname)
hostname
- The hostname to checkInetAddress[] getAllByName(String host) throws UnknownHostException
UnknownHostException
InetAddress getByName(String host) throws UnknownHostException
UnknownHostException
InetAddress getLocalHost() throws UnknownHostException
UnknownHostException
String getHostName(InetAddress addr)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.