// Path: src/main/java/cz/tomasdvorak/eet/client/dto/DnsResolver.java
// public interface DnsResolver {
// 
//     /**
//      * Convert a domain name to IP address.
//      *
//      * @param hostname Pure hostname, without protocol or path. For example pg.eet.cz
//      * @return IP address as a String
//      * @throws UnknownHostException in case DNS lookup fails.
//      */
//     String getHostAddress(String hostname) throws UnknownHostException;
// }


import cz.tomasdvorak.eet.client.dto.DnsResolver;
import cz.tomasdvorak.eet.client.exceptions.DnsLookupFailedException;
import cz.tomasdvorak.eet.client.exceptions.DnsTimeoutException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.*;
package cz.tomasdvorak.eet.client.networking;



public class DnsLookupWithTimeout implements DnsLookup {

    private static final Logger logger = LoggerFactory.getLogger(DnsLookupWithTimeout.class);

    private final long timeoutMillis;
// Path: src/main/java/cz/tomasdvorak/eet/client/dto/DnsResolver.java
// public interface DnsResolver {
// 
//     /**
//      * Convert a domain name to IP address.
//      *
//      * @param hostname Pure hostname, without protocol or path. For example pg.eet.cz
//      * @return IP address as a String
//      * @throws UnknownHostException in case DNS lookup fails.
//      */
//     String getHostAddress(String hostname) throws UnknownHostException;
// }


// Path: src/main/java/cz/tomasdvorak/eet/client/networking/DnsLookupWithTimeout.java
import cz.tomasdvorak.eet.client.dto.DnsResolver;
import cz.tomasdvorak.eet.client.exceptions.DnsLookupFailedException;
import cz.tomasdvorak.eet.client.exceptions.DnsTimeoutException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.*;

package cz.tomasdvorak.eet.client.networking;



public class DnsLookupWithTimeout implements DnsLookup {

    private static final Logger logger = LoggerFactory.getLogger(DnsLookupWithTimeout.class);

    private final long timeoutMillis;
    private final DnsResolver dnsResolver;