Exemplo n.º 1
0
 /* (non-Javadoc)
  * @see org.springframework.xd.module.Plugin#processModule(org.springframework.xd.module.Module)
  */
 @Override
 public void processModule(Module module, String group, int index) {
   // TODO: Check if module started?
   Assert.notNull(module, "module cannot be null");
   Assert.isAssignable(IntegrationModule.class, module.getClass());
   String resourcePath = this.integrationModuleBasePath + "/" + module.getName() + ".xml";
   module.addComponents(new ClassPathResource(resourcePath));
   IntegrationModule integrationModule = (IntegrationModule) module;
   integrationModule.initializeModule();
   channelRegistry.inbound(
       integrationModule.getName() + ".input", integrationModule.getInputChannel());
   for (Entry<String, SubscribableChannel> entry :
       integrationModule.getOutputChannels().entrySet()) {
     channelRegistry.outbound(
         integrationModule.getName() + "." + entry.getKey(), entry.getValue());
   }
 }
Exemplo n.º 2
0
 @Override
 public void removeModule(Module module, String group, int index) {
   Assert.notNull(module, "module cannot be null");
   Assert.isAssignable(IntegrationModule.class, module.getClass());
   // TODO:
 }