public class DefaultNameResolver extends Object implements NameResolver
InetAddress
.Modifier and Type | Field and Description |
---|---|
static DefaultNameResolver |
INSTANCE
Singleton instance which can be used to avoid allocation.
|
Constructor and Description |
---|
DefaultNameResolver() |
Modifier and Type | Method and Description |
---|---|
InetAddress |
resolve(String name,
String uriParamName,
boolean isReResolution)
Resolve a name and return the most up to date
InetAddress that represents the name. |
void |
resolveHook(String resolverName,
String hostname,
InetAddress resolvedAddress)
Name resolution hook, useful for logging.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doWork, init, lookup
public static final DefaultNameResolver INSTANCE
public InetAddress resolve(String name, String uriParamName, boolean isReResolution)
InetAddress
that represents the name.resolve
in interface NameResolver
name
- to resolve.uriParamName
- that the resolution is for.isReResolution
- true if this is a re-resolution or false if initial resolution.CommonContext.ENDPOINT_PARAM_NAME
,
CommonContext.MDC_CONTROL_PARAM_NAME
public void resolveHook(String resolverName, String hostname, InetAddress resolvedAddress)
resolverName
- used to handle the resolution.hostname
- that was resolved.resolvedAddress
- the resulting address or null if it can't be resolved.Copyright © 2014-2022 Real Logic Limited. All Rights Reserved.