Interface HostResolver

All Known Implementing Classes:
DefaultHostResolver, DnssecHostResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HostResolver
Resolves server host names.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(String host, int port)
    Resolves a host name and associates it with the requested port.
  • Method Details

    • resolve

      InetSocketAddress resolve(String host, int port) throws UnknownHostException
      Resolves a host name and associates it with the requested port.
      Parameters:
      host - the destination host name
      port - the destination port
      Returns:
      the resolved destination socket address
      Throws:
      UnknownHostException - if the host cannot be resolved