public class MiniDnsResolver extends DNSResolver implements SmackInitializer
LOGGER
Constructor and Description |
---|
MiniDnsResolver() |
Modifier and Type | Method and Description |
---|---|
static DNSResolver |
getInstance() |
List<Exception> |
initialize() |
protected List<InetAddress> |
lookupHostAddress0(DnsName name,
List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode)
Lookup the IP addresses of a given host name.
|
protected List<SRVRecord> |
lookupSRVRecords0(DnsName name,
List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode) |
static void |
setup() |
lookupHostAddress, lookupSRVRecords, shouldContinue
public MiniDnsResolver()
public static DNSResolver getInstance()
protected List<SRVRecord> lookupSRVRecords0(DnsName name, List<HostAddress> failedAddresses, ConnectionConfiguration.DnssecMode dnssecMode)
lookupSRVRecords0
in class DNSResolver
protected List<InetAddress> lookupHostAddress0(DnsName name, 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 List<Exception> initialize()
initialize
in interface SmackInitializer