|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.util.DNSResolver
public class DNSResolver
DNSResolver class for handling DNS names
| Field Summary | |
|---|---|
static Map<String,DNSEntry> |
ip_cache
Field description |
static Map<String,DNSEntry[]> |
srv_cache
Field description |
| Constructor Summary | |
|---|---|
DNSResolver()
|
|
| Method Summary | |
|---|---|
static String |
getDefaultHostname()
Method description |
static String[] |
getDefHostNames()
Method description |
static String |
getHostIP(String hostname)
Resolve IP address for the given hostname |
static String[] |
getHostIPs(String hostname)
Resolve all IP addresses for the given hostname |
static DNSEntry[] |
getHostSRV_Entries(String hostname)
Retrieves list of SRV DNS entries for given hostname. |
static DNSEntry[] |
getHostSRV_Entries(String hostname,
String service,
int defPort)
Retrieves list of DNS entries for given hostname. |
static DNSEntry |
getHostSRV_Entry(String hostname)
Retrieves service DNS entry with highest priority for given hostname. |
static DNSEntry |
getHostSRV_Entry(String hostname,
String service,
int defPort)
Retrieves list of DNS entries for given hostname. |
static String |
getHostSRV_IP(String hostname)
Returns IP address of the machine providing the service. |
static void |
main(String[] args)
main method outputting various information about hostnames |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static Map<String,DNSEntry[]> srv_cache
public static Map<String,DNSEntry> ip_cache
| Constructor Detail |
|---|
public DNSResolver()
| Method Detail |
|---|
public static String[] getDefHostNames()
public static String getDefaultHostname()
public static String getHostIP(String hostname)
throws UnknownHostException
hostname
hostname - the domain name for which this record is valid
IP address of the machine providing the service.
UnknownHostException
public static String[] getHostIPs(String hostname)
throws UnknownHostException
hostname
hostname - the domain name for which this record is valid
IP addresses on which target host provide service.
UnknownHostException
public static DNSEntry[] getHostSRV_Entries(String hostname)
throws UnknownHostException
hostname. Performs lookup
for _xmpp-server._tcp SRV records.
hostname - the domain name for which this record is valid
UnknownHostException
public static DNSEntry[] getHostSRV_Entries(String hostname,
String service,
int defPort)
throws UnknownHostException
hostname. Allow specifying
particular type of SRV record.
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.
UnknownHostException
public static DNSEntry getHostSRV_Entry(String hostname)
throws UnknownHostException
hostname.
Performs lookup for _xmpp-server._tcp SRV records.
hostname - name to resolve
hostname
UnknownHostException
public static DNSEntry getHostSRV_Entry(String hostname,
String service,
int defPort)
throws UnknownHostException
hostname. Allow specifying
particular type of SRV record.
hostname - name to resolveservice - type of SRV records, for example _xmpp-server._tcpdefPort - default port number in case DNS records is missing one.
hostname
UnknownHostException
public static String getHostSRV_IP(String hostname)
throws UnknownHostException
IP address of the machine providing the service.
hostname - the domain name for which this record is valid
UnknownHostException
public static void main(String[] args)
throws Exception
main method outputting various information about hostnames
args - a String[] containing domains to query, if none provided
default one will be used
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||