Package tigase.util.dns
Class DNSResolver
- java.lang.Object
-
- tigase.util.dns.DNSResolver
-
@Deprecated public class DNSResolver extends Object
Deprecated.tigase.util.DNSResolverFactory.getInstance()should be used insteadDNSResolver class for handling DNS names- Since:
- Mon Sep 11 09:59:02 2006
- Author:
- Artur Hefczyc
-
-
Constructor Summary
Constructors Constructor Description DNSResolver()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringgetDefaultHostname()Deprecated.Method returns default host name associated with this host.static String[]getDefHostNames()Deprecated.Method returns names associated with this host.static StringgetHostIP(String hostname)Deprecated.Resolve IP address for the givenhostnamestatic String[]getHostIPs(String hostname)Deprecated.Resolve all IP addresses for the givenhostnamestatic DNSEntry[]getHostSRV_Entries(String hostname)Deprecated.Retrieves list of SRV DNS entries for givenhostname.static DNSEntry[]getHostSRV_Entries(String hostname, String service, int defPort)Deprecated.Retrieves list of DNS entries for givenhostname.static DNSEntrygetHostSRV_Entry(String hostname)Deprecated.Retrieves service DNS entry with highest priority for givenhostname.static DNSEntrygetHostSRV_Entry(String hostname, String service, int defPort)Deprecated.Retrieves list of DNS entries for givenhostname.static StringgetHostSRV_IP(String hostname)Deprecated.ReturnsIP addressof the machine providing the service.static voidmain(String[] args)Deprecated.mainmethod outputting various information about hostnames
-
-
-
Method Detail
-
getDefHostNames
public static String[] getDefHostNames()
Deprecated.Method returns names associated with this host.- Returns:
- array of strings
-
getDefaultHostname
public static String getDefaultHostname()
Deprecated.Method returns default host name associated with this host.- Returns:
- string
-
getHostIP
public static String getHostIP(String hostname) throws UnknownHostException
Deprecated.Resolve IP address for the givenhostname- Parameters:
hostname- the domain name for which this record is valid- Returns:
IP addressof the machine providing the service.- Throws:
UnknownHostException
-
getHostIPs
public static String[] getHostIPs(String hostname) throws UnknownHostException
Deprecated.Resolve all IP addresses for the givenhostname- Parameters:
hostname- the domain name for which this record is valid- Returns:
- Array of all
IP addresseson which target host provide service. - Throws:
UnknownHostException
-
getHostSRV_Entries
public static DNSEntry[] getHostSRV_Entries(String hostname) throws UnknownHostException
Deprecated.Retrieves list of SRV DNS entries for givenhostname. Performs lookup for_xmpp-server._tcpSRV records.- Parameters:
hostname- the domain name for which this record is valid- Returns:
- Array of the DNSEntry objects containing SRV DNS records
- Throws:
UnknownHostException
-
getHostSRV_Entries
public static DNSEntry[] getHostSRV_Entries(String hostname, String service, int defPort) throws UnknownHostException
Deprecated.Retrieves list of DNS entries for givenhostname. Allow specifying particular type of SRV record.- Parameters:
hostname- 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.- Returns:
- Array of the DNSEntry records
- Throws:
UnknownHostException
-
getHostSRV_Entry
public static DNSEntry getHostSRV_Entry(String hostname) throws UnknownHostException
Deprecated.Retrieves service DNS entry with highest priority for givenhostname. Performs lookup for_xmpp-server._tcpSRV records.- Parameters:
hostname- name to resolve- Returns:
- DNSEntry object containing DNS record with highest priority for given
hostname - Throws:
UnknownHostException
-
getHostSRV_Entry
public static DNSEntry getHostSRV_Entry(String hostname, String service, int defPort) throws UnknownHostException
Deprecated.Retrieves list of DNS entries for givenhostname. Allow specifying particular type of SRV record.- Parameters:
hostname- name to resolveservice- type of SRV records, for example_xmpp-server._tcpdefPort- default port number in case DNS records is missing one.- Returns:
- DNSEntry object containing DNS record with highest priority for given
hostname - Throws:
UnknownHostException
-
getHostSRV_IP
public static String getHostSRV_IP(String hostname) throws UnknownHostException
Deprecated.ReturnsIP addressof the machine providing the service.- Parameters:
hostname- the domain name for which this record is valid- Returns:
- Throws:
UnknownHostException
-
-