Module io.netty5.resolver
Package io.netty5.resolver
Interface AddressResolver<T extends SocketAddress>
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractAddressResolver,InetSocketAddressResolver,NoopAddressResolver
public interface AddressResolver<T extends SocketAddress> extends Closeable
Resolves a possibility unresolvedSocketAddress.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes all the resources allocated and used by this resolver.booleanisResolved(SocketAddress address)Returnstrueif and only if the specified address has been resolved.booleanisSupported(SocketAddress address)Returnstrueif and only if the specified address is supported by this resolved.Future<T>resolve(SocketAddress address)Resolves the specified address.Future<T>resolve(SocketAddress address, Promise<T> promise)Resolves the specified address.Future<List<T>>resolveAll(SocketAddress address)Resolves the specified address.Future<List<T>>resolveAll(SocketAddress address, Promise<List<T>> promise)Resolves the specified address.
-
-
-
Method Detail
-
isSupported
boolean isSupported(SocketAddress address)
Returnstrueif and only if the specified address is supported by this resolved.
-
isResolved
boolean isResolved(SocketAddress address)
Returnstrueif and only if the specified address has been resolved.- Throws:
UnsupportedAddressTypeException- if the specified address is not supported by this resolver
-
resolve
Future<T> resolve(SocketAddress address)
Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.- Parameters:
address- the address to resolve- Returns:
- the
SocketAddressas the result of the resolution
-
resolve
Future<T> resolve(SocketAddress address, Promise<T> promise)
Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.- Parameters:
address- the address to resolvepromise- thePromisewhich will be fulfilled when the name resolution is finished- Returns:
- the
SocketAddressas the result of the resolution
-
resolveAll
Future<List<T>> resolveAll(SocketAddress address)
Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.- Parameters:
address- the address to resolve- Returns:
- the list of the
SocketAddresses as the result of the resolution
-
resolveAll
Future<List<T>> resolveAll(SocketAddress address, Promise<List<T>> promise)
Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.- Parameters:
address- the address to resolvepromise- thePromisewhich will be fulfilled when the name resolution is finished- Returns:
- the list of the
SocketAddresses as the result of the resolution
-
close
void close()
Closes all the resources allocated and used by this resolver.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-