public class NetworkDataSource extends DnsDataSource
DnsDataSource.OnResponseCallback, DnsDataSource.QueryMode
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER |
timeout, udpPayloadSize
Constructor and Description |
---|
NetworkDataSource() |
Modifier and Type | Method and Description |
---|---|
protected DatagramSocket |
createDatagramSocket()
Create a
DatagramSocket using the system defaults. |
protected Socket |
createSocket()
Create a
Socket using the system default SocketFactory . |
DnsMessage |
query(DnsMessage message,
InetAddress address,
int port) |
protected DnsMessage |
queryTcp(DnsMessage message,
InetAddress address,
int port) |
protected DnsMessage |
queryUdp(DnsMessage message,
InetAddress address,
int port) |
cacheResult, getQueryMode, getTimeout, getUdpPayloadSize, queryAsync, setQueryMode, setTimeout, setUdpPayloadSize
public NetworkDataSource()
public DnsMessage query(DnsMessage message, InetAddress address, int port) throws IOException
query
in class DnsDataSource
IOException
protected DnsMessage queryUdp(DnsMessage message, InetAddress address, int port) throws IOException
IOException
protected DnsMessage queryTcp(DnsMessage message, InetAddress address, int port) throws IOException
IOException
protected Socket createSocket()
Socket
using the system default SocketFactory
.Socket
instanceprotected DatagramSocket createDatagramSocket() throws SocketException
DatagramSocket
using the system defaults.DatagramSocket
instanceSocketException
- If creation of the DatagramSocket
fails