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

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


    DefaultAmqpHeaderMapper mapper = new DefaultAmqpHeaderMapper();
    mapper.setRequestHeaderNames(properties.getRequestHeaderPattens(this.defaultRequestHeaderPatterns));
    mapper.setReplyHeaderNames(properties.getReplyHeaderPattens(this.defaultReplyHeaderPatterns));
    adapter.setHeaderMapper(mapper);
    adapter.afterPropertiesSet();
    Binding consumerBinding = Binding.forConsumer(name, adapter, moduleInputChannel, properties);
    addBinding(consumerBinding);
    ReceivingHandler convertingBridge = new ReceivingHandler();
    convertingBridge.setOutputChannel(moduleInputChannel);
    convertingBridge.setBeanName(name + ".convert.bridge");
    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(getBeanFactory());
    consumer.setBeanName("outbound." + name);
    consumer.afterPropertiesSet();
    Binding producerBinding = Binding.forProducer(name, moduleOutputChannel, consumer, properties);
    addBinding(producerBinding);
    producerBinding.start();
  }
View Full Code Here

      MessageHandler handler = new SendingHandler(messageHandler, topicName, accessor);
      EventDrivenConsumer consumer = new EventDrivenConsumer((SubscribableChannel) moduleOutputChannel, handler);
      consumer.setBeanFactory(this.getBeanFactory());
      consumer.setBeanName("outbound." + name);
      consumer.afterPropertiesSet();
      Binding producerBinding = Binding.forProducer(name, moduleOutputChannel, consumer, accessor);
      addBinding(producerBinding);
      producerBinding.start();

    }

  }
View Full Code Here

    ReceivingHandler rh = new ReceivingHandler(connector);
    rh.setOutputChannel(moduleInputChannel);
    EventDrivenConsumer edc = new EventDrivenConsumer(bridge, rh);
    edc.setBeanName("inbound." + name);

    Binding consumerBinding = Binding.forConsumer(name, edc, moduleInputChannel, accessor);
    addBinding(consumerBinding);
    consumerBinding.start();


    executor.submit(new Runnable() {

      @Override
View Full Code Here

    props.put("module.http.count", "0");
    props.put("module.log.count", "0");
    integrationSupport.deployStream(sd, props);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("direct", producerBinding.getType());
  }
View Full Code Here

    StreamDefinition sd = new StreamDefinition(streamName, getHttpLogStream());
    integrationSupport.streamDefinitionRepository().save(sd);
    integrationSupport.deployStream(sd, Collections.singletonMap("module.*.count", "0"));
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("direct", producerBinding.getType());
  }
View Full Code Here

    props.put("module.log.count", "0");
    props.put("module.log.criteria", "true");
    integrationSupport.deployStream(sd, props);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("direct", producerBinding.getType());
  }
View Full Code Here

    props.put("module.http.count", "0");
    props.put("module.log.count", "3");
    integrationSupport.deployStream(sd, props,/*allowIncomplete*/ true);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("producer", producerBinding.getType());
  }
View Full Code Here

    props.put("module.*.count", "0");
    props.put("module.log.count", "3");
    integrationSupport.deployStream(sd, props,/*allowIncomplete*/ true);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("producer", producerBinding.getType());
  }
View Full Code Here

    props.put("module.log.count", "0");
    props.put("module.log.criteria", "!false");
    integrationSupport.deployStream(sd, props);
    List<Binding> bindings = getMessageBusBindingsForStream(streamName);
    assertEquals(2, bindings.size());
    Binding consumerBinding = bindings.get(0);
    Binding producerBinding = bindings.get(1);
    assertEquals("consumer", consumerBinding.getType());
    assertEquals("producer", producerBinding.getType());
  }
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.