Package org.lilyproject.runtime.model

Examples of org.lilyproject.runtime.model.LilyRuntimeModel


        return buildModel(confRegistry);
    }


    private LilyRuntimeModel buildModel(ConfRegistry confRegistry) {
        LilyRuntimeModel newModel;
        if ((settings.getModel() != null)) {
            newModel = settings.getModel();
        } else {
            Conf modulesConf = confRegistry.getConfiguration("wiring", false, false);
            Set<String> disabledModuleIds = settings.getDisabledModuleIds() != null ?
View Full Code Here


    }

    protected void setUp() throws Exception {
        setUpLogging();

        LilyRuntimeModel model = getRuntimeModel();
        if (model != null) {
            LilyRuntimeSettings settings = new LilyRuntimeSettings();
            settings.setModel(model);
            settings.setRepository(localRepository);
            settings.setConfManager(getConfManager());
View Full Code Here

    @Override
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        File moduleDir = createModule("org.lilyproject.runtime.test.testmodules.springmode");

        LilyRuntimeModel model = new LilyRuntimeModel();

        ModuleDefinition module = new ModuleDefinition("mod", moduleDir, ModuleSourceType.EXPANDED_JAR);
        model.addModule(module);

        return model;
    }
View Full Code Here

    @Override
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        File moduleDir = createModule("org.lilyproject.runtime.test.testmodules.conflistenmod");

        LilyRuntimeModel model = new LilyRuntimeModel();

        ModuleDefinition module = new ModuleDefinition("conflistenmod", moduleDir, ModuleSourceType.EXPANDED_JAR);
        model.addModule(module);

        return model;
    }
View Full Code Here

/**
* Tests having multiple instances of the same module.
*/
public class MultiModuleInstancesTest extends AbstractRuntimeTest {
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        LilyRuntimeModel model = new LilyRuntimeModel();

        File module1Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod1");

        {
            ModuleDefinition module = new ModuleDefinition("jwiringmod1a", module1Dir, ModuleSourceType.EXPANDED_JAR);
            model.addModule(module);
        }

        {
            ModuleDefinition module = new ModuleDefinition("jwiringmod1b", module1Dir, ModuleSourceType.EXPANDED_JAR);
            model.addModule(module);
        }

        File module4Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod4");
        {
            ModuleDefinition module = new ModuleDefinition("jwiringmod4a", module4Dir, ModuleSourceType.EXPANDED_JAR);
            module.addInject(new JavaServiceInjectByServiceDefinition("java.lang.CharSequence", "jwiringmod1a", "foo1Bean"));
            model.addModule(module);
        }

        {
            ModuleDefinition module = new ModuleDefinition("jwiringmod4b", module4Dir, ModuleSourceType.EXPANDED_JAR);
            module.addInject(new JavaServiceInjectByServiceDefinition("java.lang.CharSequence", "jwiringmod1b", "foo1Bean"));
            model.addModule(module);
        }

        return model;
    }
View Full Code Here

*/
public class EmptyModuleTest extends AbstractRuntimeTest {
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        File moduleDir = createModule("org.lilyproject.runtime.test.testmodules.emptymodule");

        LilyRuntimeModel model = new LilyRuntimeModel();

        ModuleDefinition module = new ModuleDefinition("foo", moduleDir, ModuleSourceType.EXPANDED_JAR);
        model.addModule(module);

        return model;
    }
View Full Code Here

* Test start/stop of runtime without any modules.
*/
public class NoModuleRuntime extends AbstractRuntimeTest {

    public void testRuntimeWithoutModules() throws Exception {
        LilyRuntimeModel model = new LilyRuntimeModel();
        LilyRuntimeSettings settings = new LilyRuntimeSettings();
        settings.setModel(model);
        settings.setRepository(dummyRepository);
        settings.setConfManager(new ConfManagerImpl());

View Full Code Here

/**
* Tests explicit wiring of Java services.
*/
public class JavaServiceWiringTest extends AbstractRuntimeTest {
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        LilyRuntimeModel model = new LilyRuntimeModel();

        {
            File module1Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod1");
            ModuleDefinition module1 = new ModuleDefinition("jwiringmod1", module1Dir, ModuleSourceType.EXPANDED_JAR);
            model.addModule(module1);
        }

        {
            File module2Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod2");
            ModuleDefinition module2 = new ModuleDefinition("jwiringmod2", module2Dir, ModuleSourceType.EXPANDED_JAR);
            model.addModule(module2);
        }

        {
            File module3Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod3");
            ModuleDefinition module3 = new ModuleDefinition("jwiringmod3", module3Dir, ModuleSourceType.EXPANDED_JAR);
            module3.addInject(new JavaServiceInjectByNameDefinition("bean1", "jwiringmod1", "foo1Bean"));
            module3.addInject(new JavaServiceInjectByNameDefinition("someDependency", "jwiringmod1", "someName"));
            module3.addInject(new JavaServiceInjectByNameDefinition("bean3", "jwiringmod2"));
            model.addModule(module3);
        }

        {
            File module4Dir = createModule("org.lilyproject.runtime.test.testmodules.jwiringmod4");
            ModuleDefinition module4 = new ModuleDefinition("jwiringmod4", module4Dir, ModuleSourceType.EXPANDED_JAR);
            module4.addInject(new JavaServiceInjectByServiceDefinition("java.lang.CharSequence", "jwiringmod2"));
            model.addModule(module4);
        }

        return model;
    }
View Full Code Here

public class ConfTest extends AbstractRuntimeTest {
    @Override
    protected LilyRuntimeModel getRuntimeModel() throws Exception {
        File moduleDir = createModule("org.lilyproject.runtime.test.testmodules.confmod");

        LilyRuntimeModel model = new LilyRuntimeModel();

        ModuleDefinition module = new ModuleDefinition("confmod", moduleDir, ModuleSourceType.EXPANDED_JAR);
        model.addModule(module);

        return model;
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.runtime.model.LilyRuntimeModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.