@UnstableApi
public abstract class AddressResolverGroup<T extends java.net.SocketAddress>
extends java.lang.Object
implements java.io.Closeable
NameResolver
,以便每个EventExecutor
都有自己的解析器实例。
Modifier | Constructor and Description |
---|---|
protected |
AddressResolverGroup() |
Modifier and Type | Method and Description |
---|---|
void |
close()
关闭此群组创建的所有 NameResolver 。
|
AddressResolver<T> |
getResolver(EventExecutor executor)
返回与指定的 EventExecutor 关联的AddressResolver 。
|
protected abstract AddressResolver<T> |
newResolver(EventExecutor executor)
由 getResolver(EventExecutor) 调用创建一个新的AddressResolver 。
|
public AddressResolver<T> getResolver(EventExecutor executor)
EventExecutor
关联的AddressResolver
。
如果找不到关联解析,则此方法将创建并返回由newResolver(EventExecutor)
创建的新解析器实例,以便新解析器在具有相同EventExecutor
的另一个getResolver(EventExecutor)
调用上重用 。
protected abstract AddressResolver<T> newResolver(EventExecutor executor) throws java.lang.Exception
getResolver(EventExecutor)
调用创建一个新的AddressResolver
。
java.lang.Exception
public void close()
NameResolver
。
close
在界面
java.io.Closeable
close
在界面
java.lang.AutoCloseable
Copyright © 2008–2018 The Netty Project. All rights reserved.