Examples of BodyInAggregatingStrategy


Examples of org.apache.camel.processor.BodyInAggregatingStrategy

                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .threads(10)
                    .beanRef("business")
                    .log("Country is ${in.header.country}")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionTimeout(2000L)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

            @Override
            public void configure() throws Exception {
                from("file://target/concurrent?sortBy=file:name")
                    .setHeader("id", simple("${file:onlyname.noext}"))
                    .beanRef("business")
                    .aggregate(header("country"), new BodyInAggregatingStrategy())
                        .completionTimeout(2000L)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

    public void testAggregateEagerCheckCompletion() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                    .aggregate(header("id"), new BodyInAggregatingStrategy())
                        .completionPredicate(body().isEqualTo("END")).eagerCheckCompletion()
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

    public void testAggregateNotEagerCheckCompletion() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                    .aggregate(header("id"), new BodyInAggregatingStrategy())
                        .completionPredicate(body().isEqualTo("A+B+END"))
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

    public void testAggregateClosedCorrelationKey() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .aggregate(header("id"), new BodyInAggregatingStrategy())
                        .completionSize(2).closeCorrelationKeyOnCompletion(1000)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

    public void testAggregateClosedCorrelationKeyCache() throws Exception {
        context.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
                        .aggregate(header("id"), new BodyInAggregatingStrategy())
                        .completionSize(2).closeCorrelationKeyOnCompletion(2)
                        .to("mock:result");
            }
        });
        context.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("A+B+END");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "predicate");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().contains("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionPredicate(complete);
        ap.setEagerCheckCompletion(false);
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("A+B+END");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "predicate");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();
        Predicate complete = body().isEqualTo("END");

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionPredicate(complete);
        ap.setEagerCheckCompletion(true);
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("A+B+C");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "size");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionSize(3);
        ap.setEagerCheckCompletion(eager);
        ap.start();
View Full Code Here

Examples of org.apache.camel.processor.BodyInAggregatingStrategy

        mock.expectedBodiesReceived("A+B+C");
        mock.expectedPropertyReceived(Exchange.AGGREGATED_COMPLETED_BY, "timeout");

        Processor done = new SendProcessor(context.getEndpoint("mock:result"));
        Expression corr = header("id");
        AggregationStrategy as = new BodyInAggregatingStrategy();

        AggregateProcessor ap = new AggregateProcessor(context, done, corr, as, executorService);
        ap.setCompletionTimeout(3000);
        ap.setEagerCheckCompletion(eager);
        ap.start();
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.