@UnstableApi public final class CompositeNameResolver<T> extends SimpleNameResolver<T>
SimpleNameResolver
that resolves a host name against a sequence of NameResolver
s.
In case of a failure, only the last one will be reported.Constructor and Description |
---|
CompositeNameResolver(io.netty.util.concurrent.EventExecutor executor,
NameResolver<T>... resolvers) |
Modifier and Type | Method and Description |
---|---|
protected void |
doResolve(String inetHost,
io.netty.util.concurrent.Promise<T> promise)
Invoked by
SimpleNameResolver.resolve(String) to perform the actual name resolution. |
protected void |
doResolveAll(String inetHost,
io.netty.util.concurrent.Promise<List<T>> promise)
Invoked by
SimpleNameResolver.resolveAll(String) to perform the actual name resolution. |
close, executor, resolve, resolve, resolveAll, resolveAll
public CompositeNameResolver(io.netty.util.concurrent.EventExecutor executor, NameResolver<T>... resolvers)
executor
- the EventExecutor
which is used to notify the listeners of the Future
returned
by SimpleNameResolver.resolve(String)
resolvers
- the NameResolver
s to be tried sequentiallyprotected void doResolve(String inetHost, io.netty.util.concurrent.Promise<T> promise) throws Exception
SimpleNameResolver
SimpleNameResolver.resolve(String)
to perform the actual name resolution.doResolve
in class SimpleNameResolver<T>
Exception
protected void doResolveAll(String inetHost, io.netty.util.concurrent.Promise<List<T>> promise) throws Exception
SimpleNameResolver
SimpleNameResolver.resolveAll(String)
to perform the actual name resolution.doResolveAll
in class SimpleNameResolver<T>
Exception
Copyright © 2008–2019 The Netty Project. All rights reserved.