Package com.browserup.bup.proxy.dns
Class DnsJavaResolver
- java.lang.Object
-
- com.browserup.bup.proxy.dns.AbstractHostNameRemapper
-
- com.browserup.bup.proxy.dns.DnsJavaResolver
-
- All Implemented Interfaces:
AdvancedHostResolver,HostResolver
@Deprecated public class DnsJavaResolver extends AbstractHostNameRemapper implements AdvancedHostResolver
Deprecated.The dnsjava resolver has been deprecated in favor of the standard JVM resolver and will be removed in BUP >2.1.AnAdvancedHostResolverthat uses dnsjava to perform DNS lookups. This implementation provides full cache manipulation capabilities.
-
-
Constructor Summary
Constructors Constructor Description DnsJavaResolver()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclearDNSCache()Deprecated.Clears both the positive (successful DNS lookups) and negative (failed DNS lookups) cache.protected java.util.Collection<java.net.InetAddress>resolveHostByType(java.lang.String host, int type)Deprecated.Resolves the specified host using dnsjava, retrieving addresses of the specified type.java.util.Collection<java.net.InetAddress>resolveRemapped(java.lang.String remappedHost)Deprecated.Resolves the specified remapped host.voidsetNegativeDNSCacheTimeout(int timeout, java.util.concurrent.TimeUnit timeUnit)Deprecated.Sets the negative (failed DNS lookup) timeout when making DNS lookups.voidsetPositiveDNSCacheTimeout(int timeout, java.util.concurrent.TimeUnit timeUnit)Deprecated.Sets the positive (successful DNS lookup) timeout when making DNS lookups.-
Methods inherited from class com.browserup.bup.proxy.dns.AbstractHostNameRemapper
applyRemapping, clearHostRemappings, getHostRemappings, getOriginalHostnames, remapHost, remapHosts, removeHostRemapping, resolve
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.browserup.bup.proxy.dns.AdvancedHostResolver
clearHostRemappings, getHostRemappings, getOriginalHostnames, remapHost, remapHosts, removeHostRemapping
-
Methods inherited from interface com.browserup.bup.proxy.dns.HostResolver
resolve
-
-
-
-
Method Detail
-
clearDNSCache
public void clearDNSCache()
Deprecated.Description copied from interface:AdvancedHostResolverClears both the positive (successful DNS lookups) and negative (failed DNS lookups) cache.- Specified by:
clearDNSCachein interfaceAdvancedHostResolver
-
setPositiveDNSCacheTimeout
public void setPositiveDNSCacheTimeout(int timeout, java.util.concurrent.TimeUnit timeUnit)Deprecated.Description copied from interface:AdvancedHostResolverSets the positive (successful DNS lookup) timeout when making DNS lookups. Note: The timeUnit parameter does not guarantee the specified precision; implementations may need to reduce precision, depending on the underlying DNS implementation. For example, the Oracle JVM's DNS cache only supports timeouts in whole seconds, so specifying a timeout of 1200ms will result in a timeout of 1 second.- Specified by:
setPositiveDNSCacheTimeoutin interfaceAdvancedHostResolver- Parameters:
timeout- maximum lookup timetimeUnit- units of the timeout value
-
setNegativeDNSCacheTimeout
public void setNegativeDNSCacheTimeout(int timeout, java.util.concurrent.TimeUnit timeUnit)Deprecated.Description copied from interface:AdvancedHostResolverSets the negative (failed DNS lookup) timeout when making DNS lookups. Note: The timeUnit parameter does not guarantee the specified precision; implementations may need to reduce precision, depending on the underlying DNS implementation. For example, the Oracle JVM's DNS cache only supports timeouts in whole seconds, so specifying a timeout of 1200ms will result in a timeout of 1 second.- Specified by:
setNegativeDNSCacheTimeoutin interfaceAdvancedHostResolver- Parameters:
timeout- maximum lookup timetimeUnit- units of the timeout value
-
resolveRemapped
public java.util.Collection<java.net.InetAddress> resolveRemapped(java.lang.String remappedHost)
Deprecated.Description copied from class:AbstractHostNameRemapperResolves the specified remapped host. Subclasses should provide resolution by implementing this method, rather than overridingHostResolver.resolve(String).- Specified by:
resolveRemappedin classAbstractHostNameRemapper- Parameters:
remappedHost- remapped hostname to resolve- Returns:
- resolved InetAddresses, or an empty list if no addresses were found
-
resolveHostByType
protected java.util.Collection<java.net.InetAddress> resolveHostByType(java.lang.String host, int type)Deprecated.Resolves the specified host using dnsjava, retrieving addresses of the specified type.- Parameters:
host- hostname to resolvetype- one ofType, typicallyType.A(IPv4) orType.AAAA(IPv6).- Returns:
- resolved addresses, or an empty collection if no addresses could be resolved
-
-