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

restx.HttpSettingsConfigFactoryMachine Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
package restx;

import com.google.common.collect.ImmutableSet;
import restx.factory.*;
import restx.HttpSettingsConfig;

@Machine
public class HttpSettingsConfigFactoryMachine extends SingleNameFactoryMachine {
    public static final Name NAME = Name.of(restx.HttpSettingsConfig.class, "HttpSettingsConfig");

    public HttpSettingsConfigFactoryMachine() {
        super(1000, new StdMachineEngine(NAME, 1000, BoundlessComponentBox.FACTORY) {
private final Factory.Query config = Factory.Query.byClass(restx.common.RestxConfig.class).mandatory();

            @Override
            public BillOfMaterials getBillOfMaterial() {
                return new BillOfMaterials(ImmutableSet.>of(
config
                ));
            }

            @Override
            protected restx.HttpSettingsConfig doNewComponent(SatisfiedBOM satisfiedBOM) {
                return new HttpSettingsConfig(
satisfiedBOM.getOne(config).get().getComponent()
                );
            }
        });
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy