Package org.apache.camel.processor

Examples of org.apache.camel.processor.RecipientList


        this.deadLetterFactory = deadLetterFactory;
    }

    public Processor getDefaultDeadLetterEndpoint() {
        if (defaultDeadLetterEndpoint == null) {
            defaultDeadLetterEndpoint = new RecipientList(getDefaultDeadLetterEndpointExpression());
        }
        return defaultDeadLetterEndpoint;
    }
View Full Code Here


        for (Route route : routes) {
            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "queue:a", key.getEndpointUri());
            Processor processor = getProcessorWithoutErrorHandler(route);

            RecipientList p1 = assertIsInstanceOf(RecipientList.class, processor);
        }
    }
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Expression expression = getExpression().createExpression(routeContext);

        RecipientList answer;
        if (delimiter != null) {
            answer = new RecipientList(expression, delimiter);
        } else {
            answer = new RecipientList(expression);
        }

        if (parallelProcessing != null) {
            answer.setParallelProcessing(isParallelProcessing());
        }
        if (stopOnException != null) {
            answer.setStopOnException(isStopOnException());
        }
       
        answer.setAggregationStrategy(createAggregationStrategy(routeContext));
        answer.setExecutorService(createExecutorService(routeContext));

        return answer;
    }
View Full Code Here

        if (method.getAnnotation(org.apache.camel.RecipientList.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.RecipientList.class).context())) {

            org.apache.camel.RecipientList annotation = method.getAnnotation(org.apache.camel.RecipientList.class);

            recipientList = new RecipientList(camelContext, annotation.delimiter());
            recipientList.setStopOnException(annotation.stopOnException());
            recipientList.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());
            recipientList.setParallelProcessing(annotation.parallelProcessing());
            recipientList.setStreaming(annotation.streaming());
            recipientList.setTimeout(annotation.timeout());
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Expression expression = getExpression().createExpression(routeContext);

        RecipientList answer;
        if (delimiter != null) {
            answer = new RecipientList(routeContext.getCamelContext(), expression, delimiter);
        } else {
            answer = new RecipientList(routeContext.getCamelContext(), expression);
        }
        answer.setAggregationStrategy(createAggregationStrategy(routeContext));
        answer.setParallelProcessing(isParallelProcessing());
        answer.setStreaming(isStreaming());  
        answer.setShareUnitOfWork(isShareUnitOfWork());
        if (onPrepareRef != null) {
            onPrepare = CamelContextHelper.mandatoryLookup(routeContext.getCamelContext(), onPrepareRef, Processor.class);
        }
        if (onPrepare != null) {
            answer.setOnPrepare(onPrepare);
        }
        if (stopOnException != null) {
            answer.setStopOnException(isStopOnException());
        }
        if (ignoreInvalidEndpoints != null) {
            answer.setIgnoreInvalidEndpoints(ignoreInvalidEndpoints);
        }
        if (getTimeout() != null) {
            answer.setTimeout(getTimeout());
        }
        executorService = ExecutorServiceHelper.getConfiguredExecutorService(routeContext, "RecipientList", this);
        if (isParallelProcessing() && executorService == null) {
            // we are running in parallel so create a cached thread pool which grows/shrinks automatic
            executorService = routeContext.getCamelContext().getExecutorServiceStrategy().newDefaultThreadPool(this, "RecipientList");
        }
        answer.setExecutorService(executorService);
        long timeout = getTimeout() != null ? getTimeout() : 0;
        if (timeout > 0 && !isParallelProcessing()) {
            throw new IllegalArgumentException("Timeout is used but ParallelProcessing has not been enabled.");
        }
View Full Code Here

        if (method.getAnnotation(org.apache.camel.RecipientList.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.RecipientList.class).context())) {

            org.apache.camel.RecipientList annotation = method.getAnnotation(org.apache.camel.RecipientList.class);

            recipientList = new RecipientList(camelContext, annotation.delimiter());
            recipientList.setStopOnException(annotation.stopOnException());
            recipientList.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());
            recipientList.setParallelProcessing(annotation.parallelProcessing());
            recipientList.setStreaming(annotation.streaming());
            recipientList.setTimeout(annotation.timeout());
