public final class DnsResolver
extends java.lang.Object
A minimalistic DNS resolver, which can resolve SRV and TXT records in the context of XMPP.
Modifier and Type | Method and Description |
---|---|
static java.util.List<SrvRecord> |
resolveSRV(java.lang.CharSequence service,
java.lang.CharSequence domain,
long timeout)
Deprecated.
|
static java.util.List<SrvRecord> |
resolveSRV(java.lang.CharSequence service,
java.lang.CharSequence domain,
java.lang.String nameServer,
long timeout)
Resolves DNS SRV records for the given domain.
|
static java.util.List<TxtRecord> |
resolveTXT(java.lang.CharSequence domain,
long timeout)
Deprecated.
|
static java.util.List<TxtRecord> |
resolveTXT(java.lang.CharSequence domain,
java.lang.String nameServer,
long timeout)
Resolves DNS TXT records for the given domain.
|
public static java.util.List<SrvRecord> resolveSRV(java.lang.CharSequence service, java.lang.CharSequence domain, java.lang.String nameServer, long timeout) throws java.io.IOException
Resolves DNS SRV records for the given domain.
The service is “xmpp-client”, the protocol is “tcp”, resulting in a query of _xmpp-client._tcp.domain
.
service
- The service, usually “xmpp-client” or “xmpps-client”.domain
- The domain.nameServer
- The name server.timeout
- The timeout.java.io.IOException
- If a timeout occurs or no connection to the DNS server can be established.@Deprecated public static java.util.List<SrvRecord> resolveSRV(java.lang.CharSequence service, java.lang.CharSequence domain, long timeout) throws java.io.IOException
java.io.IOException
public static java.util.List<TxtRecord> resolveTXT(java.lang.CharSequence domain, java.lang.String nameServer, long timeout) throws java.io.IOException
Resolves DNS TXT records for the given domain.
domain
- The domain.nameServer
- The name server.timeout
- The timeout.java.io.IOException
- If a timeout occurs or no connection to the DNS server can be established.@Deprecated public static java.util.List<TxtRecord> resolveTXT(java.lang.CharSequence domain, long timeout) throws java.io.IOException
java.io.IOException
Copyright © 2014–2019 XMPP.rocks. All rights reserved.