package denominator;

import static com.google.common.base.Objects.toStringHelper;

import java.io.Closeable;
import java.io.IOException;

import javax.inject.Inject;

/**
 * represents the connection between a {@link DNSApi} interface and the
 * {@link Provider} that implements it.
 */
public class DNSApiManager implements Closeable {
    private final Provider provider;
    private final DNSApi api;
    private final Closeable closer;

    @Inject
    DNSApiManager(Provider provider, DNSApi api, Closeable closer) {
        this.provider = provider;
        this.api = api;
        this.closer = closer;
    }

    /**
     * the currently configured {@link DNSApi}
     */
    public DNSApi getApi() {
        return api;
    }

    /**
     * closes resources associated with the connections, such as thread pools or
     * open files.
     */
    @Override
    public void close() throws IOException {
        closer.close();
    }

    @Override
    public String toString() {
        return toStringHelper(this).add("provider", provider).toString();
    }
}
@@ -722,32 +722,180 @@
 urn api;%0A    %7D%0A%0A
+    /**%0A     * Get the provider associated with this instance%0A     */%0A    public final Provider getProvider() %7B%0A        return provider;%0A    %7D%0A    %0A
     /**%0A     * c
@@ -1079,24 +1079,28 @@
 se();%0A    %7D%0A
+    
 %0A    @Overri

Add API DNSApiManager.getProvider()