public abstract class SimpleNameResolver<T> extends java.lang.Object implements NameResolver<T>
NameResolver implementation.| 限定符 | 构造器和说明 |
|---|---|
protected |
SimpleNameResolver(EventExecutor executor) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes all the resources allocated and used by this resolver.
|
protected abstract void |
doResolve(java.lang.String inetHost,
Promise<T> promise)
Invoked by
resolve(String) to perform the actual name resolution. |
protected abstract void |
doResolveAll(java.lang.String inetHost,
Promise<java.util.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(java.lang.String inetHost)
Resolves the specified name into an address.
|
Future<T> |
resolve(java.lang.String inetHost,
Promise<T> promise)
Resolves the specified name into an address.
|
Future<java.util.List<T>> |
resolveAll(java.lang.String inetHost)
Resolves the specified host name and port into a list of address.
|
Future<java.util.List<T>> |
resolveAll(java.lang.String inetHost,
Promise<java.util.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(java.lang.String inetHost)
NameResolverresolve 在接口中 NameResolver<T>inetHost - the name to resolvepublic Future<T> resolve(java.lang.String inetHost, Promise<T> promise)
NameResolverresolve 在接口中 NameResolver<T>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedpublic final Future<java.util.List<T>> resolveAll(java.lang.String inetHost)
NameResolverresolveAll 在接口中 NameResolver<T>inetHost - the name to resolvepublic Future<java.util.List<T>> resolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise)
NameResolverresolveAll 在接口中 NameResolver<T>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedprotected abstract void doResolve(java.lang.String inetHost,
Promise<T> promise)
throws java.lang.Exception
resolve(String) to perform the actual name resolution.java.lang.Exceptionprotected abstract void doResolveAll(java.lang.String inetHost,
Promise<java.util.List<T>> promise)
throws java.lang.Exception
resolveAll(String) to perform the actual name resolution.java.lang.Exceptionpublic void close()
NameResolverclose 在接口中 NameResolver<T>close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseable