Package org.apache.camel.processor

Examples of org.apache.camel.processor.Splitter


    }

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        Processor childProcessor = routeContext.createProcessor(this);
        return new Splitter(getExpression().createExpression(routeContext), childProcessor);
    }
View Full Code Here


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

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

            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        if (threadPoolExecutor == null) {
            threadPoolExecutor = new ThreadPoolExecutor(4, 16, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue());
        }
        return new Splitter(getExpression().createExpression(routeContext), childProcessor, aggregationStrategy,
                isParallelProcessing(), threadPoolExecutor, streaming);
    }
View Full Code Here

            if (!Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, processor);
                processor = interceptor.getProcessor();
            }
            Splitter p1 = assertIsInstanceOf(Splitter.class, processor);
        }
    }
View Full Code Here

        Processor childProcessor = routeContext.createProcessor(this);
        if (aggregationStrategy == null) {
            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        threadPoolExecutor = createThreadPoolExecutor(routeContext);
        return new Splitter(getExpression().createExpression(routeContext), childProcessor, aggregationStrategy,
                isParallelProcessing(), threadPoolExecutor, streaming);
    }
View Full Code Here

            if (!Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, processor);
                processor = interceptor.getProcessor();
            }
            Splitter p1 = assertIsInstanceOf(Splitter.class, processor);
        }
    }
View Full Code Here

            onPrepare = CamelContextHelper.mandatoryLookup(routeContext.getCamelContext(), onPrepareRef, Processor.class);
        }

        Expression exp = getExpression().createExpression(routeContext);

        Splitter answer = new Splitter(routeContext.getCamelContext(), exp, childProcessor, aggregationStrategy,
                            isParallelProcessing(), executorService, isStreaming(), isStopOnException(),
                            timeout, onPrepare, isShareUnitOfWork());
        if (isShareUnitOfWork()) {
            // wrap answer in a sub unit of work, since we share the unit of work
            return new SubUnitOfWorkProcessor(answer);
View Full Code Here

            // we are running in parallel so create a cached thread pool which grows/shrinks automatic
            executorService = routeContext.getCamelContext().getExecutorServiceStrategy().newDefaultThreadPool(this, "Split");
        }

        Expression exp = getExpression().createExpression(routeContext);
        return new Splitter(routeContext.getCamelContext(), exp, childProcessor, aggregationStrategy,
                            isParallelProcessing(), executorService, isStreaming(), isStopOnException());
    }
View Full Code Here

        if (getTimeout() > 0 && !isParallelProcessing()) {
            throw new IllegalArgumentException("Timeout is used but ParallelProcessing has not been enabled.");
        }

        Expression exp = getExpression().createExpression(routeContext);
        return new Splitter(routeContext.getCamelContext(), exp, childProcessor, aggregationStrategy,
                            isParallelProcessing(), executorService, isStreaming(), isStopOnException(), getTimeout());
    }
View Full Code Here

            aggregationStrategy = new UseLatestAggregationStrategy();
        }
        if (threadPoolExecutor == null) {
            threadPoolExecutor = new ThreadPoolExecutor(4, 16, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue());
        }
        return new Splitter(getExpression().createExpression(routeContext), childProcessor, aggregationStrategy,
                isParallelProcessing(), threadPoolExecutor);
    }
View Full Code Here

TOP

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

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.