Class MiniDnsResolver
- java.lang.Object
-
- org.jivesoftware.smack.util.dns.DNSResolver
-
- org.jivesoftware.smack.util.dns.minidns.MiniDnsResolver
-
- All Implemented Interfaces:
SmackInitializer
public class MiniDnsResolver extends DNSResolver implements SmackInitializer
This implementation uses the MiniDNS implementation for resolving DNS addresses.
-
-
Field Summary
-
Fields inherited from class org.jivesoftware.smack.util.dns.DNSResolver
LOGGER
-
-
Constructor Summary
Constructors Constructor Description MiniDnsResolver()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DNSResolver
getInstance()
List<Exception>
initialize()
protected List<InetAddress>
lookupHostAddress0(DnsName name, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode)
Lookup the IP addresses of a given host name.protected Set<SRV>
lookupSrvRecords0(DnsName name, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode)
static void
setup()
-
Methods inherited from class org.jivesoftware.smack.util.dns.DNSResolver
lookupHostAddress, lookupSrvRecords, shouldContinue
-
-
-
-
Constructor Detail
-
MiniDnsResolver
public MiniDnsResolver()
-
-
Method Detail
-
getInstance
public static DNSResolver getInstance()
-
lookupSrvRecords0
protected Set<SRV> lookupSrvRecords0(DnsName name, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode)
- Specified by:
lookupSrvRecords0
in classDNSResolver
-
lookupHostAddress0
protected List<InetAddress> lookupHostAddress0(DnsName name, List<RemoteConnectionEndpointLookupFailure> lookupFailures, ConnectionConfiguration.DnssecMode dnssecMode)
Description copied from class:DNSResolver
Lookup the IP addresses of a given host name. Returnsnull
if there was an error, in which the error reason will be added in form of aHostAddress
tofailedAddresses
. 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.
- Overrides:
lookupHostAddress0
in classDNSResolver
- Parameters:
name
- the DNS name to lookuplookupFailures
- list of exceptions that occurred during lookup.dnssecMode
- the selected DNSSEC mode- Returns:
- A list, either empty or non-empty, or
null
-
setup
public static void setup()
-
initialize
public List<Exception> initialize()
- Specified by:
initialize
in interfaceSmackInitializer
-
-