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

org.spincast.plugins.configpropsfile.SpincastConfigPropsFilePluginGuiceModule Maven / Gradle / Ivy

The newest version!
package org.spincast.plugins.configpropsfile;

import java.lang.reflect.Type;

import org.spincast.core.config.ISpincastConfig;
import org.spincast.core.guice.SpincastPluginGuiceModuleBase;

import com.google.inject.Scopes;

/**
 * Guice module for the Spincast Config based on a properties file plugin.
 */
public class SpincastConfigPropsFilePluginGuiceModule extends SpincastPluginGuiceModuleBase {

    /**
     * Constructor.
     */
    public SpincastConfigPropsFilePluginGuiceModule(Type requestContextType,
                                                    Type websocketContextType) {
        super(requestContextType, websocketContextType);
    }

    @Override
    protected void configure() {
        bindSpincastConfig();
    }

    protected void bindSpincastConfig() {
        bind(getSpincastConfigImplClass()).in(Scopes.SINGLETON);
        bind(ISpincastConfig.class).to(getSpincastConfigImplClass()).in(Scopes.SINGLETON);
    }

    protected Class getSpincastConfigImplClass() {
        return SpincastConfigPropsFileBased.class;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy