@UnstableApi
public abstract class AddressResolverGroup<T extends java.net.SocketAddress>
extends java.lang.Object
implements java.io.Closeable
NameResolver
s so that each EventExecutor
has its own resolver instance.Modifier | Constructor and Description |
---|---|
protected |
AddressResolverGroup() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all
NameResolver s created by this group. |
AddressResolver<T> |
getResolver(EventExecutor executor)
Returns the
AddressResolver associated with the specified EventExecutor . |
protected abstract AddressResolver<T> |
newResolver(EventExecutor executor)
Invoked by
getResolver(EventExecutor) to create a new AddressResolver . |
public AddressResolver<T> getResolver(EventExecutor executor)
AddressResolver
associated with the specified EventExecutor
. If there's no associated
resolved found, this method creates and returns a new resolver instance created by
newResolver(EventExecutor)
so that the new resolver is reused on another
getResolver(EventExecutor)
call with the same EventExecutor
.protected abstract AddressResolver<T> newResolver(EventExecutor executor) throws java.lang.Exception
getResolver(EventExecutor)
to create a new AddressResolver
.java.lang.Exception
public void close()
NameResolver
s created by this group.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
Copyright © 2008–2019 The Netty Project. All rights reserved.