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, InetAddress address, int port)
MiniDnsFuture<DnsQueryResult,IOException>
queryAsync(DnsMessage message, 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, InetAddress address, int port) throws IOException
- Throws:
IOException
-
queryAsync
MiniDnsFuture<DnsQueryResult,IOException> queryAsync(DnsMessage message, 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.
-
-