Package org.minidns.source
Class NetworkDataSource
java.lang.Object
org.minidns.source.AbstractDnsDataSource
org.minidns.source.NetworkDataSource
- All Implemented Interfaces:
DnsDataSource
- Direct Known Subclasses:
NetworkDataSourceWithAccounting
-
Nested Class Summary
Nested classes/interfaces inherited from class org.minidns.source.AbstractDnsDataSource
AbstractDnsDataSource.QueryMode
Nested classes/interfaces inherited from interface org.minidns.source.DnsDataSource
DnsDataSource.OnResponseCallback
-
Field Summary
Fields inherited from class org.minidns.source.AbstractDnsDataSource
timeout, udpPayloadSize
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DatagramSocket
Create aDatagramSocket
using the system defaults.protected Socket
Create aSocket
using the system defaultSocketFactory
.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) Methods inherited from class org.minidns.source.AbstractDnsDataSource
cacheResult, getQueryMode, getTimeout, getUdpPayloadSize, queryAsync, setQueryMode, setTimeout, setUdpPayloadSize
-
Field Details
-
LOGGER
-
-
Constructor Details
-
NetworkDataSource
public NetworkDataSource()
-
-
Method Details
-
query
public StandardDnsQueryResult query(DnsMessage message, InetAddress address, int port) throws IOException - Specified by:
query
in interfaceDnsDataSource
- Specified by:
query
in classAbstractDnsDataSource
- Throws:
IOException
-
queryUdp
- Throws:
IOException
-
queryTcp
- Throws:
IOException
-
createSocket
Create aSocket
using the system defaultSocketFactory
.- Returns:
- The new
Socket
instance
-
createDatagramSocket
Create aDatagramSocket
using the system defaults.- Returns:
- The new
DatagramSocket
instance - Throws:
SocketException
- If creation of theDatagramSocket
fails
-