Package org.minidns.source
Class NetworkDataSourceWithAccounting
- java.lang.Object
-
- org.minidns.source.AbstractDnsDataSource
-
- org.minidns.source.NetworkDataSource
-
- org.minidns.source.NetworkDataSourceWithAccounting
-
- All Implemented Interfaces:
DnsDataSource
public class NetworkDataSourceWithAccounting extends NetworkDataSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NetworkDataSourceWithAccounting.Stats
-
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.NetworkDataSource
LOGGER
-
Fields inherited from class org.minidns.source.AbstractDnsDataSource
timeout, udpPayloadSize
-
-
Constructor Summary
Constructors Constructor Description NetworkDataSourceWithAccounting()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NetworkDataSourceWithAccounting
from(AbstractDnsClient client)
NetworkDataSourceWithAccounting.Stats
getStats()
StandardDnsQueryResult
query(DnsMessage message, java.net.InetAddress address, int port)
protected DnsMessage
queryTcp(DnsMessage message, java.net.InetAddress address, int port)
protected DnsMessage
queryUdp(DnsMessage message, java.net.InetAddress address, int port)
-
Methods inherited from class org.minidns.source.NetworkDataSource
createDatagramSocket, createSocket
-
Methods inherited from class org.minidns.source.AbstractDnsDataSource
cacheResult, getQueryMode, getTimeout, getUdpPayloadSize, queryAsync, setQueryMode, setTimeout, setUdpPayloadSize
-
-
-
-
Constructor Detail
-
NetworkDataSourceWithAccounting
public NetworkDataSourceWithAccounting()
-
-
Method Detail
-
query
public StandardDnsQueryResult query(DnsMessage message, java.net.InetAddress address, int port) throws java.io.IOException
- Specified by:
query
in interfaceDnsDataSource
- Overrides:
query
in classNetworkDataSource
- Throws:
java.io.IOException
-
queryUdp
protected DnsMessage queryUdp(DnsMessage message, java.net.InetAddress address, int port) throws java.io.IOException
- Overrides:
queryUdp
in classNetworkDataSource
- Throws:
java.io.IOException
-
queryTcp
protected DnsMessage queryTcp(DnsMessage message, java.net.InetAddress address, int port) throws java.io.IOException
- Overrides:
queryTcp
in classNetworkDataSource
- Throws:
java.io.IOException
-
getStats
public NetworkDataSourceWithAccounting.Stats getStats()
-
from
public static NetworkDataSourceWithAccounting from(AbstractDnsClient client)
-
-