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

io.split.qos.server.modules.QOSFailWithModule Maven / Gradle / Ivy

There is a newer version: 22.4.3
Show newest version
package io.split.qos.server.modules;

import com.google.common.base.Preconditions;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import io.split.qos.server.failcondition.FailCondition;

/**
 * Simple Module to inject the failed condition.
 */
public class QOSFailWithModule extends AbstractModule {

    private final Class clazz;

    public QOSFailWithModule(Class clazz) {
        this.clazz = Preconditions.checkNotNull(clazz);
    }

    @Override
    protected void configure() {
        bind(FailCondition.class).to(clazz).in(Singleton.class);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy