Modifier and Type | Field and Description |
---|---|
static String |
XMPP_CLIENT_DNS_SRV_PREFIX |
static String |
XMPP_SERVER_DNS_SRV_PREFIX |
Constructor and Description |
---|
DNSUtil() |
Modifier and Type | Method and Description |
---|---|
static SmackDaneProvider |
getDaneProvider()
Returns the currently active DANE provider used when DANE is enabled.
|
static DNSResolver |
getDNSResolver()
Returns the current DNS resolved used to perform DNS lookups.
|
static List<HostAddress> |
resolveXMPPServerDomain(DnsName domain,
List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode)
Returns a list of HostAddresses under which the specified XMPP server can be reached at for server-to-server
communication.
|
static List<HostAddress> |
resolveXMPPServiceDomain(DnsName domain,
List<HostAddress> failedAddresses,
ConnectionConfiguration.DnssecMode dnssecMode)
Returns a list of HostAddresses under which the specified XMPP server can be reached at for client-to-server
communication.
|
static void |
setDaneProvider(SmackDaneProvider daneProvider)
Set the DANE provider that should be used when DANE is enabled.
|
static void |
setDNSResolver(DNSResolver resolver)
Set the DNS resolver that should be used to perform DNS lookups.
|
public static final String XMPP_CLIENT_DNS_SRV_PREFIX
public static final String XMPP_SERVER_DNS_SRV_PREFIX
public DNSUtil()
public static void setDNSResolver(DNSResolver resolver)
resolver
- public static DNSResolver getDNSResolver()
public static void setDaneProvider(SmackDaneProvider daneProvider)
daneProvider
- public static SmackDaneProvider getDaneProvider()
public static List<HostAddress> resolveXMPPServiceDomain(DnsName domain, List<HostAddress> failedAddresses, ConnectionConfiguration.DnssecMode dnssecMode)
As an example, a lookup for "example.com" may return "im.example.com:5269".
domain
- the domain.failedAddresses
- on optional list that will be populated with host addresses that failed to resolve.dnssecMode
- DNSSec mode.public static List<HostAddress> resolveXMPPServerDomain(DnsName domain, List<HostAddress> failedAddresses, ConnectionConfiguration.DnssecMode dnssecMode)
As an example, a lookup for "example.com" may return "im.example.com:5269".
domain
- the domain.failedAddresses
- on optional list that will be populated with host addresses that failed to resolve.dnssecMode
- DNSSec mode.