|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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.Resolver |
resolver
A resolver instance used to retrieve DNS records. |
Fields inherited from interface org.apache.james.services.DNSServer |
---|
ROLE |
Constructor Summary | |
---|---|
DNSServer()
|
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration configuration)
|
void |
dispose()
The dispose operation is called at the end of a components lifecycle. |
java.util.Collection |
findMXRecords(java.lang.String hostname)
Return a prioritized unmodifiable list of host handling mail for the domain. |
java.util.List |
findMXRecordsRaw(java.lang.String hostname)
Return a prioritized unmodifiable list of MX records obtained from the server. |
static java.net.InetAddress[] |
getAllByName(java.lang.String host)
|
static java.net.InetAddress |
getByName(java.lang.String host)
|
java.lang.String[] |
getDNSServers()
Return the list of DNS servers in use by this service |
java.util.Iterator |
getSMTPHostAddresses(java.lang.String domainName)
Performs DNS lookups as needed to find servers which should or might support SMTP. |
void |
initialize()
|
org.xbill.DNS.Record[] |
lookup(java.lang.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)
|
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
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 java.util.List findMXRecordsRaw(java.lang.String hostname)
Return a prioritized unmodifiable list of MX records obtained from the server.
hostname
- domain name to look up
public java.util.Collection findMXRecords(java.lang.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
findMXRecords
in interface DNSServer
hostname
- domain name to look up
public org.xbill.DNS.Record[] lookup(java.lang.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 java.util.Iterator getSMTPHostAddresses(java.lang.String domainName)
DNSServer
getSMTPHostAddresses
in interface DNSServer
domainName
- the String domain for which SMTP host addresses are
sought.
public static java.net.InetAddress getByName(java.lang.String host) throws java.net.UnknownHostException
java.net.UnknownHostException
InetAddress.getByName(String)
public static java.net.InetAddress[] getAllByName(java.lang.String host) throws java.net.UnknownHostException
java.net.UnknownHostException
java.net.InetAddress#getByAllName(String)
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
java.lang.Exception
- if an error is encountered during shutdown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |