|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nhindirect.dns.DNSSocketServer
org.nhindirect.dns.TCPServer
public class TCPServer
TCP socket server that handled DNS requests over TCP.
| Constructor Summary | |
|---|---|
TCPServer(DNSServerSettings settings,
DNSResponder responder)
Creates a TCP socket server. |
|
| Method Summary | |
|---|---|
void |
createServerSocket()
Creates and initializes the socket implementation that will accept incoming requests. |
Runnable |
getDNSRequestTask(Object s)
Gets the Runnable task that will process a DNS request. |
Runnable |
getSocketAcceptTask()
Gets the Runnable task that will be responsible for accepting connections. |
void |
start()
Starts the socket server and initializes the dispatch threads. |
void |
stop()
Shuts down the socket server and terminates the server from accepting additional requests. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TCPServer(DNSServerSettings settings,
DNSResponder responder)
throws DNSException
start() method is called.
settings - The server settings. The settings contain specific IP and socket configuration parameters.responsder - The DNS responder that will handle lookups.
DNSException| Method Detail |
|---|
public void start()
throws DNSException
start in class DNSSocketServerDNSException
public void stop()
throws DNSException
stop in class DNSSocketServerDNSException
public void createServerSocket()
throws DNSException
createServerSocket in class DNSSocketServerDNSExceptionpublic Runnable getSocketAcceptTask()
getSocketAcceptTask in class DNSSocketServerpublic Runnable getDNSRequestTask(Object s)
getDNSRequestTask in class DNSSocketServers - An arbitrary parameter passed to the Runnable task. This parameter generally contain the DNS request information.
This may be the TCP socket from the accept() server socket call or a UDP datagram packet.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||