Package org.apache.camel.processor

Examples of org.apache.camel.processor.DelegateAsyncProcessor


        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


            // use DelegateAsyncProcessor to ensure the interceptor works well with the asynchronous routing
            // engine in Camel.
            // The target is the processor to continue routing to, which we must provide
            // in the constructor of the DelegateAsyncProcessor
            return new DelegateAsyncProcessor(target) {
                @Override
                public boolean process(Exchange exchange, AsyncCallback callback) {
                    // we just want to count number of interceptions
                    counter.incrementAndGet();
View Full Code Here

        private static int count;

        public Processor wrapProcessorInInterceptors(final CamelContext context, final ProcessorDefinition<?> definition,
                                                     final Processor target, final Processor nextTarget) throws Exception {

            return new DelegateAsyncProcessor(new Processor() {

                public void process(Exchange exchange) throws Exception {
                    // we just count number of interceptions
                    count++;
                    LOG.info("I am the container wide interceptor. Intercepted total count: " + count);
View Full Code Here

            // use DelegateAsyncProcessor to ensure the interceptor works well with the asynchronous routing
            // engine in Camel.
            // The target is the processor to continue routing to, which we must provide
            // in the constructor of the DelegateAsyncProcessor
            return new DelegateAsyncProcessor(target) {
                @Override
                public boolean process(Exchange exchange, AsyncCallback callback) {
                    // we just want to count number of interceptions
                    counter.incrementAndGet();
View Full Code Here

    private static 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

    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

            // use DelegateAsyncProcessor to ensure the interceptor works well with the asynchronous routing
            // engine in Camel.
            // The target is the processor to continue routing to, which we must provide
            // in the constructor of the DelegateAsyncProcessor
            return new DelegateAsyncProcessor(target) {
                @Override
                public boolean process(Exchange exchange, AsyncCallback callback) {
                    // we just want to count number of interceptions
                    counter.incrementAndGet();
View Full Code Here

        private static int count;

        public Processor wrapProcessorInInterceptors(final CamelContext context, final ProcessorDefinition<?> definition,
                                                     final Processor target, final Processor nextTarget) throws Exception {

            return new DelegateAsyncProcessor(new Processor() {

                public void process(Exchange exchange) throws Exception {
                    // we just count number of interceptions
                    count++;
                    LOG.info("I am the container wide interceptor. Intercepted total count: " + count);
View Full Code Here

    private static 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) {
                public boolean process(Exchange exchange, AsyncCallback callback) {
                    invoked = true;
                    return processor.process(exchange, callback);
                }
            };
View Full Code Here

            // use DelegateAsyncProcessor to ensure the interceptor works well with the asynchronous routing
            // engine in Camel.
            // The target is the processor to continue routing to, which we must provide
            // in the constructor of the DelegateAsyncProcessor
            return new DelegateAsyncProcessor(target) {
                @Override
                public boolean process(Exchange exchange, AsyncCallback callback) {
                    // we just want to count number of interceptions
                    counter.incrementAndGet();
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.