Package org.springframework.xd.dirt.test.source

Examples of org.springframework.xd.dirt.test.source.NamedChannelSource.sendPayload()


    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(integrationSupport.messageBus()).createNamedChannelSource("queue:mqttsource");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(integrationSupport.messageBus()).createNamedChannelSink("queue:mqttsink");

    Thread.sleep(1000);
    source.sendPayload("hello");
    Object result = sink.receivePayload(1000);

    assertEquals("hello", result);
    source.unbind();
    sink.unbind();
View Full Code Here


    MessageBus messageBus = integrationSupport.messageBus();

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("ping");
    String result = (String) sink.receivePayload(5000);
    assertEquals(expected, result);

    source.unbind();
    sink.unbind();
View Full Code Here

    MessageBus messageBus = integrationSupport.messageBus();

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(messageBus).createNamedChannelSource("queue:producer");
    NamedChannelSink sink = new SingleNodeNamedChannelSinkFactory(messageBus).createNamedChannelSink("queue:consumer");

    source.sendPayload("hello");
    String result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);

    source.sendPayload("a");
    result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
View Full Code Here

    source.sendPayload("hello");
    String result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertEquals("HELLO", result);

    source.sendPayload("a");
    result = (String) sink.receivePayload(RECEIVE_TIMEOUT);
    assertNull(result);

    source.unbind();
    sink.unbind();
View Full Code Here

    NamedChannelSink bar1sink = sinkFactory.createNamedChannelSink("queue:bar1");
    NamedChannelSink bar2sink = sinkFactory.createNamedChannelSink("queue:bar2");
    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(TOPIC_FOO);

    source.sendPayload("hello");

    final Object bar1 = bar1sink.receivePayload(10000);
    final Object bar2 = bar2sink.receivePayload(10000);
    assertEquals("hello", bar1);
    assertEquals("hello", bar2);
View Full Code Here

    NamedChannelSink foosink = sinkFactory.createNamedChannelSink(QUEUE_FOO);
    NamedChannelSink barsink = sinkFactory.createNamedChannelSink(QUEUE_BAR);

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(QUEUE_ROUTE);

    source.sendPayload("a");
    source.sendPayload("b");

    final Object fooPayload = foosink.receivePayload(10000);
    final Object barPayload = barsink.receivePayload(10000);
View Full Code Here

    NamedChannelSink barsink = sinkFactory.createNamedChannelSink(QUEUE_BAR);

    NamedChannelSource source = new SingleNodeNamedChannelSourceFactory(bus).createNamedChannelSource(QUEUE_ROUTE);

    source.sendPayload("a");
    source.sendPayload("b");

    final Object fooPayload = foosink.receivePayload(10000);
    final Object barPayload = barsink.receivePayload(10000);

    assertEquals("a", fooPayload);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.