Package org.apache.camel.processor

Examples of org.apache.camel.processor.DelegateAsyncProcessor


    private final class MyIntercepStrategy implements InterceptStrategy {
        private volatile boolean invoked;

        public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition, Processor target, Processor nextTarget) throws Exception {
            return new DelegateAsyncProcessor(target) {
                protected boolean processNext(Exchange exchange, AsyncCallback callback) {
                    invoked = true;
                    return super.processNext(exchange, callback);
                }
            };
View Full Code Here


* @version
*/
public class NoErrorHandlerBuilder extends ErrorHandlerBuilderSupport {

    public Processor createErrorHandler(RouteContext routeContext, Processor processor) {
        return new DelegateAsyncProcessor(processor) {
            @Override
            public boolean process(final Exchange exchange, final AsyncCallback callback) {
                return super.process(exchange, new AsyncCallback() {
                    @Override
                    public void done(boolean doneSync) {
View Full Code Here

        this.debugger = debugger;
    }

    public Processor wrapProcessorInInterceptors(final CamelContext context, final ProcessorDefinition<?> definition,
                                                 final Processor target, final Processor nextTarget) throws Exception {
        return new DelegateAsyncProcessor(target) {
            @Override
            public boolean process(final Exchange exchange, final AsyncCallback callback) {
                debugger.beforeProcess(exchange, target, definition);
                final StopWatch watch = new StopWatch();
View Full Code Here

        // ensure its wrapped in a Service so we can manage it from eg. JMX
        // (a Processor must be a Service to be enlisted in JMX)
        if (!(answer instanceof Service)) {
            if (answer instanceof AsyncProcessor) {
                // the processor is async by nature so use the async delegate
                answer = new DelegateAsyncProcessor(answer);
            } else {
                // the processor is sync by nature so use the sync delegate
                answer = new DelegateSyncProcessor(answer);
            }
        }
View Full Code Here

        this.debugger = debugger;
    }

    public Processor wrapProcessorInInterceptors(final CamelContext context, final ProcessorDefinition<?> definition,
                                                 final Processor target, final Processor nextTarget) throws Exception {
        return new DelegateAsyncProcessor(target) {
            @Override
            public boolean process(final Exchange exchange, final AsyncCallback callback) {
                debugger.beforeProcess(exchange, target, definition);
                final StopWatch watch = new StopWatch();
View Full Code Here

TOP

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

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.