public final class ResolverConfig extends Object
The following are attempted, in order, until one succeeds.
PropertyResolverConfigProvider
ResolvConfResolverConfigProvider
WindowsResolverConfigProvider
AndroidResolverConfigProvider
JndiContextResolverConfigProvider
SunJvmResolverConfigProvider
localhost
is used as the nameserver, and the search path is empty.
Modifier and Type | Field and Description |
---|---|
static String |
CONFIGPROVIDER_SKIP_INIT |
Constructor and Description |
---|
ResolverConfig() |
Modifier and Type | Method and Description |
---|---|
static List<ResolverConfigProvider> |
getConfigProviders()
Gets the ordered list of resolver config providers.
|
static ResolverConfig |
getCurrentConfig()
Gets the current configuration
|
int |
ndots()
Gets the threshold for the number of dots which must appear in a name before it is considered
absolute.
|
static void |
refresh()
Gets the current configuration
|
List<Name> |
searchPath()
Returns all entries in the located search path
|
InetSocketAddress |
server()
Returns the first located server
|
List<InetSocketAddress> |
servers()
Returns all located servers
|
static void |
setConfigProviders(List<ResolverConfigProvider> providers)
Set a new ordered list of resolver config providers.
|
public static final String CONFIGPROVIDER_SKIP_INIT
public static ResolverConfig getCurrentConfig()
public static List<ResolverConfigProvider> getConfigProviders()
public static void setConfigProviders(List<ResolverConfigProvider> providers)
public static void refresh()
public List<InetSocketAddress> servers()
public InetSocketAddress server()
public int ndots()
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
.
Copyright © 2022 dnsjava.org. All rights reserved.