mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-10-31 17:25:58 +01:00
Bump MiniDNS to 0.2
This commit is contained in:
parent
5027e9001f
commit
5c2d18deb4
2 changed files with 5 additions and 10 deletions
|
@ -5,6 +5,6 @@ javax.naming API (e.g. Android)."""
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(path: ':smack-core')
|
compile project(path: ':smack-core')
|
||||||
compile 'de.measite.minidns:minidns-hla:0.2.0-beta1'
|
compile 'de.measite.minidns:minidns-hla:[0.2,0.3)'
|
||||||
compile "org.jxmpp:jxmpp-util-cache:$jxmppVersion"
|
compile "org.jxmpp:jxmpp-util-cache:$jxmppVersion"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2014-2016 Florian Schmaus
|
* Copyright 2014-2017 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -30,18 +30,15 @@ import org.jivesoftware.smack.util.dns.DNSResolver;
|
||||||
import org.jivesoftware.smack.util.dns.HostAddress;
|
import org.jivesoftware.smack.util.dns.HostAddress;
|
||||||
import org.jivesoftware.smack.util.dns.SRVRecord;
|
import org.jivesoftware.smack.util.dns.SRVRecord;
|
||||||
|
|
||||||
import de.measite.minidns.DNSCache;
|
|
||||||
import de.measite.minidns.DNSMessage.RESPONSE_CODE;
|
import de.measite.minidns.DNSMessage.RESPONSE_CODE;
|
||||||
import de.measite.minidns.Question;
|
import de.measite.minidns.Question;
|
||||||
import de.measite.minidns.cache.LRUCache;
|
import de.measite.minidns.hla.DnssecResolverApi;
|
||||||
import de.measite.minidns.dnssec.DNSSECClient;
|
|
||||||
import de.measite.minidns.hla.ResolutionUnsuccessfulException;
|
import de.measite.minidns.hla.ResolutionUnsuccessfulException;
|
||||||
import de.measite.minidns.hla.ResolverApi;
|
import de.measite.minidns.hla.ResolverApi;
|
||||||
import de.measite.minidns.hla.ResolverResult;
|
import de.measite.minidns.hla.ResolverResult;
|
||||||
import de.measite.minidns.record.A;
|
import de.measite.minidns.record.A;
|
||||||
import de.measite.minidns.record.AAAA;
|
import de.measite.minidns.record.AAAA;
|
||||||
import de.measite.minidns.record.SRV;
|
import de.measite.minidns.record.SRV;
|
||||||
import de.measite.minidns.recursive.ReliableDNSClient;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,11 +49,9 @@ public class MiniDnsResolver extends DNSResolver implements SmackInitializer {
|
||||||
|
|
||||||
private static final MiniDnsResolver INSTANCE = new MiniDnsResolver();
|
private static final MiniDnsResolver INSTANCE = new MiniDnsResolver();
|
||||||
|
|
||||||
private static final DNSCache CACHE = new LRUCache(128);
|
private static final ResolverApi DNSSEC_RESOLVER = DnssecResolverApi.INSTANCE;
|
||||||
|
|
||||||
private static final ResolverApi DNSSEC_RESOLVER = new ResolverApi(new DNSSECClient(CACHE));
|
private static final ResolverApi NON_DNSSEC_RESOLVER = ResolverApi.INSTANCE;
|
||||||
|
|
||||||
private static final ResolverApi NON_DNSSEC_RESOLVER = new ResolverApi(new ReliableDNSClient(CACHE));
|
|
||||||
|
|
||||||
public static DNSResolver getInstance() {
|
public static DNSResolver getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
|
|
Loading…
Reference in a new issue