com.antiaction.dns.transport
Class DNSUDPTransport

java.lang.Object
  |
  +--com.antiaction.dns.transport.DNSUDPTransport
All Implemented Interfaces:
DNSTransport

public class DNSUDPTransport
extends java.lang.Object
implements DNSTransport

DNS Datagram message transport (UDP).

Version:
2.00
Author:
Nicholas Clarke

Field Summary
protected  int connTimeout
          Timeout when transmitting messages.
protected  java.util.ArrayList listHostPort
          List of server to choose from.
 
Constructor Summary
DNSUDPTransport()
          Instantiate an empty socket object.
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listHostPort

protected java.util.ArrayList listHostPort
List of server to choose from.

connTimeout

protected int connTimeout
Timeout when transmitting messages.
Constructor Detail

DNSUDPTransport

public DNSUDPTransport()
Instantiate an empty socket object.
Method Detail

setTimeout

public void setTimeout(int timeout)
Description copied from interface: DNSTransport
Set the connection timeout.
Specified by:
setTimeout in interface DNSTransport

getTimeout

public int getTimeout()
Description copied from interface: DNSTransport
Get the connection timeout.
Specified by:
getTimeout in interface DNSTransport
Following copied from interface: com.antiaction.dns.transport.DNSTransport
Returns:
timeout in milliseconds.

addHost

public void addHost(java.lang.String host,
                    int port)
Description copied from interface: DNSTransport
Add a host to the pool of servers to attempt connection with.
Specified by:
addHost in interface DNSTransport
Following copied from interface: com.antiaction.dns.transport.DNSTransport
Parameters:
host - destination host name.
port - destination port.

getConnector

public DNSConnector getConnector()
Description copied from interface: DNSTransport
Returns a connector object used to communicate with the contained servers.
Specified by:
getConnector in interface DNSTransport
Following copied from interface: com.antiaction.dns.transport.DNSTransport
Returns:
a connector object used to communicate with the contained servers.

toString

public java.lang.String toString()
Description copied from interface: DNSTransport
Returns a string representation of the internal state, mostly for debugging purposes.
Specified by:
toString in interface DNSTransport
Overrides:
toString in class java.lang.Object
Following copied from interface: com.antiaction.dns.transport.DNSTransport
Returns:
debug string.