rabbit.httpio
Class SimpleResolver

java.lang.Object
  extended by rabbit.httpio.SimpleResolver
All Implemented Interfaces:
Resolver

public class SimpleResolver
extends Object
implements Resolver

A simple resolver that uses the dnsjava resolver.

Author:
Robert Olofsson

Constructor Summary
SimpleResolver(NioHandler tr)
           
 
Method Summary
 int getConnectPort(int port)
          Get the port to use for connecting to a given port.
 void getInetAddress(URL url, InetAddressListener listener)
          Get the InetAddress for a given url.
 String getProxyAuthString()
          Get the currently set proxy authentication.
 boolean isProxyConnected()
          Check if the resolver is using a proxy or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleResolver

public SimpleResolver(NioHandler tr)
Method Detail

getInetAddress

public void getInetAddress(URL url,
                           InetAddressListener listener)
Description copied from interface: Resolver
Get the InetAddress for a given url. Normally the InetAddress of the url host, but might be the InetAddress of the chained proxy to use.

Specified by:
getInetAddress in interface Resolver
Parameters:
url - the URL to lookup.
listener - the InetAddressListener to notify when lookup is done.

getConnectPort

public int getConnectPort(int port)
Description copied from interface: Resolver
Get the port to use for connecting to a given port. Normally port is returned, but if there is a chained proxy, then the proxy port is returned instead.

Specified by:
getConnectPort in interface Resolver

isProxyConnected

public boolean isProxyConnected()
Description copied from interface: Resolver
Check if the resolver is using a proxy or not.

Specified by:
isProxyConnected in interface Resolver

getProxyAuthString

public String getProxyAuthString()
Description copied from interface: Resolver
Get the currently set proxy authentication.

Specified by:
getProxyAuthString in interface Resolver