com.darwinsys.net
Class DNSUtils

java.lang.Object
  extended by com.darwinsys.net.DNSUtils

public class DNSUtils
extends java.lang.Object


Constructor Summary
DNSUtils(java.lang.String dnsHost)
          Construct a DNSUtils object.
 
Method Summary
 java.lang.String findMX(java.lang.String host)
          Find the MX record for a given host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSUtils

public DNSUtils(java.lang.String dnsHost)
         throws javax.naming.NamingException
Construct a DNSUtils object.

Parameters:
dnsHost - The name of a host that runs a DNS server
Throws:
javax.naming.NamingException
Method Detail

findMX

public java.lang.String findMX(java.lang.String host)
                        throws javax.naming.NamingException
Find the MX record for a given host. This implementation returns the first DNS host listed; a later version will sort them and pick the best one.

Parameters:
host -
Returns:
The MX host, or the input if there is no MX.
Throws:
javax.naming.NamingException


Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.