Interface AddressResolver<T extends java.net.SocketAddress>

    • 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​(java.net.SocketAddress address)
      Returns true if and only if the specified address has been resolved.
      boolean isSupported​(java.net.SocketAddress address)
      Returns true if and only if the specified address is supported by this resolved.
      Future<T> resolve​(java.net.SocketAddress address)
      Resolves the specified address.
      Future<T> resolve​(java.net.SocketAddress address, Promise<T> promise)
      Resolves the specified address.
      Future<java.util.List<T>> resolveAll​(java.net.SocketAddress address)
      Resolves the specified address.
      Future<java.util.List<T>> resolveAll​(java.net.SocketAddress address, Promise<java.util.List<T>> promise)
      Resolves the specified address.
    • Method Detail

      • isSupported

        boolean isSupported​(java.net.SocketAddress address)
        Returns true if and only if the specified address is supported by this resolved.
      • isResolved

        boolean isResolved​(java.net.SocketAddress address)
        Returns true if and only if the specified address has been resolved.
        Throws:
        java.nio.channels.UnsupportedAddressTypeException - if the specified address is not supported by this resolver
      • resolve

        Future<T> resolve​(java.net.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​(java.net.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 resolve
        promise - the Promise which will be fulfilled when the name resolution is finished
        Returns:
        the SocketAddress as the result of the resolution
      • resolveAll

        Future<java.util.List<T>> resolveAll​(java.net.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<java.util.List<T>> resolveAll​(java.net.SocketAddress address,
                                             Promise<java.util.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 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
      • close

        void close()
        Closes all the resources allocated and used by this resolver.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable