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

it.netgrid.bauer.impl.FfmqTopicFactoryModule Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package it.netgrid.bauer.impl;

import java.util.Properties;

import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Singleton;

import it.netgrid.bauer.ITopicFactory;

public class FfmqTopicFactoryModule extends AbstractModule {
    private Properties p;

    public FfmqTopicFactoryModule(Properties properties) {
        this.p = properties;
    }

    @Override
    protected void configure() {
        bind(Properties.class).toInstance(this.p);
        bind(ITopicFactory.class).to(FfmqTopicFactory.class).in(Singleton.class);
        bind(FfmqConfigProvider.class).to(FfmqConfigFromPropertiesProvider.class);
    }

    @Provides
    public FfmqConfig buildStreamConfig(FfmqConfigProvider provider) {
        return provider.config();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy