Examples of DelegateProcessor


Examples of org.apache.camel.processor.DelegateProcessor

            assertSendToProcessor(endpoints.get(1), "seda:b");
        }
    }

    protected List<Route> buildRouteWithInterceptor() throws Exception {
        interceptor1 = new DelegateProcessor() {
        };

        // START SNIPPET: e7
        interceptor2 = new MyInterceptorProcessor();
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, processor);
                processor = interceptor.getProcessor();
            }

            DelegateProcessor p1 = assertIsInstanceOf(DelegateProcessor.class, processor);
            processor = p1.getProcessor();

            DelegateProcessor p2 = assertIsInstanceOf(DelegateProcessor.class, processor);

            assertSendTo(p2.getProcessor(), "seda:d");
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

    public void testNoStreamCaching() throws Exception {
        List<InterceptorType> interceptors = new LinkedList<InterceptorType>();
        InterceptorRef streamCache = new InterceptorRef(new StreamCachingInterceptor());
        interceptors.add(streamCache);
        interceptors.add(new InterceptorRef(new DelegateProcessor()));
        StreamCachingInterceptor.noStreamCaching(interceptors);
        assertEquals(1, interceptors.size());
        assertFalse(interceptors.contains(streamCache));
    }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

    public ErrorHandlerBuilder copy() {
        return new DummyErrorHandlerBuilder(beanName);
    }

    public Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception {
        return new DelegateProcessor(processor) {
            @Override
            public void process(Exchange exchange) throws Exception {
                exchange.setProperty(PROPERTY_NAME, beanName);
                super.process(exchange);
            }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

            assertSendToProcessor(endpoints.get(1), "seda:b");
        }
    }

    protected List<Route> buildRouteWithInterceptor() throws Exception {
        interceptor1 = new DelegateProcessor() {
        };

        // START SNIPPET: e7
        interceptor2 = new MyInterceptorProcessor();
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, processor);
                processor = interceptor.getProcessor();
            }

            DelegateProcessor p1 = assertIsInstanceOf(DelegateProcessor.class, processor);
            processor = p1.getProcessor();

            DelegateProcessor p2 = assertIsInstanceOf(DelegateProcessor.class, processor);

            assertSendTo(p2.getProcessor(), "seda:d");
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

        }
    }
   
    protected Processor unwrapDelegateProcessor(Processor processor) {
        if (processor instanceof DelegateProcessor) {
            DelegateProcessor delegate = (DelegateProcessor) processor;
            return delegate.getProcessor();
        } else {
            return processor;
        }
    }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

        return "interceptor";
    }

    @Override
    public Processor createProcessor(RouteContext routeContext) throws Exception {
        DelegateProcessor processor = createInterceptor(routeContext);
        Processor child = createOutputsProcessor(routeContext);
        processor.setProcessor(child);
        return processor;
    }
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

    public void testRouteWithInterceptor() throws Exception {

        CamelContext container = new DefaultCamelContext();
        final ArrayList<String> order = new ArrayList<String>();

        final DelegateProcessor interceptor1 = new DelegateProcessor() {
            @Override
            public void process(Exchange exchange) throws Exception {
                order.add("START:1");
                super.process(exchange);
                order.add("END:1");
            }
        };
        final DelegateProcessor interceptor2 = new DelegateProcessor() {
            @Override
            public void process(Exchange exchange) throws Exception {
                order.add("START:2");
                super.process(exchange);
                order.add("END:2");
View Full Code Here

Examples of org.apache.camel.processor.DelegateProcessor

     * @deprecated Please use <a href="http://activemq.apache.org/camel/tracer.html>Tracer Support</a>
     * instead. Will be removed in Camel 2.0.
     */
    public Type trace(String category) {
        final Log log = LogFactory.getLog(category);
        return intercept(new DelegateProcessor() {
            @Override
            public void process(Exchange exchange) throws Exception {
                log.trace(exchange);
                processNext(exchange);
            }
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.