tigase.util

## Class DNSResolver

- java.lang.Object
- - tigase.util.DNSResolver

- Deprecated.
  `tigase.util.DNSResolverFactory.getInstance()` should be used instead

      @Deprecated
      public class DNSResolver
      extends Object

  DNSResolver class for handling DNS names
  Since:
    Mon Sep 11 09:59:02 2006
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Map<String,DNSEntry>` | `ip_cache` Deprecated. Field description
    `static Map<String,DNSEntry[]>` | `srv_cache` Deprecated. Field description

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DNSResolver()` Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getDefaultHostname()` Deprecated. Method description
    `static String[]` | `getDefHostNames()` Deprecated. Method description
    `static String` | `getHostIP(String hostname)` Deprecated. Resolve IP address for the given `hostname`
    `static String[]` | `getHostIPs(String hostname)` Deprecated. Resolve all IP addresses for the given `hostname`
    `static DNSEntry[]` | `getHostSRV_Entries(String hostname)` Deprecated. Retrieves list of SRV DNS entries for given `hostname`.
    `static DNSEntry[]` | `getHostSRV_Entries(String hostname, String service, int defPort)` Deprecated. Retrieves list of DNS entries for given `hostname`.
    `static DNSEntry` | `getHostSRV_Entry(String hostname)` Deprecated. Retrieves service DNS entry with highest priority for given `hostname`.
    `static DNSEntry` | `getHostSRV_Entry(String hostname, String service, int defPort)` Deprecated. Retrieves list of DNS entries for given `hostname`.
    `static String` | `getHostSRV_IP(String hostname)` Deprecated. Returns `IP address` of the machine providing the service.
    `static void` | `main(String[] args)` Deprecated. `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

    - #### srv_cache

          public static Map<String,DNSEntry[]> srv_cache

      Deprecated.
      Field description

    - #### ip_cache

          public static Map<String,DNSEntry> ip_cache

      Deprecated.
      Field description

  - ### Constructor Detail

    - #### DNSResolver

          public DNSResolver()

      Deprecated.

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws Exception

      Deprecated.
      `main` method outputting various information about hostnames
      Parameters:
        `args` - a `String[]` containing domains to query, if none provided default one will be used
      Throws:
        `Exception`

    - #### getDefaultHostname

          public static String getDefaultHostname()

      Deprecated.
      Method description
      Returns:

    - #### getDefHostNames

          public static String[] getDefHostNames()

      Deprecated.
      Method description
      Returns:

    - #### getHostIP

          public static String getHostIP(String hostname)
                                  throws UnknownHostException

      Deprecated.
      Resolve IP address for the given `hostname`
      Parameters:
        `hostname` - the domain name for which this record is valid
      Returns:
        `IP address` of the machine providing the service.
      Throws:
        `UnknownHostException`

    - #### getHostIPs

          public static String[] getHostIPs(String hostname)
                                     throws UnknownHostException

      Deprecated.
      Resolve all IP addresses for the given `hostname`
      Parameters:
        `hostname` - the domain name for which this record is valid
      Returns:
        Array of all `IP addresses` on 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 given `hostname`. Performs lookup for `_xmpp-server._tcp` SRV 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 given `hostname`. Allow specifying particular type of SRV record.
      Parameters:
        `hostname` - the domain name for which this record is valid
        `service` - type of SRV records, for example `_xmpp-server._tcp`
        `defPort` - 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 given `hostname`. Performs lookup for `_xmpp-server._tcp` SRV 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 given `hostname`. Allow specifying particular type of SRV record.
      Parameters:
        `hostname` - name to resolve
        `service` - type of SRV records, for example `_xmpp-server._tcp`
        `defPort` - 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.
      Returns `IP address` of the machine providing the service.
      Parameters:
        `hostname` - the domain name for which this record is valid
      Returns:
      Throws:
        `UnknownHostException`

Copyright © 2018 "Tigase, Inc.". All rights reserved.