All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.discovery.client.DiscoveryClientManager Maven / Gradle / Ivy

package io.dropwizard.discovery.client;

import static com.google.common.base.Preconditions.checkNotNull;
import io.dropwizard.lifecycle.Managed;
import javax.annotation.Nonnull;

public class DiscoveryClientManager implements Managed {

    private final DiscoveryClient client;

    /**
     * Constructor
     * 
     * @param client
     *            {@link DiscoveryClient}
     */
    public DiscoveryClientManager(@Nonnull final DiscoveryClient client) {
        this.client = checkNotNull(client);
    }

    @Override
    public void start() throws Exception {
        client.start();
    }

    @Override
    public void stop() throws Exception {
        client.close();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy