Package org.impalaframework.module.spi

Examples of org.impalaframework.module.spi.ModuleStateHolder


    super();
  }

  public ModuleOperationResult doExecute(ModuleOperationInput moduleOperationInput) {
   
    ModuleStateHolder moduleStateHolder = getModuleStateHolder();
    ModificationExtractorRegistry modificationExtractorRegistry = getModificationExtractorRegistry();
    ModificationExtractor calculator = modificationExtractorRegistry
        .getModificationExtractor(ModificationExtractorType.STRICT);
    RootModuleDefinition rootModuleDefinition = moduleStateHolder.getRootModuleDefinition();
   
    if (rootModuleDefinition != null) {
      logger.info("Shutting down application context");
      TransitionSet transitions = calculator.getTransitions(rootModuleDefinition, null);
      moduleStateHolder.processTransitions(transitions);
      return ModuleOperationResult.TRUE;
    }
    else {
      return ModuleOperationResult.FALSE;
    }
View Full Code Here


    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

  }

  public ModuleOperationResult doExecute(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

TOP

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

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.