Constructor and Description |
---|
DNSUtil() |
Modifier and Type | Method and Description |
---|---|
static DNSResolver |
getDNSResolver()
Returns the current DNS resolved used to perform DNS lookups.
|
static void |
init()
Initializes DNSUtil.
|
static List<HostAddress> |
resolveXMPPDomain(String domain)
Returns a list of HostAddresses under which the specified XMPP server can be
reached at for client-to-server communication.
|
static List<HostAddress> |
resolveXMPPServerDomain(String domain)
Returns a list of HostAddresses under which the specified XMPP server can be
reached at for server-to-server communication.
|
static void |
setDNSResolver(DNSResolver resolver)
Set the DNS resolver that should be used to perform DNS lookups.
|
public DNSUtil()
public static void init()
public static void setDNSResolver(DNSResolver resolver)
resolver
- public static DNSResolver getDNSResolver()
public static List<HostAddress> resolveXMPPDomain(String domain) throws Exception
As an example, a lookup for "example.com" may return "im.example.com:5269".
domain
- the domain.Exception
public static List<HostAddress> resolveXMPPServerDomain(String domain) throws Exception
As an example, a lookup for "example.com" may return "im.example.com:5269".
domain
- the domain.Exception