Package org.xbill.DNS

Class ResolverConfig

java.lang.Object
org.xbill.DNS.ResolverConfig

public final class ResolverConfig extends Object
Locates name servers and the search path to be appended to unqualified names.

The following are attempted, in order, until one succeeds.

These routines will be called internally when creating Resolvers/Lookups without explicitly specifying server names, and can also be called directly if desired.
  • Field Details

  • Constructor Details

    • ResolverConfig

      public ResolverConfig()
  • Method Details

    • getCurrentConfig

      public static ResolverConfig getCurrentConfig()
      Gets the current configuration
    • getConfigProviders

      public static List<ResolverConfigProvider> getConfigProviders()
      Gets the ordered list of resolver config providers.
      Since:
      3.2
    • setConfigProviders

      public static void setConfigProviders(List<ResolverConfigProvider> providers)
      Set a new ordered list of resolver config providers.
    • refresh

      public static void refresh()
      Gets the current configuration
    • servers

      public List<InetSocketAddress> servers()
      Returns all located servers
    • server

      public InetSocketAddress server()
      Returns the first located server
    • searchPath

      public List<Name> searchPath()
      Returns all entries in the located search path
    • ndots

      public int ndots()
      Gets the threshold for the number of dots which must appear in a name before it is considered absolute. The default is 1, meaning meaning that if there are any dots in a name, the name will be tried first as an absolute name.

      Note that ndots can only be configured in a resolv.conf file or the property PropertyResolverConfigProvider.DNS_NDOTS_PROP.