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

com.instaclustr.guice.ServiceManagerModule Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.instaclustr.guice;

import java.util.Set;

import com.google.common.util.concurrent.Service;
import com.google.common.util.concurrent.ServiceManager;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.multibindings.Multibinder;

public class ServiceManagerModule extends AbstractModule {
    @Override
    protected void configure() {
        Multibinder.newSetBinder(binder(), Service.class);
    }

    @Provides
    ServiceManager provideServiceManager(final Set services) {
        return new ServiceManager(services);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy