org.nhindirect.dns
Class DNSServer

java.lang.Object
  extended by org.nhindirect.dns.DNSServer

public class DNSServer
extends Object

The DNS server creates the UDP and TCP responders and manages their life cycles. DNS queries are delegated the responders which use the DNSStore to lookup entries.

To run a server, an instance of a server is created followed by calling the start() method.

Since:
1.0
Author:
Greg Meyer

Constructor Summary
DNSServer(DNSStore store, DNSServerSettings settings)
          Create a new DNSServer
 
Method Summary
 void start()
          Starts the DNS server by initializing and launching the TCP and UDP listeners.
 void stop()
          Stops the server and shuts down the TCP and UPD listeners.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DNSServer

@Inject
public DNSServer(DNSStore store,
                        DNSServerSettings settings)
Create a new DNSServer

Parameters:
store - The storage medium of the DNS records.
settings - DNS server specific settings such as UDP/TCP ports, IP bindings, and thread tuning parameters.
Method Detail

start

public void start()
           throws DNSException
Starts the DNS server by initializing and launching the TCP and UDP listeners.

Throws:
DNSException - Thrown if the internal listeners could not be started.

stop

public void stop()
          throws DNSException
Stops the server and shuts down the TCP and UPD listeners.

Throws:
DNSException - Thrown if the internal listeners could not be stopped.


Copyright © 2010-2011 The Direct Project. All Rights Reserved.