Examples of ModuleStateHolder


Examples of org.impalaframework.module.holder.ModuleStateHolder

    String moduleToReload = moduleOperationInput.getModuleName();
    Assert.notNull(moduleToReload,
        "moduleName is required as it specifies the name used to match the module to reload in "
            + this.getClass().getName());
   
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
    RootModuleDefinition newDefinition = moduleStateHolder.cloneRootModuleDefinition();

    ModuleDefinition found = newDefinition.findChildDefinition(moduleToReload, false);

    if (found != null) {
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateHolder

  }

  public ModuleOperationResult execute(ModuleOperationInput moduleOperationInput) {

    Assert.notNull(moduleOperationInput, "moduleOperationInput cannot be null");
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
   
    //note that the module definition source is externally supplied
    ModuleDefinitionSource newModuleDefinitionSource = moduleOperationInput.getModuleDefinitionSource();
    Assert.notNull(newModuleDefinitionSource, "moduleDefinitionSource is required as it specifies the new module definition to apply in " + this.getClass().getName());
   
    RootModuleDefinition newModuleDefinition = newModuleDefinitionSource.getModuleDefinition();
    RootModuleDefinition oldModuleDefinition = getExistingModuleDefinitionSource();
   
    ModificationExtractorType modificationExtractorType = getModificationExtractorType();
   
    // figure out the modules to reload
    ModificationExtractor calculator = getModificationExtractorRegistry()
        .getModificationExtractor(modificationExtractorType);
    TransitionSet transitions = calculator.getTransitions(oldModuleDefinition, newModuleDefinition);
    moduleStateHolder.processTransitions(transitions);
    return ModuleOperationResult.TRUE;
  }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateHolder

   
    Assert.notNull(moduleOperationInput, "moduleOperationInput cannot be null");
    ModuleDefinition moduleToAdd = moduleOperationInput.getModuleDefinition();
    Assert.notNull(moduleToAdd, "moduleName is required as it specifies the name of the module to add in " + this.getClass().getName());
   
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
    ModificationExtractor calculator = getModificationExtractorRegistry().getModificationExtractor(ModificationExtractorType.STICKY);
   
    addModule(moduleStateHolder, calculator, moduleToAdd);
    return new ModuleOperationResult(true);
  }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateHolder

   
    Assert.notNull(moduleOperationInput, "moduleOperationInput cannot be null");
    String moduleToRemove = moduleOperationInput.getModuleName();
    Assert.notNull(moduleToRemove, "moduleName is required as it specifies the name of the module to remove in " + this.getClass().getName());
   
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
    ModificationExtractor calculator = getModificationExtractorRegistry().getModificationExtractor(ModificationExtractorType.STRICT);
    boolean result = removeModule(moduleStateHolder, calculator, moduleToRemove);
    return result ? ModuleOperationResult.TRUE : ModuleOperationResult.FALSE;
  }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateHolder

  }

  /* **************************** private methods ************************** */

  private ConfigurableApplicationContext internalGet() {
    ModuleStateHolder stateHolder = getModuleStateHolder();
    return stateHolder.getRootModuleContext();
  }
View Full Code Here

Examples of org.impalaframework.module.holder.ModuleStateHolder

  }

  /* **************************** private methods ************************** */

  private ConfigurableApplicationContext internalGet() {
    ModuleStateHolder stateHolder = getModuleStateHolder();
    return stateHolder.getRootModuleContext();
  }
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateHolder

        Assert.notNull(classLoaderRegistryFactory, "classLoaderRegistryFactory cannot be null");
        Assert.notNull(moduleStateHolderFactory, "moduleStateHolderFactory cannot be null");
        Assert.notNull(serviceRegistryFactory, "serviceRegistryFactory cannot be null");
       
        ClassLoaderRegistry classLoaderRegistry = classLoaderRegistryFactory.newClassLoaderRegistry();
        ModuleStateHolder moduleStateHolder = moduleStateHolderFactory.newModuleStateHolder();
        ServiceRegistry serviceRegistry = serviceRegistryFactory.newServiceRegistry();
        Application application = new ImpalaApplication(classLoaderRegistry, moduleStateHolder, serviceRegistry, id);
   
        return application;
    }
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateHolder

       
        if (beanVisibilityType.equals(PARENT_ONLY)) {
            return parentApplicationContext;
        }
       
        ModuleStateHolder moduleStateHolder = application.getModuleStateHolder();
       
        if (beanVisibilityType.equals(PARENT_FIRST)) {
            GraphModuleStateHolder graphModuleStateHolder = ObjectUtils.cast(moduleStateHolder, GraphModuleStateHolder.class);
            return new ParentFirstBeanGraphInheritanceStrategy().getParentApplicationContext(graphModuleStateHolder, parentApplicationContext, definition);    
        }
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateHolder

        RootModuleDefinition moduleDefinition = new Provider().getModuleDefinition();

        TransitionSet transitions = facade.getModificationExtractorRegistry()
                .getModificationExtractor(ModificationExtractorType.STICKY).getTransitions(null, null, moduleDefinition);

        ModuleStateHolder moduleStateHolder = facade.getApplicationManager().getCurrentApplication().getModuleStateHolder();
        TransitionManager transitionManager = facade.getTransitionManager();
       
        ApplicationManager applicationManager = facade.getApplicationManager();
        Application application = applicationManager.getCurrentApplication();
       
View Full Code Here

Examples of org.impalaframework.module.spi.ModuleStateHolder

    // the superclass closes the modules
    final ServletContext servletContext = servlet.getServletContext();
    ModuleManagementFacade facade = ImpalaServletUtils.getModuleManagementFacade(servletContext);

    final String servletName = servlet.getServletName();
    ModuleStateHolder moduleStateHolder = facade.getModuleStateHolder();
   
    if (!initialized) {
     
      ModuleStateChangeNotifier moduleStateChangeNotifier = facade.getModuleStateChangeNotifier();
      moduleStateChangeNotifier.addListener(new ModuleStateChangeListener() {
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.