Interface NameResolver<T>

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
CompositeNameResolver, DefaultNameResolver, DnsNameResolver, InetNameResolver, InflightNameResolver, RoundRobinInetAddressResolver, SimpleNameResolver

public interface NameResolver<T> extends Closeable
Resolves an arbitrary string that represents the name of an endpoint into an address.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes all the resources allocated and used by this resolver.
    resolve(String inetHost)
    Resolves the specified name into an address.
    resolve(String inetHost, Promise<T> promise)
    Resolves the specified name into an address.
    resolveAll(String inetHost)
    Resolves the specified host name and port into a list of address.
    resolveAll(String inetHost, Promise<List<T>> promise)
    Resolves the specified host name and port into a list of address.
  • Method Details

    • resolve

      Future<T> resolve(String inetHost)
      Resolves the specified name into an address.
      Parameters:
      inetHost - the name to resolve
      Returns:
      the address as the result of the resolution
    • resolve

      Future<T> resolve(String inetHost, Promise<T> promise)
      Resolves the specified name into an address.
      Parameters:
      inetHost - the name to resolve
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the address as the result of the resolution
    • resolveAll

      Future<List<T>> resolveAll(String inetHost)
      Resolves the specified host name and port into a list of address.
      Parameters:
      inetHost - the name to resolve
      Returns:
      the list of the address as the result of the resolution
    • resolveAll

      Future<List<T>> resolveAll(String inetHost, Promise<List<T>> promise)
      Resolves the specified host name and port into a list of address.
      Parameters:
      inetHost - the name to resolve
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the list of the address as the result of the resolution
    • close

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