public abstract class SimpleNameResolver<T> extends Object implements NameResolver<T>
NameResolver implementation.| Modifier | Constructor and Description |
|---|---|
protected |
SimpleNameResolver(EventExecutor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes all the resources allocated and used by this resolver.
|
protected abstract void |
doResolve(String inetHost,
Promise<T> promise)
Invoked by
resolve(String) to perform the actual name resolution. |
protected abstract void |
doResolveAll(String inetHost,
Promise<List<T>> promise)
Invoked by
resolveAll(String) to perform the actual name resolution. |
protected EventExecutor |
executor()
Returns the
EventExecutor which is used to notify the listeners of the Future returned
by resolve(String). |
Future<T> |
resolve(String inetHost)
Resolves the specified name into an address.
|
Future<T> |
resolve(String inetHost,
Promise<T> promise)
Resolves the specified name into an address.
|
Future<List<T>> |
resolveAll(String inetHost)
Resolves the specified host name and port into a list of address.
|
Future<List<T>> |
resolveAll(String inetHost,
Promise<List<T>> promise)
Resolves the specified host name and port into a list of address.
|
protected SimpleNameResolver(EventExecutor executor)
executor - the EventExecutor which is used to notify the listeners of the Future returned
by resolve(String)protected EventExecutor executor()
EventExecutor which is used to notify the listeners of the Future returned
by resolve(String).public final Future<T> resolve(String inetHost)
NameResolverresolve in interface NameResolver<T>inetHost - the name to resolvepublic Future<T> resolve(String inetHost, Promise<T> promise)
NameResolverresolve in interface NameResolver<T>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedpublic final Future<List<T>> resolveAll(String inetHost)
NameResolverresolveAll in interface NameResolver<T>inetHost - the name to resolvepublic Future<List<T>> resolveAll(String inetHost, Promise<List<T>> promise)
NameResolverresolveAll in interface NameResolver<T>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedprotected abstract void doResolve(String inetHost, Promise<T> promise) throws Exception
resolve(String) to perform the actual name resolution.Exceptionprotected abstract void doResolveAll(String inetHost, Promise<List<T>> promise) throws Exception
resolveAll(String) to perform the actual name resolution.Exceptionpublic void close()
NameResolverclose in interface NameResolver<T>close in interface Closeableclose in interface AutoCloseableCopyright © 2008–2025 The Netty Project. All rights reserved.