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

restx.security.EmptySessionProviderFactoryMachine Maven / Gradle / Ivy

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

import com.google.common.collect.ImmutableSet;
import restx.factory.*;
import restx.security.EmptySessionProvider;

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

    public EmptySessionProviderFactoryMachine() {
        super(0, new StdMachineEngine(NAME, 0, BoundlessComponentBox.FACTORY) {
private final Factory.Query definition = Factory.Query.byClass(restx.security.RestxSession.Definition.class).mandatory();

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

            @Override
            protected restx.security.EmptySessionProvider doNewComponent(SatisfiedBOM satisfiedBOM) {
                return new EmptySessionProvider(
satisfiedBOM.getOne(definition).get().getComponent()
                );
            }
        });
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy