Package de.adrianlange.mcd
Interface DnsLookupContext
- All Known Implementing Classes:
DnsLookupContextImpl
public interface DnsLookupContext
Configuration context for DNS lookups.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of configured DNS servers.intReturns the number of automatic retries until a request fails.Returns the duration until a request runs into a timeout.booleanisTcp()Returns if TCP is used.
-
Method Details
-
getDnsServers
Collection<String> getDnsServers()Returns a collection of configured DNS servers. If nothing is set the hosts default DNS server is used. If multiple DNS server are defined, only one of them will be used.- Returns:
- A collection of DNS servers or
nullif none is configured.
-
getTimeout
Duration getTimeout()Returns the duration until a request runs into a timeout.- Returns:
- duration until request runs into timeout
-
getRetries
int getRetries()Returns the number of automatic retries until a request fails.- Returns:
- Number of retries
-
isTcp
boolean isTcp()Returns if TCP is used. If not UDP will be used.- Returns:
- True if TCP should be used, false otherwise
-