Package org.springframework.xd.module

Examples of org.springframework.xd.module.SimpleModuleDefinition


  private Module createSimpleModule(ModuleDescriptor moduleDescriptor, ModuleOptions moduleOptions,
      ModuleDeploymentProperties deploymentProperties) {
    if (log.isInfoEnabled()) {
      log.info("creating simple module " + moduleDescriptor);
    }
    SimpleModuleDefinition definition = (SimpleModuleDefinition) moduleDescriptor.getModuleDefinition();
    Resource moduleLocation = resourceLoader.getResource(definition.getLocation());
    ClassLoader moduleClassLoader = ModuleUtils.createModuleClassLoader(moduleLocation, this.parentClassLoader);

    Class<? extends SimpleModule> moduleClass = determineModuleClass((SimpleModuleDefinition) moduleDescriptor.getModuleDefinition(), moduleClassLoader);
    Assert.notNull(moduleClass,
        String.format("cannot create module '%s:%s' from module definition.", moduleDescriptor.getModuleName(),
View Full Code Here


      // Not an actual type name, skip
      return;
    }
    ModuleDefinition found = ModuleDefinitions.simple(name, type, "file:" + canonicalPath + (isDir ? "/" : ""));
    if (holder.contains(found)) {
      SimpleModuleDefinition one = (SimpleModuleDefinition) found;
      SimpleModuleDefinition two = (SimpleModuleDefinition) holder.get(holder.indexOf(found));
      throw new IllegalStateException(String.format("Duplicate module definitions for '%s:%s' found at '%s' " +
              "and" +
              " " +
              "'%s'",
          found.getType(), found.getName(), one.getLocation(), two.getLocation()));
    }
    else {
      holder.add(found);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.module.SimpleModuleDefinition

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.