Package org.springframework.xd.dirt.integration.bus

Examples of org.springframework.xd.dirt.integration.bus.Binding


    props.put("module.filter.count", "0");
    props.put("module.log.count", "1");
    integrationSupport.deployStream(sd, props);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(4, bindings.size());
    Binding logConsumerBinding = bindings.get(0);
    Binding filterConsumerBinding = bindings.get(1);
    Binding filterProducerBinding = bindings.get(2);
    Binding httpProducerBinding = bindings.get(3);
    assertEquals("inbound." + streamName + ".1", logConsumerBinding.getEndpoint().getComponentName());
    assertEquals("consumer", logConsumerBinding.getType());
    assertEquals("inbound." + streamName + ".0", filterConsumerBinding.getEndpoint().getComponentName());
    assertEquals("consumer", filterConsumerBinding.getType());
    assertEquals("outbound." + streamName + ".1", filterProducerBinding.getEndpoint().getComponentName());
    assertEquals("producer", filterProducerBinding.getType());
    assertEquals("outbound." + streamName + ".0", httpProducerBinding.getEndpoint().getComponentName());
    assertEquals("direct", httpProducerBinding.getType());
  }
View Full Code Here


    bridgeToModuleChannel.setBeanName(channelName + ".bridge");
    MessageChannel bridgeInputChannel = addRetryIfNeeded(channelName, bridgeToModuleChannel, properties);
    adapter.setOutputChannel(bridgeInputChannel);
    adapter.setBeanName("inbound." + bindingName);
    adapter.afterPropertiesSet();
    Binding consumerBinding = Binding.forConsumer(bindingName, adapter, moduleInputChannel, properties);
    addBinding(consumerBinding);
    ReceivingHandler convertingBridge = new ReceivingHandler();
    convertingBridge.setOutputChannel(moduleInputChannel);
    convertingBridge.setBeanName(channelName + ".bridge.handler");
    convertingBridge.afterPropertiesSet();
    bridgeToModuleChannel.subscribe(convertingBridge);
    consumerBinding.start();
  }
View Full Code Here

    MessageHandler handler = new SendingHandler(delegate, replyTo, properties);
    EventDrivenConsumer consumer = new EventDrivenConsumer((SubscribableChannel) moduleOutputChannel, handler);
    consumer.setBeanFactory(this.getBeanFactory());
    consumer.setBeanName("outbound." + name);
    consumer.afterPropertiesSet();
    Binding producerBinding = Binding.forProducer(name, moduleOutputChannel, consumer, properties);
    addBinding(producerBinding);
    producerBinding.start();
  }
View Full Code Here

TOP

Related Classes of org.springframework.xd.dirt.integration.bus.Binding

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.