public <T extends ConfigInstance> ConfigHandle<T> subscribe(SingleSubscriber<T> singleSubscriber, Class<T> configClass, String configId) {
        if ( ! subscriptionHandles.isEmpty())
            throw new IllegalStateException("Can not start single-subscription because subscriptions were previously opened on this");

        ConfigHandle<T> handle = subscribe(configClass, configId);

        if ( ! nextConfig(false))
            throw new ConfigurationRuntimeException("Initial config of " + configClass.getName() + " failed");

        singleSubscriber.configure(handle.getConfig());
        startConfigThread(() -> {
                while (!isClosed()) {
                    boolean hasNewConfig = false;

                    try {
                        hasNewConfig = nextConfig(false);
                    }
                    catch (Exception e) {
                        log.log(isClosed() ? FINE : WARNING, "Exception on receiving config. Ignoring this change.", e);
                    }

                    try {
                        if (hasNewConfig)
                            singleSubscriber.configure(handle.getConfig());
                    }
                    catch (Exception e) {
                        log.warning("Exception on applying config " + configClass.getName() +
                                    " for config id " + configId + ": Ignoring this change: " +
                                    Exceptions.toMessageString(e));
                    }
                }
            }
        );
        return handle;
    }
Convenience method that can be used if you only want to subscribe to <em>one</em> config, and want generic error handling.
Implement {@link SingleSubscriber} and pass it to this method.
You will get initial config, and a config thread will be started. The method will throw in your thread if initial
configuration fails, and the config thread will print a generic error message (but continue) if it fails thereafter. The config
thread will stop if you {@link #close()} this {@link ConfigSubscriber}.

@param <T> ConfigInstance type
@param singleSubscriber The object to receive config
@param configClass      The class, typically generated from a def-file using config-class-plugin
@param configId         Identifies the service in vespa-services.xml
@return The handle of the config
@see #startConfigThread(Runnable)
config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java