public class MiniDnsResolver extends DNSResolver implements SmackInitializer
LOGGER
Constructor and Description |
---|
MiniDnsResolver() |
Modifier and Type | Method and Description |
---|---|
static DNSResolver |
getInstance() |
java.util.List<java.lang.Exception> |
initialize() |
protected java.util.List<java.net.InetAddress> |
lookupHostAddress0(java.lang.String name,
java.util.List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode)
Lookup the IP addresses of a given host name.
|
protected java.util.List<SRVRecord> |
lookupSRVRecords0(java.lang.String name,
java.util.List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode) |
static void |
setup() |
lookupHostAddress, lookupSRVRecords, shouldContinue
public MiniDnsResolver()
public static DNSResolver getInstance()
protected java.util.List<SRVRecord> lookupSRVRecords0(java.lang.String name, java.util.List<HostAddress> failedAddresses, ConnectionConfiguration.DnssecMode dnssecMode)
lookupSRVRecords0
in class DNSResolver
protected java.util.List<java.net.InetAddress> lookupHostAddress0(java.lang.String name, java.util.List<HostAddress> failedAddresses, ConnectionConfiguration.DnssecMode dnssecMode)
DNSResolver
null
if there was an error, in which the error
reason will be added in form of a HostAddress
to failedAddresses
. Returns a empty list
in case the DNS name exists but has no associated A or AAAA resource records. Otherwise, if the resolution was
successful and there is at least one A or AAAA resource record, then a non-empty list will be returned.
Concrete DNS resolver implementations are free to overwrite this, but have to stick to the interface contract.
lookupHostAddress0
in class DNSResolver
name
- the DNS name to lookupfailedAddresses
- a list with the failed addressesdnssecMode
- the selected DNSSEC modenull
public static void setup()
public java.util.List<java.lang.Exception> initialize()
initialize
in interface SmackInitializer