Package org.springframework.integration

Examples of org.springframework.integration.MessageChannel.send()


    @Test
    public void testSendingOneWayMessage() throws Exception {
        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
        resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);
        MessageChannel outputChannel = applicationContext.getBean("channelA", MessageChannel.class);
        outputChannel.send(new GenericMessage<Object>(MESSAGE_BODY));
        resultEndpoint.assertIsSatisfied();
    }

    @Test
    public void testSendingTwoWayMessage() throws Exception {
View Full Code Here


            public void handleMessage(Message<?> message) {
                String result = (String) message.getPayload();
                assertEquals("Get the wrong result", MESSAGE_BODY + " is processed",  result);               
            }           
        });
        requestChannel.send(message);
    }

    @Test
    public void testSendingTwoWayMessageWithMessageAddress() throws Exception {
View Full Code Here

            public void handleMessage(Message<?> message) {
                String result = (String) message.getPayload();
                assertEquals("Get the wrong result", MESSAGE_BODY + " is processed",  result);               
            }           
        });
        requestChannel.send(message);       
    }

    @Override
    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext("org/apache/camel/component/spring/integration/adapter/CamelTarget.xml");
View Full Code Here

            org.springframework.integration.Message siOutMessage =
                SpringIntegrationBinding.storeToSpringIntegrationMessage(exchange.getOut());

            // send the message to spring integration
            log.debug("Sending {} to ReplyChannel: {}", siOutMessage, reply);
            reply.send(siOutMessage);
        }       
    }  

}
View Full Code Here

            public void handleMessage(Message<?> message) {
                String result = (String) message.getPayload();
                assertEquals("Get the wrong result", MESSAGE_BODY + " is processed",  result);               
            }            
        });
        requestChannel.send(message);
    }

    public ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext("org/apache/camel/component/spring/integration/twoWayConsumer.xml");
    }
View Full Code Here

    public void testSendingOneWayMessage() throws Exception {
        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
        resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);

        MessageChannel outputChannel = applicationContext.getBean("outputChannel", MessageChannel.class);
        outputChannel.send(new GenericMessage<Object>(MESSAGE_BODY));

        resultEndpoint.assertIsSatisfied();
    }

    public ClassPathXmlApplicationContext createApplicationContext() {
View Full Code Here

            // send the message to spring integration
            if (log.isDebugEnabled()) {
                log.debug("Sending " + siOutMessage + " to ReplyChannel: " + reply);
            }
            reply.send(siOutMessage);
        }       
    }  

}
View Full Code Here

    @Test
    public void testSendingOneWayMessage() throws Exception {
        MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
        resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);
        MessageChannel outputChannel = (MessageChannel) applicationContext.getBean("channelA");
        outputChannel.send(new GenericMessage<Object>(MESSAGE_BODY));
        resultEndpoint.assertIsSatisfied();
    }

    @Test
    public void testSendingTwoWayMessage() throws Exception {
View Full Code Here

            public void handleMessage(Message<?> message) {
                String result = (String) message.getPayload();
                assertEquals("Get the wrong result", MESSAGE_BODY + " is processed",  result);               
            }           
        });
        requestChannel.send(message);
    }

    @Test
    public void testSendingTwoWayMessageWithMessageAddress() throws Exception {
View Full Code Here

            public void handleMessage(Message<?> message) {
                String result = (String) message.getPayload();
                assertEquals("Get the wrong result", MESSAGE_BODY + " is processed",  result);               
            }           
        });
        requestChannel.send(message);       
    }

    @Override
    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext("org/apache/camel/component/spring/integration/adapter/CamelTarget.xml");
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.