Package io.netty.resolver
Interface NameResolver<T>
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
CompositeNameResolver
,DefaultNameResolver
,DnsNameResolver
,InetNameResolver
,RoundRobinInetAddressResolver
,SimpleNameResolver
public interface NameResolver<T> extends java.io.Closeable
Resolves an arbitrary string that represents the name of an endpoint into an address.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes all the resources allocated and used by this resolver.Future<T>
resolve(java.lang.String inetHost)
Resolves the specified name into an address.Future<T>
resolve(java.lang.String inetHost, Promise<T> promise)
Resolves the specified name into an address.Future<java.util.List<T>>
resolveAll(java.lang.String inetHost)
Resolves the specified host name and port into a list of address.Future<java.util.List<T>>
resolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise)
Resolves the specified host name and port into a list of address.
-
-
-
Method Detail
-
resolve
Future<T> resolve(java.lang.String inetHost)
Resolves the specified name into an address.- Parameters:
inetHost
- the name to resolve- Returns:
- the address as the result of the resolution
-
resolve
Future<T> resolve(java.lang.String inetHost, Promise<T> promise)
Resolves the specified name into an address.- Parameters:
inetHost
- the name to resolvepromise
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the address as the result of the resolution
-
resolveAll
Future<java.util.List<T>> resolveAll(java.lang.String inetHost)
Resolves the specified host name and port into a list of address.- Parameters:
inetHost
- the name to resolve- Returns:
- the list of the address as the result of the resolution
-
resolveAll
Future<java.util.List<T>> resolveAll(java.lang.String inetHost, Promise<java.util.List<T>> promise)
Resolves the specified host name and port into a list of address.- Parameters:
inetHost
- the name to resolvepromise
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the list of the address as the result of the resolution
-
close
void close()
Closes all the resources allocated and used by this resolver.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-