Examples of sendBodyAndHeaders()


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

            ProducerTemplate template = context.createProducerTemplate();
            if (e != null) {
                template.send("direct:in", e);
            } else {
                template.sendBodyAndHeaders("direct:in", payload, headers);
            }
            assertMockEndpointsSatisfied();
            return mock.getReceivedExchanges().get(0);
        } finally {
            context.stop();
View Full Code Here

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

    @ManagedOperation(description = "Send body and headers (in only)")
    public void sendBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws Exception {
        ProducerTemplate template = context.createProducerTemplate();
        try {
            template.sendBodyAndHeaders(endpointUri, body, headers);
        } finally {
            template.stop();
        }
    }
View Full Code Here

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

    @ManagedOperation(description = "Send body and headers (in only)")
    public void sendBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws Exception {
        ProducerTemplate template = context.createProducerTemplate();
        try {
            template.sendBodyAndHeaders(endpointUri, body, headers);
        } finally {
            template.stop();
        }
    }
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_ROW_ID.asHeader(), key[0]);
            headers.put(HbaseAttribute.HBASE_FAMILY.asHeader(), family[0]);
            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(), column[0]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(), body[0]);
            headers.put(HBaseContats.OPERATION, HBaseContats.PUT);
            template.sendBodyAndHeaders("direct:start", null, headers);

            Configuration configuration = hbaseUtil.getHBaseAdmin().getConfiguration();
            HTable table = new HTable(configuration, DEFAULTTABLE.getBytes());
            Get get = new Get(key[0].getBytes());
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(3), column[0]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(3), body[2]);

            headers.put(HBaseContats.OPERATION, HBaseContats.PUT);

            template.sendBodyAndHeaders("direct:start", null, headers);

            Configuration configuration = hbaseUtil.getHBaseAdmin().getConfiguration();
            HTable bar = new HTable(configuration, DEFAULTTABLE.getBytes());
            Get get = new Get(Bytes.toBytes((Integer) key[0]));
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(3), column[0]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(3), body[2]);

            headers.put(HBaseContats.OPERATION, HBaseContats.PUT);

            template.sendBodyAndHeaders("direct:start", null, headers);

            Configuration configuration = hbaseUtil.getHBaseAdmin().getConfiguration();
            HTable bar = new HTable(configuration, DEFAULTTABLE.getBytes());
            Get get = new Get(key[0].getBytes());
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(2), column[1]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(2), body[1]);

            headers.put(HBaseContats.OPERATION, HBaseContats.PUT);

            template.sendBodyAndHeaders("direct:start", null, headers);

            Configuration configuration = hbaseUtil.getHBaseAdmin().getConfiguration();
            HTable bar = new HTable(configuration, DEFAULTTABLE.getBytes());
            Get get = new Get(key[0].getBytes());
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(3), column[0]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(3), body[2]);

            headers.put(HBaseContats.OPERATION, HBaseContats.PUT);

            template.sendBodyAndHeaders("direct:start", null, headers);

            MockEndpoint mockEndpoint = getMockEndpoint("mock:result");
            mockEndpoint.expectedMessageCount(3);
            mockEndpoint.assertIsSatisfied(10000);
            Thread.sleep(10000);
View Full Code Here

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

    }

    public void sendBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers) throws Exception {
        ProducerTemplate template = context.createProducerTemplate();
        try {
            template.sendBodyAndHeaders(endpointUri, body, headers);
        } finally {
            template.stop();
        }
    }
View Full Code Here

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

            headers.put(HbaseAttribute.HBASE_QUALIFIER.asHeader(3), column[0]);
            headers.put(HbaseAttribute.HBASE_VALUE.asHeader(3), body[2]);

            headers.put(HBaseConstants.OPERATION, HBaseConstants.PUT);

            template.sendBodyAndHeaders("direct:start", null, headers);

            Configuration configuration = hbaseUtil.getHBaseAdmin().getConfiguration();
            HTable bar = new HTable(configuration, PERSON_TABLE.getBytes());
            Get get = new Get(Bytes.toBytes((Integer) key[0]));
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.