org.apache.james.dnsserver
Class DNSServer

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLogEnabled
        |
        +--org.apache.james.dnsserver.DNSServer
All Implemented Interfaces:
Configurable, DNSServer, Initializable, LogEnabled

public class DNSServer
extends AbstractLogEnabled
implements Configurable, Initializable, DNSServer

Provides DNS client functionality to components running inside James

Version:
1.0.0, 18/06/2000
Author:
Serge Knystautas

Field Summary
 
Fields inherited from interface org.apache.james.services.DNSServer
ROLE
 
Constructor Summary
DNSServer()
           
 
Method Summary
 void configure(Configuration configuration)
           
 Collection findMXRecords(String hostname)
          Return a prioritized list of MX records obtained from the server.
 void initialize()
           
 org.xbill.DNS.Record[] lookup(String name, short type)
          Looks up DNS records of the specified type for the specified name.
 
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
 

Constructor Detail

DNSServer

public DNSServer()
Method Detail

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
ConfigurationException
See Also:
Configurable.configure(Configuration)

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Exception
See Also:
Initializable.initialize()

findMXRecords

public Collection findMXRecords(String hostname)

Return a prioritized list of MX records obtained from the server.

TODO: This should actually return a List, not a Collection.

Specified by:
findMXRecords in interface DNSServer
Parameters:
hostname - the hostname to check
Returns:
a list of MX records corresponding to this mail domain name

lookup

public org.xbill.DNS.Record[] lookup(String name,
                                     short type)
Looks up DNS records of the specified type for the specified name. This method is a public wrapper for the private implementation method

Parameters:
name - the name of the host to be looked up
type - the type of record desired


"Copyright © 1999-2002 Apache Jakarta Project. All Rights Reserved."