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)
NameResolver
resolve
在接口中 NameResolver<T>
inetHost
- the name to resolvepublic Future<T> resolve(java.lang.String inetHost, Promise<T> promise)
NameResolver
resolve
在接口中 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)
NameResolver
resolveAll
在接口中 NameResolver<T>
inetHost
- the name to resolvepublic Future<java.util.List<T>> resolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise)
NameResolver
resolveAll
在接口中 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.Exception
protected 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.Exception
public void close()
NameResolver
close
在接口中 NameResolver<T>
close
在接口中 java.io.Closeable
close
在接口中 java.lang.AutoCloseable