rabbit.io
Interface Resolver

All Known Implementing Classes:
HttpProxy, SimpleResolver

public interface Resolver

An interface to handle name lookups.

Author:
Robert Olofsson

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.
 

Method Detail

getInetAddress

void getInetAddress(URL url,
                    InetAddressListener listener)
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.

Parameters:
url - the URL to lookup.
listener - the InetAddressListener to notify when lookup is done.

getConnectPort

int getConnectPort(int port)
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.


isProxyConnected

boolean isProxyConnected()
Check if the resolver is using a proxy or not.


getProxyAuthString

String getProxyAuthString()
Get the currently set proxy authentication.