- java.lang.Object
-
- io.netty5.resolver.AbstractAddressResolver<InetSocketAddress>
-
- io.netty5.resolver.InetSocketAddressResolver
-
- All Implemented Interfaces:
AddressResolver<InetSocketAddress>
,Closeable
,AutoCloseable
public class InetSocketAddressResolver extends AbstractAddressResolver<InetSocketAddress>
AAbstractAddressResolver
that resolvesInetSocketAddress
.
-
-
Constructor Summary
Constructors Constructor Description InetSocketAddressResolver(EventExecutor executor, NameResolver<InetAddress> nameResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes all the resources allocated and used by this resolver.protected boolean
doIsResolved(InetSocketAddress address)
Invoked byAbstractAddressResolver.isResolved(SocketAddress)
to check if the specifiedaddress
has been resolved already.protected void
doResolve(InetSocketAddress unresolvedAddress, Promise<InetSocketAddress> promise)
Invoked byAbstractAddressResolver.resolve(SocketAddress)
to perform the actual name resolution.protected void
doResolveAll(InetSocketAddress unresolvedAddress, Promise<List<InetSocketAddress>> promise)
Invoked byAbstractAddressResolver.resolveAll(SocketAddress)
to perform the actual name resolution.-
Methods inherited from class io.netty5.resolver.AbstractAddressResolver
executor, isResolved, isSupported, resolve, resolve, resolveAll, resolveAll
-
-
-
-
Constructor Detail
-
InetSocketAddressResolver
public InetSocketAddressResolver(EventExecutor executor, NameResolver<InetAddress> nameResolver)
- Parameters:
executor
- theEventExecutor
which is used to notify the listeners of theFuture
returned byAbstractAddressResolver.resolve(java.net.SocketAddress)
nameResolver
- theNameResolver
used for name resolution
-
-
Method Detail
-
doIsResolved
protected boolean doIsResolved(InetSocketAddress address)
Description copied from class:AbstractAddressResolver
Invoked byAbstractAddressResolver.isResolved(SocketAddress)
to check if the specifiedaddress
has been resolved already.- Specified by:
doIsResolved
in classAbstractAddressResolver<InetSocketAddress>
-
doResolve
protected void doResolve(InetSocketAddress unresolvedAddress, Promise<InetSocketAddress> promise) throws Exception
Description copied from class:AbstractAddressResolver
Invoked byAbstractAddressResolver.resolve(SocketAddress)
to perform the actual name resolution.- Specified by:
doResolve
in classAbstractAddressResolver<InetSocketAddress>
- Throws:
Exception
-
doResolveAll
protected void doResolveAll(InetSocketAddress unresolvedAddress, Promise<List<InetSocketAddress>> promise) throws Exception
Description copied from class:AbstractAddressResolver
Invoked byAbstractAddressResolver.resolveAll(SocketAddress)
to perform the actual name resolution.- Specified by:
doResolveAll
in classAbstractAddressResolver<InetSocketAddress>
- Throws:
Exception
-
close
public void close()
Description copied from interface:AddressResolver
Closes all the resources allocated and used by this resolver.- Specified by:
close
in interfaceAddressResolver<InetSocketAddress>
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractAddressResolver<InetSocketAddress>
-
-