Package org.springframework.integration.channel

Examples of org.springframework.integration.channel.QueueChannel


        new ModuleDescriptor.Builder().setGroup(moduleGroupName).setIndex(moduleIndex).setModuleDefinition(
            ModuleDefinitions.dummy("testjob", ModuleType.job)).build());

    MessageChannel stepsOut = new DirectChannel();
    when(module.getComponent("stepExecutionRequests.output", MessageChannel.class)).thenReturn(stepsOut);
    PollableChannel stepResultsIn = new QueueChannel();
    when(module.getComponent("stepExecutionReplies.input", MessageChannel.class)).thenReturn(stepResultsIn);
    PollableChannel stepsIn = new QueueChannel();
    when(module.getComponent("stepExecutionRequests.input", MessageChannel.class)).thenReturn(stepsIn);
    MessageChannel stepResultsOut = new DirectChannel();
    when(module.getComponent("stepExecutionReplies.output", MessageChannel.class)).thenReturn(stepResultsOut);
    jobPartitionerPlugin.preProcessModule(module);
    jobPartitionerPlugin.postProcessModule(module);
    checkBusBound(messageBus);
    stepsOut.send(new GenericMessage<String>("foo"));
    Message<?> stepExecutionRequest = stepsIn.receive(10000);
    assertThat(stepExecutionRequest, hasPayload("foo"));
    stepResultsOut.send(MessageBuilder.withPayload("bar")
        .copyHeaders(stepExecutionRequest.getHeaders()) // replyTo
        .build());
    assertThat(stepResultsIn.receive(10000), hasPayload("bar"));
View Full Code Here

TOP

Related Classes of org.springframework.integration.channel.QueueChannel

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.