Examples of requestBodyAndHeader()


Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        producer.start();

        Object out = producer.requestBody("Hello");
        assertEquals("Bye Bye World", out);

        out = producer.requestBodyAndHeader("Hello", "foo", 123);
        assertEquals("Bye Bye World", out);

        Map<String, Object> headers = new HashMap<String, Object>();
        out = producer.requestBodyAndHeaders("Hello", headers);
        assertEquals("Bye Bye World", out);
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        ProducerTemplate producer = new DefaultProducerTemplate(context, context.getEndpoint("direct:out"));

        Object out = producer.requestBody("Hello");
        assertEquals("Bye Bye World", out);

        out = producer.requestBodyAndHeader("Hello", "foo", 123);
        assertEquals("Bye Bye World", out);

        Map<String, Object> headers = new HashMap<String, Object>();
        out = producer.requestBodyAndHeaders("Hello", headers);
        assertEquals("Bye Bye World", out);
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        producer.start();

        Object out = producer.requestBody("Hello");
        assertEquals("Bye Bye World", out);

        out = producer.requestBodyAndHeader("Hello", "foo", 123);
        assertEquals("Bye Bye World", out);

        Map<String, Object> headers = new HashMap<String, Object>();
        out = producer.requestBodyAndHeaders("Hello", headers);
        assertEquals("Bye Bye World", out);
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        producer.start();

        Object out = producer.requestBody("Hello");
        assertEquals("Bye Bye World", out);

        out = producer.requestBodyAndHeader("Hello", "foo", 123);
        assertEquals("Bye Bye World", out);

        Map<String, Object> headers = new HashMap<String, Object>();
        out = producer.requestBodyAndHeaders("Hello", headers);
        assertEquals("Bye Bye World", out);
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

    public void testPutAndGet() throws InterruptedException {
        ProducerTemplate template = context.createProducerTemplate();
        template.sendBodyAndHeader("direct:put", "TEST1", KratiConstants.KEY, "1");
        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "3");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "3");
        assertEquals("TEST3", result);
    }

    @Test
    public void testPutDeleteAndGet() throws InterruptedException {
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

    public void testPutDeleteAndGet() throws InterruptedException {
        ProducerTemplate template = context.createProducerTemplate();
        template.sendBodyAndHeader("direct:put", "TEST1", KratiConstants.KEY, "1");
        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "4");
        template.requestBodyAndHeader("direct:delete", null, KratiConstants.KEY, "4");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "4");
        assertEquals(null, result);
    }

    @Test
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        ProducerTemplate template = context.createProducerTemplate();
        template.sendBodyAndHeader("direct:put", "TEST1", KratiConstants.KEY, "1");
        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "4");
        template.requestBodyAndHeader("direct:delete", null, KratiConstants.KEY, "4");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "4");
        assertEquals(null, result);
    }

    @Test
    public void testPutDeleteAllAndGet() throws InterruptedException {
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

    public void testPutDeleteAllAndGet() throws InterruptedException {
        ProducerTemplate template = context.createProducerTemplate();
        template.sendBodyAndHeader("direct:put", "TEST1", KratiConstants.KEY, "1");
        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "3");
        template.requestBodyAndHeader("direct:deleteall", null, KratiConstants.KEY, "3");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "1");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "2");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "3");
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        ProducerTemplate template = context.createProducerTemplate();
        template.sendBodyAndHeader("direct:put", "TEST1", KratiConstants.KEY, "1");
        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "3");
        template.requestBodyAndHeader("direct:deleteall", null, KratiConstants.KEY, "3");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "1");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "2");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "3");
        assertEquals(null, result);
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.requestBodyAndHeader()

        template.sendBodyAndHeader("direct:put", "TEST2", KratiConstants.KEY, "2");
        template.sendBodyAndHeader("direct:put", "TEST3", KratiConstants.KEY, "3");
        template.requestBodyAndHeader("direct:deleteall", null, KratiConstants.KEY, "3");
        Object result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "1");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "2");
        assertEquals(null, result);
        result = template.requestBodyAndHeader("direct:get", null, KratiConstants.KEY, "3");
        assertEquals(null, result);
    }
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.