Package org.apache.camel

Examples of org.apache.camel.CamelTemplate.sendBody()


        CamelTemplate template = bean.getTemplate();
        assertNotNull("Bean should have a CamelTemplate", template);

        endpoint.expectedBodiesReceived(body);

        template.sendBody(body);

        endpoint.assertIsSatisfied();
    }

}
View Full Code Here


        MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
        resultEndpoint.expectedMessageCount(1);
        resultEndpoint.expectedBodiesReceived(allBrothers);

        CamelTemplate template = new CamelTemplate(context);
        template.sendBody("direct:start", allNames);

        assertMockEndpointsSatisifed();
    }

    @Override
View Full Code Here

        // them and stores them to disk. The content of each file will be the test test we sent here.
        // The listener on the file component gets notfied when new files are found ...
        // that's it!
        // START SNIPPET: e5
        for(int i=0;i<10;i++){
            template.sendBody("test-jms:queue:test.queue","Test Message: "+i);
        }
        // END SNIPPET: e5
        Thread.sleep(1000);
        context.stop();
    }
View Full Code Here

        // The listener on the file component gets notfied when new files are
        // found ...
        // that's it!
        // START SNIPPET: e5
        for (int i = 0; i < 10; i++) {
            template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
        }
        // END SNIPPET: e5
        Thread.sleep(1000);
        context.stop();
    }
View Full Code Here

        LOG.info("Consuming from: " + destination);
        MessageConsumer consumer = session.createConsumer(destination);

        // now lets send a message
        template.sendBody("seda:consumer", expectedBody);

        Message message = consumer.receive(5000);
        Assert.assertNotNull("Should have received a message from destination: " + destination, message);

        TextMessage textMessage = assertIsInstanceOf(TextMessage.class, message);
View Full Code Here

        // test we sent here.
        // The listener on the file component gets notified when new files are
        // found ... that's it!
        // START SNIPPET: e5
        for (int i = 0; i < 10; i++) {
            template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
        }
        // END SNIPPET: e5
        Thread.sleep(1000);
        context.stop();
    }
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.