|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hs.mail.dns.DnsServer
public class DnsServer
Provides DNS client functionality.
Field Summary | |
---|---|
protected org.xbill.DNS.Resolver |
resolver
A resolver instance used to retrieve DNS records. |
Constructor Summary | |
---|---|
DnsServer()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Collection<String> |
findMXRecords(String hostname)
Return a prioritized unmodifiable list of host handling mail for the domain. |
List<String> |
findMXRecordsRaw(String hostname)
Return a prioritized unmodifiable list of MX records obtained from the server. |
static InetAddress[] |
getAllByName(String host)
|
static InetAddress |
getByName(String host)
|
String[] |
getDnsServers()
|
Iterator<HostAddress> |
getSmtpHostAddress(String domainName)
|
org.xbill.DNS.Record[] |
lookup(String name,
int type)
Looks up DNS records of the specified type for the specified name. |
protected org.xbill.DNS.Record[] |
processSetResponse(org.xbill.DNS.SetResponse sr)
|
void |
setDnsServers(List<String> dnsServers)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.xbill.DNS.Resolver resolver
Constructor Detail |
---|
public DnsServer()
Method Detail |
---|
public String[] getDnsServers()
public void setDnsServers(List<String> dnsServers)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public List<String> findMXRecordsRaw(String hostname)
Return a prioritized unmodifiable list of MX records obtained from the server.
hostname
- domain name to look up
public Collection<String> findMXRecords(String hostname)
Return a prioritized unmodifiable list of host handling mail for the domain.
First lookup MX hosts, then MX hosts of the CNAME adress, and if no server is found return the IP of the hostname
hostname
- domain name to look up
public org.xbill.DNS.Record[] lookup(String name, int type)
name
- the name of the host to be looked uptype
- the type of record desiredprotected org.xbill.DNS.Record[] processSetResponse(org.xbill.DNS.SetResponse sr)
public Iterator<HostAddress> getSmtpHostAddress(String domainName)
public static InetAddress getByName(String host) throws UnknownHostException
UnknownHostException
InetAddress.getByName(String)
public static InetAddress[] getAllByName(String host) throws UnknownHostException
UnknownHostException
java.net.InetAddress#getByAllName(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |