Package org.apache.camel.processor

Examples of org.apache.camel.processor.PollEnricher


            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            // if no timeout then we should block, and there use a negative timeout
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here


            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), 0);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout, pollMultiple);
        } else {
            // if no timeout then we should block, and there use a negative timeout
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1, pollMultiple);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Endpoint endpoint = routeContext.resolveEndpoint(resourceUri);

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), 0);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), 0);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout, pollMultiple);
        } else {
            // if no timeout then we should block, and there use a negative timeout
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1, pollMultiple);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.mandatoryLookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Endpoint endpoint = routeContext.resolveEndpoint(resourceUri);

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), 0);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), 0);
        }

        if (aggregationStrategyRef != null) {
            aggregationStrategy = routeContext.lookup(aggregationStrategyRef, AggregationStrategy.class);
        }
        if (aggregationStrategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(aggregationStrategy);
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            // if no timeout then we should block, and there use a negative timeout
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1);
        }

        AggregationStrategy strategy = createAggregationStrategy(routeContext);
        if (strategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(strategy);
        }
        if (getAggregateOnException() != null) {
            enricher.setAggregateOnException(getAggregateOnException());
        }

        return enricher;
    }
View Full Code Here

            endpoint = routeContext.resolveEndpoint(resourceUri);
        } else {
            endpoint = routeContext.resolveEndpoint(null, resourceRef);
        }

        PollEnricher enricher;
        if (timeout != null) {
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), timeout);
        } else {
            // if no timeout then we should block, and there use a negative timeout
            enricher = new PollEnricher(null, endpoint.createPollingConsumer(), -1);
        }

        AggregationStrategy strategy = createAggregationStrategy(routeContext);
        if (strategy == null) {
            enricher.setDefaultAggregationStrategy();
        } else {
            enricher.setAggregationStrategy(strategy);
        }

        return enricher;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.PollEnricher

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.