Examples of ModuleStateChangeListener


Examples of org.impalaframework.module.ModuleStateChangeListener

    ModuleStateHolder moduleStateHolder = facade.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {

        public void moduleStateChanged(ModuleStateHolder moduleStateHolder, ModuleStateChange change) {
          try {
            servlet.init();
          }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateChangeListener

    ModuleStateHolder moduleStateHolder = facade.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {

        public void moduleStateChanged(ModuleStateHolder moduleStateHolder, ModuleStateChange change) {
          try {
            servlet.init();
          }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateChangeListener

    ModuleStateHolder moduleStateHolder = factory.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = factory.getModuleStateChangeNotifier();
      moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {

        public void moduleStateChanged(ModuleStateHolder moduleStateHolder, ModuleStateChange change) {
          try {
            initServletBean();
          }
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

    ModuleStateHolder moduleStateHolder = facade.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {

        public void moduleStateChanged(ModuleStateHolder moduleStateHolder, ModuleStateChange change) {
          try {
            servlet.init();
          }
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      ModuleStateChangeListener listener = newModuleStateChangeListener(servletName);
            moduleStateChangeNotifier.addListener(listener);
      this.initialized = true;
    }
   
    ApplicationContext context = SpringModuleUtils.getModuleSpringContext(moduleStateHolder, servletName);
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

    }
  }

    ModuleStateChangeListener newModuleStateChangeListener(final String servletName) {
       
        ModuleStateChangeListener listener = new ModuleStateChangeListener() {

          public void moduleStateChanged(ModuleStateHolder moduleStateHolder, TransitionResult result) {
             
            if (!result.isInError()) {
                try {
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

        servletContext = EasyMock.createMock(ServletContext.class);
    }

    public void testNewStateChangeListenerOK() throws Exception {
       
        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();
        }
        catch (ExecutionException e) {
        }
       
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

        verifyMocks();
    }
   
    public void testNewStateChangeListenerException() throws Exception {
       
        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

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      ModuleStateChangeListener listener = newModuleStateChangeListener(servletName);
            moduleStateChangeNotifier.addListener(listener);
      this.initialized = true;
    }
   
    ApplicationContext context = SpringModuleUtils.getModuleSpringContext(moduleStateHolder, servletName);
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateChangeListener

    }
  }

    ModuleStateChangeListener newModuleStateChangeListener(final String servletName) {
       
        ModuleStateChangeListener listener = new ModuleStateChangeListener() {

          public void moduleStateChanged(ModuleStateHolder moduleStateHolder, TransitionResult result) {
             
            if (!result.isInError()) {
                try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.