Top Description Fields Constructors Methods
io.netty5.resolver

public abstract Class SimpleNameResolver<T>

extends Object
implements NameResolver<T>
Class Inheritance
All Implemented Interfaces
io.netty5.resolver.NameResolver, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
io.netty5.resolver.CompositeNameResolver, io.netty5.resolver.InetNameResolver
Imports
io.netty5.util.concurrent.EventExecutor, .Future, .Promise, java.util.List

A skeletal NameResolver implementation.

Field Summary

Modifier and TypeField and Description
private final EventExecutor

Constructor Summary

AccessConstructor and Description
protected
SimpleNameResolver(EventExecutor
the EventExecutor which is used to notify the listeners of the Future returned by resolve(String)
executor
)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements io.netty5.resolver.NameResolver.close.

Closes all the resources allocated and used by this resolver.
protected abstract void
doResolve(String inetHost, Promise<T> promise)

Invoked by resolve(String) to perform the actual name resolution.

protected abstract void
doResolveAll(String inetHost, Promise<List<T>> promise)

Invoked by resolveAll(String) to perform the actual name resolution.

protected EventExecutor
executor()

Returns the EventExecutor which is used to notify the listeners of the Future returned by resolve(String).

public final Future<T>
resolve(String
the name to resolve
inetHost
)

Implements io.netty5.resolver.NameResolver.resolve.

Resolves the specified name into an address.
public Future<T>
resolve(String
the name to resolve
inetHost
,
Promise<T>
the Promise which will be fulfilled when the name resolution is finished
promise
)

Implements io.netty5.resolver.NameResolver.resolve.

Resolves the specified name into an address.
public final Future<List<T>>
resolveAll(String
the name to resolve
inetHost
)

Implements io.netty5.resolver.NameResolver.resolveAll.

Resolves the specified host name and port into a list of address.
public Future<List<T>>
resolveAll(String
the name to resolve
inetHost
,
Promise<List<T>>
the Promise which will be fulfilled when the name resolution is finished
promise
)

Implements io.netty5.resolver.NameResolver.resolveAll.

Resolves the specified host name and port into a list of address.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

executorback to summary
private final EventExecutor executor

Constructor Detail

SimpleNameResolverback to summary
protected SimpleNameResolver(EventExecutor executor)
Parameters
executor:EventExecutor

the EventExecutor which is used to notify the listeners of the Future returned by resolve(String)

Method Detail

closeback to summary
public void close()

Implements io.netty5.resolver.NameResolver.close.

Doc from io.netty5.resolver.NameResolver.close.

Closes all the resources allocated and used by this resolver.

Annotations
@Override
doResolveback to summary
protected abstract void doResolve(String inetHost, Promise<T> promise) throws Exception

Invoked by resolve(String) to perform the actual name resolution.

doResolveAllback to summary
protected abstract void doResolveAll(String inetHost, Promise<List<T>> promise) throws Exception

Invoked by resolveAll(String) to perform the actual name resolution.

executorback to summary
protected EventExecutor executor()

Returns the EventExecutor which is used to notify the listeners of the Future returned by resolve(String).

resolveback to summary
public final Future<T> resolve(String inetHost)

Implements io.netty5.resolver.NameResolver.resolve.

Doc from io.netty5.resolver.NameResolver.resolve.

Resolves the specified name into an address.

Parameters
inetHost:String

the name to resolve

Returns:Future<T>

the address as the result of the resolution

Annotations
@Override
resolveback to summary
public Future<T> resolve(String inetHost, Promise<T> promise)

Implements io.netty5.resolver.NameResolver.resolve.

Doc from io.netty5.resolver.NameResolver.resolve.

Resolves the specified name into an address.

Parameters
inetHost:String

the name to resolve

promise:Promise<T>

the Promise which will be fulfilled when the name resolution is finished

Returns:Future<T>

the address as the result of the resolution

Annotations
@Override
resolveAllback to summary
public final Future<List<T>> resolveAll(String inetHost)

Implements io.netty5.resolver.NameResolver.resolveAll.

Doc from io.netty5.resolver.NameResolver.resolveAll.

Resolves the specified host name and port into a list of address.

Parameters
inetHost:String

the name to resolve

Returns:Future<List<T>>

the list of the address as the result of the resolution

Annotations
@Override
resolveAllback to summary
public Future<List<T>> resolveAll(String inetHost, Promise<List<T>> promise)

Implements io.netty5.resolver.NameResolver.resolveAll.

Doc from io.netty5.resolver.NameResolver.resolveAll.

Resolves the specified host name and port into a list of address.

Parameters
inetHost:String

the name to resolve

promise:Promise<List<T>>

the Promise which will be fulfilled when the name resolution is finished

Returns:Future<List<T>>

the list of the address as the result of the resolution

Annotations
@Override