Package org.apache.camel.model

Examples of org.apache.camel.model.AggregateDefinition


                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).completionTimeout(2000L).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setCompletionTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here


                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).completionTimeout(2000L).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setCompletionTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition processor) {
       
        AggregateDefinition aggregate = (AggregateDefinition)processor;
        buffer.append(".").append(aggregate.getShortName()).append("()");

        ExpressionRenderer.render(buffer, aggregate.getExpression());

        if (aggregate.getCompletionTimeout() != null) {
            buffer.append(".completionTimeout(").append(aggregate.getCompletionTimeout());
            buffer.append(aggregate.getCompletionTimeout() < 1000L ? "L)" : ")");
        }
        if (aggregate.getCompletionSize() != null) {
            buffer.append(".completionSize(").append(aggregate.getCompletionSize()).append(")");
        }

        if (aggregate.isGroupExchanges() != null && aggregate.isGroupExchanges()) {
            buffer.append(".groupExchanges()");
        }
    }
View Full Code Here

                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).completionTimeout(2000L).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setCompletionTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition processor) {
       
        AggregateDefinition aggregate = (AggregateDefinition)processor;
        buffer.append(".").append(aggregate.getShortName()).append("()");

        ExpressionRenderer.render(buffer, aggregate.getExpression());

        if (aggregate.getBatchTimeout() != null) {
            buffer.append(".batchTimeout(").append(aggregate.getBatchTimeout());
            buffer.append(aggregate.getBatchTimeout() < 1000L ? "L)" : ")");
        }
        if (aggregate.getBatchSize() != null) {
            buffer.append(".batchSize(").append(aggregate.getBatchSize()).append(")");
        }

        if (aggregate.getGroupExchanges() != null && aggregate.getGroupExchanges()) {
            buffer.append(".groupExchanges()");
        }
    }
View Full Code Here

        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition<?> processor) {
       
        AggregateDefinition aggregate = (AggregateDefinition)processor;
        buffer.append(".").append(aggregate.getShortName()).append("()");

        ExpressionRenderer.render(buffer, aggregate.getExpression());

        if (aggregate.getBatchTimeout() != null) {
            buffer.append(".batchTimeout(").append(aggregate.getBatchTimeout());
            buffer.append(aggregate.getBatchTimeout() < 1000L ? "L)" : ")");
        }
        if (aggregate.getBatchSize() != null) {
            buffer.append(".batchSize(").append(aggregate.getBatchSize()).append(")");
        }

        if (aggregate.getGroupExchanges() != null && aggregate.getGroupExchanges()) {
            buffer.append(".groupExchanges()");
        }
    }
View Full Code Here

                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).completionTimeout(2000L).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setCompletionTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

        // Utility class, no public or protected default constructor
    }   

    public static void render(StringBuilder buffer, ProcessorDefinition<?> processor) {
       
        AggregateDefinition aggregate = (AggregateDefinition)processor;
        buffer.append(".").append(aggregate.getShortName()).append("()");

        ExpressionRenderer.render(buffer, aggregate.getExpression());

        if (aggregate.getBatchTimeout() != null) {
            buffer.append(".batchTimeout(").append(aggregate.getBatchTimeout());
            buffer.append(aggregate.getBatchTimeout() < 1000L ? "L)" : ")");
        }
        if (aggregate.getBatchSize() != null) {
            buffer.append(".batchSize(").append(aggregate.getBatchSize()).append(")");
        }

        if (aggregate.getGroupExchanges() != null && aggregate.getGroupExchanges()) {
            buffer.append(".groupExchanges()");
        }
    }
View Full Code Here

                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setBatchTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

                        .aggregate(header(SURNAME_HEADER),
                                surnameAggregator).completionTimeout(2000L).setHeader(TYPE_HEADER,
                        constant(BROTHERS_TYPE)).to("direct:joinBrothers");

                // Join all brothers lists and remove surname and type headers
                AggregateDefinition agg =
                        from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                brothersAggregator);

                agg.setCompletionTimeout(2000L);
                agg.removeHeader(SURNAME_HEADER)
                        .removeHeader(TYPE_HEADER)
                        .to("mock:result");
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.model.AggregateDefinition

Copyright © 2018 www.massapicom. 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.