org.jasen.net
Class JasenInetAddressResolver

java.lang.Object
  extended byorg.jasen.net.JasenInetAddressResolver
All Implemented Interfaces:
InetAddressResolver

public class JasenInetAddressResolver
extends Object
implements InetAddressResolver

Simple implementation of an InetAddress resolver. This class uses a VERY rudamentary caching system

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

Author:
Jason Polites

Constructor Summary
JasenInetAddressResolver()
           
 
Method Summary
 InetAddress[] getAllByName(String host)
          Gets all InetAddress records associated with the host name or IP address provided
 InetAddress getByName(String host)
          Gets the InetAddress associated with the host name or IP address provided
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasenInetAddressResolver

public JasenInetAddressResolver()
Method Detail

getByName

public InetAddress getByName(String host)
                      throws UnknownHostException
Description copied from interface: InetAddressResolver
Gets the InetAddress associated with the host name or IP address provided

Specified by:
getByName in interface InetAddressResolver
Parameters:
host -
Returns:
The InetAddress object for the given host
Throws:
UnknownHostException

getAllByName

public InetAddress[] getAllByName(String host)
                           throws UnknownHostException
Description copied from interface: InetAddressResolver
Gets all InetAddress records associated with the host name or IP address provided

Specified by:
getAllByName in interface InetAddressResolver
Parameters:
host -
Returns:
All the hosts known for the given name or IP
Throws:
UnknownHostException