Package org.impalaframework.module.definition

Examples of org.impalaframework.module.definition.DependencyManager


    @Override
    protected void setUp() throws Exception {
        super.setUp();
        rootDefinition = definitionSet1();
        manager = new DependencyManager(rootDefinition);
        manager.unfreeze();
    }
View Full Code Here


    @Override
    protected void setUp() throws Exception {
        super.setUp();
        rootDefinition = definitionSet1();
        manager = new DependencyManager(rootDefinition);
        manager.unfreeze();
    }
View Full Code Here

        maybeAddRootParent(applicationContexts, rootModuleDefinitionIndex);
        return applicationContexts;
    }

    List<ModuleDefinition> getDependencyList(ModuleDefinition definition, GraphModuleStateHolder graphModuleStateHolder) {
        DependencyManager dependencyManager = graphModuleStateHolder.getDependencyManager();
       
        //get the dependencies in correct order
        final List<ModuleDefinition> dependencies = dependencyManager.getOrderedModuleDependencies(definition.getName());  
       
        //remove the current definition from this list
        dependencies.remove(definition);
        return dependencies;
    }
View Full Code Here

        if (classLoaderRegistry.getApplicationClassLoader() == null) {
            classLoaderRegistry.setApplicationClassLoader(parent);
        }
       
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
        DependencyManager newDependencyManager = moduleStateHolder.getDependencyManager();
       
        Assert.notNull(newDependencyManager, "new dependency manager not available. Cannot create graph based class loader");
       
        return newClassLoader(classLoaderRegistry, newDependencyManager, moduleDefinition);
    }
View Full Code Here

    public TransitionSet getTransitions(Application application, RootModuleDefinition originalDefinition, RootModuleDefinition newDefinition) {

        List<ModuleStateChange> transitions = new ArrayList<ModuleStateChange>();
       
        RootModuleDefinition copy = ModuleDefinitionUtils.cloneAndUnfreeze(originalDefinition);
        DependencyManager dependencyManager = new DependencyManager(copy);
        Collection<ModuleDefinition> sortedModules = dependencyManager.getAllModules();
       
        for (ModuleDefinition moduleDefinition : sortedModules) {
            if (ModuleState.ERROR.equals(moduleDefinition.getState()) || ModuleState.DEPENDENCY_FAILED.equals(moduleDefinition.getState())) {
                transitions.add(new ModuleStateChange(Transition.UNLOADED_TO_LOADED, moduleDefinition));
                moduleDefinition.setState(ModuleState.LOADING);
View Full Code Here

        if (classLoaderRegistry.getApplicationClassLoader() == null) {
            classLoaderRegistry.setApplicationClassLoader(parent);
        }
       
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
        DependencyManager newDependencyManager = moduleStateHolder.getDependencyManager();
       
        Assert.notNull(newDependencyManager, "new dependency manager not available. Cannot create graph based class loader");
       
        return newClassLoader(classLoaderRegistry, newDependencyManager, moduleDefinition);
    }
View Full Code Here

        if (classLoaderRegistry.getApplicationClassLoader() == null) {
            classLoaderRegistry.setApplicationClassLoader(parent);
        }
       
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
        DependencyManager newDependencyManager = moduleStateHolder.getDependencyManager();
       
        Assert.notNull(newDependencyManager, "new dependency manager not available. Cannot create graph based class loader");
       
        return newClassLoader(classLoaderRegistry, newDependencyManager, moduleDefinition);
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.module.definition.DependencyManager

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.