Package org.impalaframework.module.transition

Examples of org.impalaframework.module.transition.TransitionProcessorRegistry


        transitionManager = new DefaultTransitionManager();
       
        ApplicationManager applicationManager = TestApplicationManager.newApplicationManager(null, moduleStateHolder, null);
        application = applicationManager.getCurrentApplication();
       
        TransitionProcessorRegistry transitionProcessors = new TransitionProcessorRegistry();
        loadTransitionProcessor = new LoadTransitionProcessor();
        unloadTransitionProcessor = new UnloadTransitionProcessor();
        SpringModuleRuntime moduleRuntime = new SpringModuleRuntime();
        moduleRuntime.setApplicationContextLoader(loader);
       
        loadTransitionProcessor.setModuleRuntimeManager(moduleRuntimeManager);
       
        transitionProcessors.addItem(Transition.UNLOADED_TO_LOADED, loadTransitionProcessor);
        transitionProcessors.addItem(Transition.LOADED_TO_UNLOADED, unloadTransitionProcessor);
        transitionManager.setTransitionProcessorRegistry(transitionProcessors);
    }
View Full Code Here


        registry.addItem("spring-"+ModuleTypes.APPLICATION, applicationModuleLoader);
        DefaultApplicationContextLoader contextLoader = new DefaultApplicationContextLoader();
        contextLoader.setModuleLoaderRegistry(registry);
        contextLoader.setDelegatingContextLoaderRegistry(new DelegatingContextLoaderRegistry());
       
        TransitionProcessorRegistry transitionProcessors = new TransitionProcessorRegistry();
        LoadTransitionProcessor loadTransitionProcessor = new LoadTransitionProcessor();
        SpringModuleRuntime moduleRuntime = new SpringModuleRuntime();
        moduleRuntime.setApplicationContextLoader(contextLoader);
        moduleRuntime.setClassLoaderFactory(classLoaderFactory);
       
        ModuleRuntime springModuleRuntime = moduleRuntime;
        Map<String, ModuleRuntime> moduleRuntimes = Collections.singletonMap("spring", springModuleRuntime);
        DefaultModuleRuntimeManager manager = new DefaultModuleRuntimeManager();
        manager.setModuleRuntimes(moduleRuntimes);
       
        loadTransitionProcessor.setModuleRuntimeManager(manager);
        UnloadTransitionProcessor unloadTransitionProcessor = new UnloadTransitionProcessor();
        transitionProcessors.addItem(Transition.UNLOADED_TO_LOADED, loadTransitionProcessor);
        transitionProcessors.addItem(Transition.LOADED_TO_UNLOADED, unloadTransitionProcessor);
        transitionManager.setTransitionProcessorRegistry(transitionProcessors);    

        ApplicationManager applicationManager = TestApplicationManager.newApplicationManager(new ModuleClassLoaderRegistry(), moduleStateHolder, new DelegatingServiceRegistry());
        Application application = applicationManager.getCurrentApplication();
       
View Full Code Here

TOP

Related Classes of org.impalaframework.module.transition.TransitionProcessorRegistry

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.