Package de.adrianlange.mcd
Interface DnsLookupContext
-
- All Known Implementing Classes:
DnsLookupContextImpl
public interface DnsLookupContextConfiguration context for DNS lookups.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<String>getDnsServers()Returns a collection of configured DNS servers.intgetRetries()Returns the number of automatic retries until a request fails.DurationgetTimeout()Returns the duration until a request runs into a timeout.booleanisTcp()Returns if TCP is used.
-
-
-
Method Detail
-
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
-
-