|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.dnsserver.DNSServer
public class DNSServer
Provides DNS client functionality to services running inside James
Field Summary | |
---|---|
protected org.xbill.DNS.Cache |
cache
A TTL cache of results received from the DNS server. |
protected org.xbill.DNS.Resolver |
resolver
A resolver instance used to retrieve DNS records. |
Fields inherited from interface org.apache.james.api.dnsservice.DNSService |
---|
ROLE |
Constructor Summary | |
---|---|
DNSServer()
|
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
java.util.Collection |
findMXRecords(java.lang.String hostname)
Return a prioritized unmodifiable list of host handling mail for the domain. |
java.util.Collection |
findTXTRecords(java.lang.String hostname)
Get a collection of DNS TXT Records |
java.net.InetAddress[] |
getAllByName(java.lang.String host)
|
java.net.InetAddress |
getByName(java.lang.String host)
|
java.lang.String[] |
getDNSServers()
Return the list of DNS servers in use by this service |
java.lang.String |
getHostName(java.net.InetAddress addr)
|
java.net.InetAddress |
getLocalHost()
|
org.xbill.DNS.Name[] |
getSearchPaths()
Return the list of DNS servers in use by this service |
java.util.Iterator |
getSMTPHostAddresses(java.lang.String domainName)
Returns an Iterator over org.apache.mailet.HostAddress, a specialized subclass of javax.mail.URLName, which provides location information for servers that are specified as mail handlers for the given hostname. |
void |
initialize()
|
protected org.xbill.DNS.Record[] |
lookup(java.lang.String namestr,
int type,
java.lang.String typeDesc)
Looks up DNS records of the specified type for the specified name. |
protected org.xbill.DNS.Record[] |
lookupNoException(java.lang.String namestr,
int type,
java.lang.String typeDesc)
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
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
protected org.xbill.DNS.Cache cache
Constructor Detail |
---|
public DNSServer()
Method Detail |
---|
public void configure(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
Initializable.initialize()
public java.lang.String[] getDNSServers()
Return the list of DNS servers in use by this service
getDNSServers
in interface DNSServerMBean
public org.xbill.DNS.Name[] getSearchPaths()
Return the list of DNS servers in use by this service
public java.util.Collection findMXRecords(java.lang.String hostname) throws TemporaryResolutionException
DNSService
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
findMXRecords
in interface DNSService
hostname
- domain name to look up
TemporaryResolutionException
- get thrown on temporary problemsDNSService.findMXRecords(String)
protected org.xbill.DNS.Record[] lookup(java.lang.String namestr, int type, java.lang.String typeDesc) throws TemporaryResolutionException
namestr
- the name of the host to be looked uptype
- the type of record desiredtypeDesc
- the description of the record type, for debugging purpose
TemporaryResolutionException
protected org.xbill.DNS.Record[] lookupNoException(java.lang.String namestr, int type, java.lang.String typeDesc)
public java.util.Iterator getSMTPHostAddresses(java.lang.String domainName) throws TemporaryResolutionException
DNSService
getSMTPHostAddresses
in interface DNSService
domainName
- - the domain for which to find mail servers
TemporaryResolutionException
- get thrown on temporary problemsDNSService.getSMTPHostAddresses(String)
public java.net.InetAddress getByName(java.lang.String host) throws java.net.UnknownHostException
getByName
in interface DNSService
java.net.UnknownHostException
DNSService.getByName(String)
public java.net.InetAddress[] getAllByName(java.lang.String host) throws java.net.UnknownHostException
getAllByName
in interface DNSService
java.net.UnknownHostException
DNSService.getAllByName(String)
public java.util.Collection findTXTRecords(java.lang.String hostname)
DNSService
findTXTRecords
in interface DNSService
hostname
- The hostname to check
DNSService.findTXTRecords(String)
public java.lang.String getHostName(java.net.InetAddress addr)
getHostName
in interface DNSService
DNSService.getHostName(java.net.InetAddress)
public java.net.InetAddress getLocalHost() throws java.net.UnknownHostException
getLocalHost
in interface DNSService
java.net.UnknownHostException
DNSService.getLocalHost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |