Class AbstractAddressResolver<T extends SocketAddress>

    • Constructor Detail

      • AbstractAddressResolver

        protected AbstractAddressResolver​(io.netty.util.concurrent.EventExecutor executor)
        Parameters:
        executor - the EventExecutor which is used to notify the listeners of the Future returned by resolve(SocketAddress)
      • AbstractAddressResolver

        protected AbstractAddressResolver​(io.netty.util.concurrent.EventExecutor executor,
                                          Class<? extends T> addressType)
        Parameters:
        executor - the EventExecutor which is used to notify the listeners of the Future returned by resolve(SocketAddress)
        addressType - the type of the SocketAddress supported by this resolver
    • Method Detail

      • executor

        protected io.netty.util.concurrent.EventExecutor executor()
        Returns the EventExecutor which is used to notify the listeners of the Future returned by resolve(SocketAddress).
      • doIsResolved

        protected abstract boolean doIsResolved​(T address)
        Invoked by isResolved(SocketAddress) to check if the specified address has been resolved already.
      • resolve

        public final io.netty.util.concurrent.Future<T> resolve​(SocketAddress address)
        Description copied from interface: AddressResolver
        Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
        Specified by:
        resolve in interface AddressResolver<T extends SocketAddress>
        Parameters:
        address - the address to resolve
        Returns:
        the SocketAddress as the result of the resolution
      • resolve

        public final io.netty.util.concurrent.Future<T> resolve​(SocketAddress address,
                                                                io.netty.util.concurrent.Promise<T> promise)
        Description copied from interface: AddressResolver
        Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
        Specified by:
        resolve in interface AddressResolver<T extends SocketAddress>
        Parameters:
        address - the address to resolve
        promise - the Promise which will be fulfilled when the name resolution is finished
        Returns:
        the SocketAddress as the result of the resolution
      • resolveAll

        public final io.netty.util.concurrent.Future<List<T>> resolveAll​(SocketAddress address)
        Description copied from interface: AddressResolver
        Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
        Specified by:
        resolveAll in interface AddressResolver<T extends SocketAddress>
        Parameters:
        address - the address to resolve
        Returns:
        the list of the SocketAddresses as the result of the resolution
      • resolveAll

        public final io.netty.util.concurrent.Future<List<T>> resolveAll​(SocketAddress address,
                                                                         io.netty.util.concurrent.Promise<List<T>> promise)
        Description copied from interface: AddressResolver
        Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
        Specified by:
        resolveAll in interface AddressResolver<T extends SocketAddress>
        Parameters:
        address - the address to resolve
        promise - the Promise which will be fulfilled when the name resolution is finished
        Returns:
        the list of the SocketAddresses as the result of the resolution
      • doResolve

        protected abstract void doResolve​(T unresolvedAddress,
                                          io.netty.util.concurrent.Promise<T> promise)
                                   throws Exception
        Invoked by resolve(SocketAddress) to perform the actual name resolution.
        Throws:
        Exception