@UnstableApi public final class CompositeNameResolver<T> extends SimpleNameResolver<T>
SimpleNameResolver
,它根据NameResolver
的序列解析主机名。
如果发生故障,只会报告最后一个。
Constructor and Description |
---|
CompositeNameResolver(EventExecutor executor, NameResolver<T>... resolvers) |
Modifier and Type | Method and Description |
---|---|
protected void |
doResolve(java.lang.String inetHost, Promise<T> promise)
由
SimpleNameResolver.resolve(String) 调用以执行实际的名称解析。
|
protected void |
doResolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise)
由
SimpleNameResolver.resolveAll(String) 调用来执行实际的名称解析。
|
close, executor, resolve, resolve, resolveAll, resolveAll
public CompositeNameResolver(EventExecutor executor, NameResolver<T>... resolvers)
executor
-所述EventExecutor
这是用来通知的听众Future
通过返回SimpleNameResolver.resolve(String)
resolvers
- NameResolver
要顺序尝试
protected void doResolve(java.lang.String inetHost, Promise<T> promise) throws java.lang.Exception
SimpleNameResolver
SimpleNameResolver.resolve(String)
调用来执行实际的名称解析。
doResolve
在课堂上
SimpleNameResolver<T>
java.lang.Exception
protected void doResolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise) throws java.lang.Exception
SimpleNameResolver
SimpleNameResolver.resolveAll(String)
调用来执行实际的名称解析。
doResolveAll
在课堂上
SimpleNameResolver<T>
java.lang.Exception
Copyright © 2008–2018 The Netty Project. All rights reserved.