View Full Code Here

        if (method.getAnnotation(org.apache.camel.RecipientList.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.RecipientList.class).context())) {

            org.apache.camel.RecipientList annotation = method.getAnnotation(org.apache.camel.RecipientList.class);

            recipientList = new RecipientList(camelContext, annotation.delimiter());
            recipientList.setStopOnException(annotation.stopOnException());
            recipientList.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());
            recipientList.setParallelProcessing(annotation.parallelProcessing());
            recipientList.setStreaming(annotation.streaming());
            recipientList.setTimeout(annotation.timeout());
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Expression expression = getExpression().createExpression(routeContext);

        RecipientList answer;
        if (delimiter != null) {
            answer = new RecipientList(routeContext.getCamelContext(), expression, delimiter);
        } else {
            answer = new RecipientList(routeContext.getCamelContext(), expression);
        }
        answer.setAggregationStrategy(createAggregationStrategy(routeContext));
        answer.setParallelProcessing(isParallelProcessing());
        answer.setStreaming(isStreaming());  
        if (stopOnException != null) {
            answer.setStopOnException(isStopOnException());
        }
        if (ignoreInvalidEndpoints != null) {
            answer.setIgnoreInvalidEndpoints(ignoreInvalidEndpoints);
        }
        if (getTimeout() != null) {
            answer.setTimeout(getTimeout());
        }
        executorService = ExecutorServiceHelper.getConfiguredExecutorService(routeContext, "RecipientList", this);
        if (isParallelProcessing() && executorService == null) {
            // we are running in parallel so create a cached thread pool which grows/shrinks automatic
            executorService = routeContext.getCamelContext().getExecutorServiceStrategy().newDefaultThreadPool(this, "RecipientList");
        }
        answer.setExecutorService(executorService);
        if (getTimeout() > 0 && !isParallelProcessing()) {
            throw new IllegalArgumentException("Timeout is used but ParallelProcessing has not been enabled.");
        }

        return answer;
View Full Code Here

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        final Expression expression = getExpression().createExpression(routeContext);

        RecipientList answer;
        if (delimiter != null) {
            answer = new RecipientList(routeContext.getCamelContext(), expression, delimiter);
        } else {
            answer = new RecipientList(routeContext.getCamelContext(), expression);
        }
        answer.setAggregationStrategy(createAggregationStrategy(routeContext));
        answer.setParallelProcessing(isParallelProcessing());
        answer.setStreaming(isStreaming());  
        answer.setShareUnitOfWork(isShareUnitOfWork());
        if (onPrepareRef != null) {
            onPrepare = CamelContextHelper.mandatoryLookup(routeContext.getCamelContext(), onPrepareRef, Processor.class);
        }
        if (onPrepare != null) {
            answer.setOnPrepare(onPrepare);
        }
        if (stopOnException != null) {
            answer.setStopOnException(isStopOnException());
        }
        if (ignoreInvalidEndpoints != null) {
            answer.setIgnoreInvalidEndpoints(ignoreInvalidEndpoints);
        }
        if (getTimeout() != null) {
            answer.setTimeout(getTimeout());
        }

        executorService = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "RecipientList", this, isParallelProcessing());
        answer.setExecutorService(executorService);
        long timeout = getTimeout() != null ? getTimeout() : 0;
        if (timeout > 0 && !isParallelProcessing()) {
            throw new IllegalArgumentException("Timeout is used but ParallelProcessing has not been enabled.");
        }
View Full Code Here

        if (method.getAnnotation(org.apache.camel.RecipientList.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.RecipientList.class).context())) {

            org.apache.camel.RecipientList annotation = method.getAnnotation(org.apache.camel.RecipientList.class);

            recipientList = new RecipientList(camelContext, annotation.delimiter());
            recipientList.setStopOnException(annotation.stopOnException());
            recipientList.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());
            recipientList.setParallelProcessing(annotation.parallelProcessing());
            recipientList.setStreaming(annotation.streaming());
            recipientList.setTimeout(annotation.timeout());
View Full Code Here

TOP

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

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.