public class TCPServer extends DNSSocketServer
| Constructor and Description |
|---|
TCPServer(DNSServerSettings settings,
DNSResponder responder)
Creates a TCP socket server.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
Long |
getErrorRequestCount()
Gets the number of requests that resulted in an error.
|
Long |
getMissedRequestCount()
Gets the number of requests that returned no records without error.
|
Runnable |
getSocketAcceptTask()
Gets the Runnable task that will be responsible for accepting connections.
|
Long |
getSuccessfulRequestCount()
Gets the number of requests that returned without error.
|
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.
|
getRejectedRequestCount, getResourceRequestCount, getResourceRequestLoad, getUptimepublic 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.DNSExceptionpublic void start()
throws DNSException
start in class DNSSocketServerDNSExceptionpublic void stop()
throws DNSException
stop in class DNSSocketServerDNSExceptionpublic 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.public Long getMissedRequestCount()
public Long getSuccessfulRequestCount()
public Long getErrorRequestCount()
Copyright © 2010-2015 The Direct Project. All Rights Reserved.