Examples of InterceptStrategy


Examples of org.apache.camel.spi.InterceptStrategy

    public Processor createProcessor(final RouteContext routeContext) throws Exception {
        // create the output processor
        output = createOutputsProcessor(routeContext);

        // add the output as a intercept strategy to the route context so its invoked on each processing step
        routeContext.getInterceptStrategies().add(new InterceptStrategy() {
            private Processor interceptedTarget;

            public Processor wrapProcessorInInterceptors(ProcessorDefinition processorDefinition, Processor target, Processor nextTarget) throws Exception {
                // prefer next target over taget as next target is the real target
                interceptedTarget = nextTarget != null ? nextTarget : target;
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

                    continue;
                } else {
                    // replace existing delayer as delayer have individual configuration
                    Iterator<InterceptStrategy> it = channel.getInterceptStrategies().iterator();
                    while (it.hasNext()) {
                        InterceptStrategy existing = it.next();
                        if (existing instanceof Delayer) {
                            it.remove();
                        }
                    }
                    // add the new correct delayer
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

                    continue;
                } else {
                    // replace existing delayer as delayer have individual configuration
                    Iterator<InterceptStrategy> it = channel.getInterceptStrategies().iterator();
                    while (it.hasNext()) {
                        InterceptStrategy existing = it.next();
                        if (existing instanceof Delayer) {
                            it.remove();
                        }
                    }
                    // add the new correct delayer
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

                    continue;
                } else {
                    // replace existing delayer as delayer have individual configuration
                    Iterator<InterceptStrategy> it = channel.getInterceptStrategies().iterator();
                    while (it.hasNext()) {
                        InterceptStrategy existing = it.next();
                        if (existing instanceof Delayer) {
                            it.remove();
                        }
                    }
                    // add the new correct delayer
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

    public Processor createProcessor(final RouteContext routeContext) throws Exception {
        // create the output processor
        output = createOutputsProcessor(routeContext);

        // add the output as a intercept strategy to the route context so its invoked on each processing step
        routeContext.getInterceptStrategies().add(new InterceptStrategy() {
            private Processor interceptedTarget;

            public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition definition,
                                                         Processor target, Processor nextTarget) throws Exception {
                // prefer next target over target as next target is the real target
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

                    continue;
                } else {
                    // replace existing delayer as delayer have individual configuration
                    Iterator<InterceptStrategy> it = channel.getInterceptStrategies().iterator();
                    while (it.hasNext()) {
                        InterceptStrategy existing = it.next();
                        if (existing instanceof Delayer) {
                            it.remove();
                        }
                    }
                    // add the new correct delayer
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

    public Processor createProcessor(final RouteContext routeContext) throws Exception {
        // create the output processor
        output = this.createChildProcessor(routeContext, true);

        // add the output as a intercept strategy to the route context so its invoked on each processing step
        routeContext.getInterceptStrategies().add(new InterceptStrategy() {
            private Processor interceptedTarget;

            public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition<?> definition,
                                                         Processor target, Processor nextTarget) throws Exception {
                // store the target we are intercepting
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

                    continue;
                } else {
                    // replace existing delayer as delayer have individual configuration
                    Iterator<InterceptStrategy> it = channel.getInterceptStrategies().iterator();
                    while (it.hasNext()) {
                        InterceptStrategy existing = it.next();
                        if (existing instanceof Delayer) {
                            it.remove();
                        }
                    }
                    // add the new correct delayer
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

    public Processor createProcessor(final RouteContext routeContext) throws Exception {
        // create the output processor
        output = createOutputsProcessor(routeContext);

        // add the output as a intercept strategy to the route context so its invoked on each processing step
        routeContext.getInterceptStrategies().add(new InterceptStrategy() {
            private Processor interceptedTarget;

            public Processor wrapProcessorInInterceptors(CamelContext context, ProcessorDefinition definition,
                                                         Processor target, Processor nextTarget) throws Exception {
                // prefer next target over taget as next target is the real target
View Full Code Here

Examples of org.apache.camel.spi.InterceptStrategy

        // add global interceptors
        Map<String, InterceptStrategy> strategies = getContext().getRegistry().lookupByType(InterceptStrategy.class);
        if (strategies != null && !strategies.isEmpty()) {
            for (String id : strategies.keySet()) {
                InterceptStrategy strategy = strategies.get(id);
                // do not add if already added, for instance a tracer that is also an InterceptStrategy class
                if (!getContext().getInterceptStrategies().contains(strategy)) {
                    LOG.info("Using custom intercept strategy with id: " + id + " and implementation: " + strategy);
                    getContext().addInterceptStrategy(strategy);
                }
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.