- java.lang.Object
-
- io.netty5.resolver.SimpleNameResolver<T>
-
- io.netty5.resolver.CompositeNameResolver<T>
-
- All Implemented Interfaces:
NameResolver<T>
,Closeable
,AutoCloseable
public final class CompositeNameResolver<T> extends SimpleNameResolver<T>
A compositeSimpleNameResolver
that resolves a host name against a sequence ofNameResolver
s. In case of a failure, only the last one will be reported.
-
-
Constructor Summary
Constructors Constructor Description CompositeNameResolver(EventExecutor executor, NameResolver<T>... resolvers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doResolve(String inetHost, Promise<T> promise)
Invoked bySimpleNameResolver.resolve(String)
to perform the actual name resolution.protected void
doResolveAll(String inetHost, Promise<List<T>> promise)
Invoked bySimpleNameResolver.resolveAll(String)
to perform the actual name resolution.-
Methods inherited from class io.netty5.resolver.SimpleNameResolver
close, executor, resolve, resolve, resolveAll, resolveAll
-
-
-
-
Constructor Detail
-
CompositeNameResolver
public CompositeNameResolver(EventExecutor executor, NameResolver<T>... resolvers)
- Parameters:
executor
- theEventExecutor
which is used to notify the listeners of theFuture
returned bySimpleNameResolver.resolve(String)
resolvers
- theNameResolver
s to be tried sequentially
-
-
Method Detail
-
doResolve
protected void doResolve(String inetHost, Promise<T> promise) throws Exception
Description copied from class:SimpleNameResolver
Invoked bySimpleNameResolver.resolve(String)
to perform the actual name resolution.- Specified by:
doResolve
in classSimpleNameResolver<T>
- Throws:
Exception
-
doResolveAll
protected void doResolveAll(String inetHost, Promise<List<T>> promise) throws Exception
Description copied from class:SimpleNameResolver
Invoked bySimpleNameResolver.resolveAll(String)
to perform the actual name resolution.- Specified by:
doResolveAll
in classSimpleNameResolver<T>
- Throws:
Exception
-
-