Package org.apache.camel.processor.interceptor

Examples of org.apache.camel.processor.interceptor.StreamCachingInterceptor


        // there should be no error handlers and no stream cache
        for (Route route : context.getRoutes()) {
            if (route instanceof EventDrivenConsumerRoute) {
                EventDrivenConsumerRoute consumer = (EventDrivenConsumerRoute) route;

                StreamCachingInterceptor cache = findProceesorInRoute(consumer.getProcessor(), StreamCachingInterceptor.class);
                assertNull("There should be no stream cache found: " + cache, cache);

                ErrorHandler error = findProceesorInRoute(consumer.getProcessor(), ErrorHandler.class);
                assertNull("There should be no error handler found: " + error, error);
            }
View Full Code Here


     * Enable stream caching for this route
     *
     * @return the builder
     */
    public RouteDefinition streamCaching() {
        addInterceptor(new StreamCachingInterceptor());
        return this;
    }
View Full Code Here

   
    @Override
    protected Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target) throws Exception {       
        //CAMEL-1193 now we need to wrap the multicast processor with the interceptors
        //Current we wrap the StreamCachingInterceptor by default
        return super.wrapProcessorInInterceptors(routeContext, new StreamCachingInterceptor(target));       
    }
View Full Code Here

    }

    @Override
    protected Processor wrapProcessorInInterceptors(RouteContext routeContext, Processor target) throws Exception {
        // No need to wrap me in interceptors as they are all applied directly to my children
        return new StreamCachingInterceptor(target);
    }
View Full Code Here

    /**
     * Enable stream caching for this Route.
     */
    public RouteType streamCaching() {
        addInterceptor(new StreamCachingInterceptor());
        return this;
    }
View Full Code Here

   
    /**
     * Enable stream caching for all routes being defined in the same RouteBuilder after this call.
     */
    public void streamCaching() {
        routeCollection.intercept(new StreamCachingInterceptor());
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.processor.interceptor.StreamCachingInterceptor

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.