public abstract class AbstractHostNameRemapper extends Object implements AdvancedHostResolver
resolveRemapped(String)
instead of HostResolver.resolve(String), which takes the remapped host as the input parameter.| Constructor and Description |
|---|
AbstractHostNameRemapper() |
| Modifier and Type | Method and Description |
|---|---|
String |
applyRemapping(String originalHost)
Applies this class's host name remappings to the specified original host, returning the remapped host name (if any), or the originalHost
if there is no remapped host name.
|
void |
clearHostRemappings()
Removes all hostname remappings.
|
Map<String,String> |
getHostRemappings()
Returns all host remappings in effect.
|
Collection<String> |
getOriginalHostnames(String remappedHost)
Returns the original address or addresses that are remapped to the specified remappedHost.
|
void |
remapHost(String originalHost,
String remappedHost)
Remaps an individual host.
|
void |
remapHosts(Map<String,String> hostRemappings)
Replaces the host remappings in the existing list of remappings (if any) with the specified remappings.
|
void |
removeHostRemapping(String originalHost)
Removes the specified host remapping.
|
Collection<InetAddress> |
resolve(String originalHost)
Retrieves the remapped hostname and resolves it using
resolveRemapped(String). |
abstract Collection<InetAddress> |
resolveRemapped(String remappedHost)
Resolves the specified remapped host.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearDNSCache, setNegativeDNSCacheTimeout, setPositiveDNSCacheTimeoutpublic void remapHosts(Map<String,String> hostRemappings)
AdvancedHostResolverremapHosts in interface AdvancedHostResolverhostRemappings - Map of <original hostname, remapped hostname>public void remapHost(String originalHost, String remappedHost)
AdvancedHostResolverremapHost in interface AdvancedHostResolveroriginalHost - Original host to remap. Must exactly match the requested hostname (not a domain or regular expression match).remappedHost - hostname that will replace originalHostpublic void removeHostRemapping(String originalHost)
AdvancedHostResolverremoveHostRemapping in interface AdvancedHostResolveroriginalHost - currently-remapped hostnamepublic void clearHostRemappings()
AdvancedHostResolverclearHostRemappings in interface AdvancedHostResolverpublic Map<String,String> getHostRemappings()
AdvancedHostResolvergetHostRemappings in interface AdvancedHostResolver<original hostname, remapped hostname>public Collection<String> getOriginalHostnames(String remappedHost)
AdvancedHostResolvergetOriginalHostnames in interface AdvancedHostResolverremappedHost - remapped hostnamepublic String applyRemapping(String originalHost)
originalHost - original host name to resolvepublic abstract Collection<InetAddress> resolveRemapped(String remappedHost)
HostResolver.resolve(String).remappedHost - remapped hostname to resolvepublic Collection<InetAddress> resolve(String originalHost)
resolveRemapped(String).resolve in interface HostResolveroriginalHost - original hostname to resolveCopyright © 2016. All rights reserved.