Package org.apache.camel

Examples of org.apache.camel.Processor.process()


        if (processor != null) {
            try {
                // must process the incoming exchange and NOT the copy as the idea
                // is the end user can manipulate the exchange
                processor.process(exchange);
            } catch (Exception e) {
                // set exceptions on exchange so we can throw exceptions to simulate errors
                exchange.setException(e);
            }
        }
View Full Code Here


        Processor processor = getProcessor();
        BeanInfo beanInfo = beanHolder.getBeanInfo();

        // do we have a custom adapter for this POJO to a Processor
        if (processor != null) {
            processor.process(exchange);
            return;
        }
        Message in = exchange.getIn();

        if (in.getHeader(Exchange.BEAN_MULTI_PARAMETER_ARRAY) == null) {
View Full Code Here

            try {
                if (LOG.isTraceEnabled()) {
                    // this does the actual processing so log at trace level
                    LOG.trace("Processing exchangeId: " + nextExchange.getExchangeId() + " >>> " + nextExchange);
                }
                processor.process(nextExchange);
            } catch (Exception e) {
                nextExchange.setException(e);
            }

            // check for error if so we should break out
View Full Code Here

        Processor processor = processors.get(getReceivedCounter()) != null
                ? processors.get(getReceivedCounter()) : defaultProcessor;

        if (processor != null) {
            try {
                processor.process(exchange);
            } catch (Exception e) {
                // set exceptions on exchange so we can throw exceptions to simulate errors
                exchange.setException(e);
            }
        }
View Full Code Here

        if (!isExplicitMethod && processor != null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Using a custom adapter as bean invocation: " + processor);
            }
            try {
                processor.process(exchange);
            } catch (Throwable e) {
                exchange.setException(e);
            }
            callback.done(true);
            return true;
View Full Code Here

    }

    public void process(Exchange exchange) throws Exception {
        Processor processor = getOutput();
        if (processor != null && continueProcessing(exchange)) {
            processor.process(exchange);
        }
    }

    /**
     * Strategy to determine if we should continue processing the {@link Exchange}.
View Full Code Here

        Processor processor = processors.get(getReceivedCounter()) != null
                ? processors.get(getReceivedCounter()) : defaultProcessor;

        if (processor != null) {
            processor.process(exchange);
        }
    }

    protected void waitForCompleteLatch() throws InterruptedException {
        if (latch == null) {
View Full Code Here

            updateNewExchange(subExchange, total, pairs);

            completion.submit(new Callable<Exchange>() {
                public Exchange call() throws Exception {
                    try {
                        producer.process(subExchange);
                    } catch (Exception e) {
                        subExchange.setException(e);
                    }
                    if (LOG.isTraceEnabled()) {
                        LOG.trace("Parallel processing complete for exchange: " + subExchange);
View Full Code Here

            Processor producer = pair.getProcessor();
            Exchange subExchange = pair.getExchange();
            updateNewExchange(subExchange, total, pairs);

            // process it sequentially
            producer.process(subExchange);
            if (LOG.isTraceEnabled()) {
                LOG.trace("Sequientel processing complete for number " + total + " exchange: " + subExchange);
            }

            if (aggregationStrategy != null) {
View Full Code Here

        Processor processor = getProcessor();
        if (!isExplicitMethod && processor != null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Using a custom adapter as bean invocation: " + processor);
            }
            processor.process(exchange);
            return;
        }

        Message in = exchange.getIn();
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.