Package org.minidns.source
Interface DnsDataSource
-
- All Known Implementing Classes:
AbstractDnsDataSource
,AsyncNetworkDataSource
,NetworkDataSource
,NetworkDataSourceWithAccounting
public interface DnsDataSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DnsDataSource.OnResponseCallback
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getTimeout()
Retrieve the current dns query timeout, in milliseconds.int
getUdpPayloadSize()
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)
void
setTimeout(int timeout)
Change the dns query timeout for all future queries.
-
-
-
Method Detail
-
query
DnsQueryResult query(DnsMessage message, java.net.InetAddress address, int port) throws java.io.IOException
- Throws:
java.io.IOException
-
queryAsync
MiniDnsFuture<DnsQueryResult,java.io.IOException> queryAsync(DnsMessage message, java.net.InetAddress address, int port, DnsDataSource.OnResponseCallback onResponseCallback)
-
getUdpPayloadSize
int getUdpPayloadSize()
-
getTimeout
int getTimeout()
Retrieve the current dns query timeout, in milliseconds.- Returns:
- the current dns query timeout in milliseconds.
-
setTimeout
void setTimeout(int timeout)
Change the dns query timeout for all future queries. The timeout must be specified in milliseconds.- Parameters:
timeout
- new dns query timeout in milliseconds.
-
-