Package org.minidns.source.async
Class AsyncNetworkDataSource
- java.lang.Object
-
- org.minidns.source.AbstractDnsDataSource
-
- org.minidns.source.async.AsyncNetworkDataSource
-
- All Implemented Interfaces:
DnsDataSource
public class AsyncNetworkDataSource extends AbstractDnsDataSource
A DNS data sources that resolves requests via the network asynchronously.
-
-
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 Modifier and Type Field Description protected static java.util.logging.Logger
LOGGER
The logger of this data source.-
Fields inherited from class org.minidns.source.AbstractDnsDataSource
timeout, udpPayloadSize
-
-
Constructor Summary
Constructors Constructor Description AsyncNetworkDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DnsQueryResult
query(DnsMessage message, java.net.InetAddress address, int port)
MiniDnsFuture<DnsQueryResult,java.io.IOException>
queryAsync(DnsMessage message, java.net.InetAddress address, int port, DnsDataSource.OnResponseCallback onResponseCallback)
-
Methods inherited from class org.minidns.source.AbstractDnsDataSource
cacheResult, getQueryMode, getTimeout, getUdpPayloadSize, setQueryMode, setTimeout, setUdpPayloadSize
-
-
-
-
Field Detail
-
LOGGER
protected static final java.util.logging.Logger LOGGER
The logger of this data source.
-
-
Constructor Detail
-
AsyncNetworkDataSource
public AsyncNetworkDataSource()
-
-
Method Detail
-
queryAsync
public MiniDnsFuture<DnsQueryResult,java.io.IOException> queryAsync(DnsMessage message, java.net.InetAddress address, int port, DnsDataSource.OnResponseCallback onResponseCallback)
- Specified by:
queryAsync
in interfaceDnsDataSource
- Overrides:
queryAsync
in classAbstractDnsDataSource
-
query
public DnsQueryResult query(DnsMessage message, java.net.InetAddress address, int port) throws java.io.IOException
- Specified by:
query
in interfaceDnsDataSource
- Specified by:
query
in classAbstractDnsDataSource
- Throws:
java.io.IOException
-
-