Package org.impalaframework.module.spi

Examples of org.impalaframework.module.spi.TransitionResult


                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
               
                TransitionResult result;
     
                try {
                    transitionProcessor.process(application, newRootModuleDefinition, currentModuleDefinition);
                    result = new TransitionResult(change);
                }
                catch (Throwable error) {
                    result = new TransitionResult(change, error);
                }
               
                resultSet.addResult(result);
           
                if (result.getError() == null && moduleStateChangeNotifier != null) {
                    moduleStateChangeNotifier.notify(moduleStateHolder, result);
                }
            }
           
            resultSet.complete();
View Full Code Here


                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
               
                TransitionResult result;
     
                try {
                    transitionProcessor.process(application, transitions.getNewRootModuleDefinition(), currentModuleDefinition);
                    result = new TransitionResult(change);
                }
                catch (Throwable error) {
                    result = new TransitionResult(change, error);
                }
               
                resultSet.addResult(result);
           
                if (result.getError() == null && moduleStateChangeNotifier != null) {
                    moduleStateChangeNotifier.notify(moduleStateHolder, result);
                }
            }
           
            transitionsLogger.logTransitions(resultSet);
View Full Code Here

        ModuleStateChangeListener listener = creator.newModuleStateChangeListener("myServlet");

        replayMocks();
       
        ModuleStateChange moduleStateChange = new ModuleStateChange(Transition.UNLOADED_TO_LOADED, new SimpleModuleDefinition("myModule"));
        TransitionResult transitionResult = new TransitionResult(moduleStateChange);
       
        try {
            listener.moduleStateChanged(createMock(ModuleStateHolder.class),transitionResult);
            fail();
        }
View Full Code Here

        ModuleStateChangeListener listener = creator.newModuleStateChangeListener("myServlet");

        replayMocks();
       
        ModuleStateChange moduleStateChange = new ModuleStateChange(Transition.UNLOADED_TO_LOADED, new SimpleModuleDefinition("myModule"));
        TransitionResult transitionResult = new TransitionResult(moduleStateChange, new RuntimeException());
       
        listener.moduleStateChanged(createMock(ModuleStateHolder.class),transitionResult);
       
        verifyMocks();
    }
View Full Code Here

        assertEquals(2, notifier.getListeners().size());
    }

    public void testNotify() throws Exception {

        TransitionResult transitionResult = new TransitionResult(change);
       
        //listener1 returns the same module name as current name, so is notified
        expect(listener1.getModuleName()).andReturn("myModule");
        expect(listener1.getTransition()).andReturn(null);
        listener1.moduleStateChanged(moduleStateHolder, transitionResult);
View Full Code Here

    }
   
    private TransitionResultSet newTransitionResultSet() {
        TransitionResultSet result = new TransitionResultSet();
        ModuleStateChange stateChange = new ModuleStateChange(Transition.LOADED_TO_UNLOADED, new SimpleModuleDefinition("myModule"));
        result.addResult(new TransitionResult(stateChange));
        return result;
    }
View Full Code Here

                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
               
                TransitionResult result;
     
                try {
                    transitionProcessor.process(application, transitions.getNewRootModuleDefinition(), currentModuleDefinition);
                    result = new TransitionResult(change);
                }
                catch (Throwable error) {
                    result = new TransitionResult(change, error);
                }
               
                resultSet.addResult(result);
           
                if (result.getError() == null && moduleStateChangeNotifier != null) {
                    moduleStateChangeNotifier.notify(moduleStateHolder, result);
                }
            }
           
            resultSet.complete();
View Full Code Here

                String transition = change.getTransition();
                ModuleDefinition currentModuleDefinition = change.getModuleDefinition();

                TransitionProcessor transitionProcessor = transitionProcessorRegistry.getTransitionProcessor(transition);
               
                TransitionResult result;
     
                try {
                    transitionProcessor.process(application, transitions.getNewRootModuleDefinition(), currentModuleDefinition);
                    result = new TransitionResult(change);
                }
                catch (Throwable error) {
                    result = new TransitionResult(change, error);
                }
               
                resultSet.addResult(result);
           
                if (result.getError() == null && moduleStateChangeNotifier != null) {
                    moduleStateChangeNotifier.notify(moduleStateHolder, result);
                }
            }
           
            transitionsLogger.logTransitions(resultSet);
View Full Code Here

TOP

Related Classes of org.impalaframework.module.spi.TransitionResult

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.