com.antiaction.dns.transport
Interface DNSTransport

All Known Implementing Classes:
DNSTCPTransport, DNSUDPTransport

public interface DNSTransport

DNS message transport interface, abstract class for DNS packet transports.

Version:
2.00
Author:
Nicholas Clarke

Method Summary
 void addHost(java.lang.String host, int port)
          Add a host to the pool of servers to attempt connection with.
 DNSConnector getConnector()
          Returns a connector object used to communicate with the contained servers.
 int getTimeout()
          Get the connection timeout.
 void setTimeout(int timeout)
          Set the connection timeout.
 java.lang.String toString()
          Returns a string representation of the internal state, mostly for debugging purposes.
 

Method Detail

setTimeout

public void setTimeout(int timeout)
Set the connection timeout.

getTimeout

public int getTimeout()
Get the connection timeout.
Returns:
timeout in milliseconds.

addHost

public void addHost(java.lang.String host,
                    int port)
Add a host to the pool of servers to attempt connection with.
Parameters:
host - destination host name.
port - destination port.

getConnector

public DNSConnector getConnector()
Returns a connector object used to communicate with the contained servers.
Returns:
a connector object used to communicate with the contained servers.

toString

public java.lang.String toString()
Returns a string representation of the internal state, mostly for debugging purposes.
Overrides:
toString in class java.lang.Object
Returns:
debug string.