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 void
close()
Closes all the resources allocated and used by this resolver.boolean
isResolved(SocketAddress address)
Returnstrue
if and only if the specified address has been resolved.boolean
isSupported(SocketAddress address)
Returnstrue
if 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)
Returnstrue
if and only if the specified address is supported by this resolved.
-
isResolved
boolean isResolved(SocketAddress address)
Returnstrue
if 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
SocketAddress
as 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
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the
SocketAddress
as 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
SocketAddress
es 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
- thePromise
which will be fulfilled when the name resolution is finished- Returns:
- the list of the
SocketAddress
es as the result of the resolution
-
close
void close()
Closes all the resources allocated and used by this resolver.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-