Interface InetAddressResolver


@ThreadSafe public interface InetAddressResolver
This interface defines operations for looking up host names.

The default resolver for the driver can be customized by deploying an implementation of InetAddressResolverProvider.

Since:
4.10
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Given the name of a host, returns a list of IP addresses of the requested address family associated with a provided hostname.
  • Method Details

    • lookupByName

      List<InetAddress> lookupByName(String host) throws UnknownHostException
      Given the name of a host, returns a list of IP addresses of the requested address family associated with a provided hostname.

      The host name can be an IP literal, as with InetAddress.getAllByName(String)

      Implementations are encouraged to implement their own caching policies, as there is no guarantee that the caller will implement a cache.

      Parameters:
      host - the host
      Returns:
      a list of IP addresses for the requested host
      Throws:
      UnknownHostException - if no IP addresses for the host could be found