public class DNSResolverDefault extends Object implements DNSResolverIfc
| Modifier and Type | Field and Description |
|---|---|
static Map<String,DNSEntry> |
ip_cache |
static Map<String,DNSEntry[]> |
srv_cache |
rand, TIGASE_PRIMARY_ADDRESS, TIGASE_SECONDARY_ADDRESS| Modifier | Constructor and Description |
|---|---|
protected |
DNSResolverDefault() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDefaultHost()
Method provides default host information for the installation.
|
String[] |
getDefaultHosts()
Method provides an array of all local host informations, by default it
contains defaultHost.
|
String[] |
getHostIPs(String hostname)
Resolve all IP addresses for the given
hostname |
DNSEntry[] |
getHostSRV_Entries(String hostname,
String service,
int defPort)
Retrieves list of DNS entries for given
hostname. |
String |
getSecondaryHost()
Method provides alternative host information for the current instance.
|
static void |
main(String[] args)
main method outputting various information about hostnames |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHostIP, getHostSRV_Entries, getHostSRV_Entry, getHostSRV_Entry, getHostSRV_IPpublic static void main(String[] args) throws Exception
main method outputting various information about hostnamesargs - a String[] containing domains to query, if none
provided default one will be usedExceptionpublic String[] getDefaultHosts()
DNSResolverIfcgetDefaultHosts in interface DNSResolverIfcpublic String getDefaultHost()
DNSResolverIfcgetDefaultHost in interface DNSResolverIfcpublic String getSecondaryHost()
DNSResolverIfcgetSecondaryHost in interface DNSResolverIfcpublic String[] getHostIPs(String hostname) throws UnknownHostException
hostnamegetHostIPs in interface DNSResolverIfchostname - the domain name for which this record is validIP addresses on which target host provide
service.UnknownHostExceptionpublic DNSEntry[] getHostSRV_Entries(String hostname, String service, int defPort) throws UnknownHostException
DNSResolverIfchostname. Allow specifying
particular type of SRV record.getHostSRV_Entries in interface DNSResolverIfchostname - the domain name for which this record is validservice - type of SRV records, for example _xmpp-server._tcpdefPort - default port number in case DNS records is missing one.UnknownHostExceptionCopyright © 2022 "Tigase, Inc.". All rights reserved.