org.jasen.net
Class JasenDNSResolver

java.lang.Object
  extended byorg.jasen.net.JasenDNSResolver
All Implemented Interfaces:
DNSResolver

public class JasenDNSResolver
extends Object
implements DNSResolver

Simple implementation of a DNS resolver.

This class does NOT use any caching etc.

This is the default DNS resolver, however if caching etc is required, it is recommended that an alternate resolver be used

Author:
Jason Polites

Constructor Summary
JasenDNSResolver()
           
 
Method Summary
 Attributes lookup(String host, String type)
          Performs a DNS lookup to retrieve the DNS records for the given host.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasenDNSResolver

public JasenDNSResolver()
Method Detail

lookup

public Attributes lookup(String host,
                         String type)
                  throws NamingException
Description copied from interface: DNSResolver
Performs a DNS lookup to retrieve the DNS records for the given host.

The type parameter represents the record type. For example:

 lookup("microsoft.com", "A")
 
Will return all the "A" records for microsoft.com

The jASEN engine will use this DNS resolver if specified, otherwise the internal DNS resolver will be used

Specified by:
lookup in interface DNSResolver
Parameters:
host - The web host to lookup
type - The type of DNS entry to be returned (eg. A or MX)
Returns:
The attributes of the registered DNS entry for the given host
Throws:
NamingException - If the name could not be found