Package org.apache.camel

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


       
        EventHelper.notifyExchangeSending(exchange.getContext(), resourceExchange, destination);
        // record timing for sending the exchange using the producer
        final StopWatch watch = new StopWatch();
        AsyncProcessor ap = AsyncProcessorConverterHelper.convert(producer);
        boolean sync = ap.process(resourceExchange, new AsyncCallback() {
            public void done(boolean doneSync) {
                // we only have to handle async completion of the routing slip
                if (doneSync) {
                    return;
                }
View Full Code Here


            internalProcessor.addAdvice(new CamelInternalProcessor.SubUnitOfWorkProcessorAdvice());
            target = internalProcessor;
        }

        // now let the multicast process the exchange
        return target.process(exchange, callback);
    }

    protected Endpoint resolveEndpoint(Exchange exchange, Object recipient) {
        // trim strings as end users might have added spaces between separators
        if (recipient instanceof String) {
View Full Code Here

                EventHelper.notifyExchangeSending(exchange.getContext(), exchange, producer.getEndpoint());
            }
            // let the prepared process it, remember to begin the exchange pair
            AsyncProcessor async = AsyncProcessorConverterHelper.convert(processor);
            pair.begin();
            sync = async.process(exchange, new AsyncCallback() {
                public void done(boolean doneSync) {
                    // we are done with the exchange pair
                    pair.done();

                    // okay we are done, so notify the exchange was sent
View Full Code Here

        if (exchange.getUnitOfWork() != null) {
            exchange.getUnitOfWork().pushRouteContext(routeContext);
        }

        AsyncProcessor async = AsyncProcessorTypeConverter.convert(processor);
        boolean sync = async.process(exchange, new AsyncCallback() {
            public void done(boolean doneSync) {
                // pop the route context we just used
                if (exchange.getUnitOfWork() != null) {
                    exchange.getUnitOfWork().popRouteContext();
                }
View Full Code Here

                continue;
            }

            // okay we found a filter or its the otherwise we are processing
            AsyncProcessor async = AsyncProcessorConverterHelper.convert(processor);
            return async.process(exchange, choiceCallback);
        }

        // when no filter matches and there is no otherwise, then just continue
        choiceCallback.done(true);
        return true;
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.