Examples of InstrumentationProcessor


Examples of org.apache.camel.management.InstrumentationProcessor

        for (Route route : routes) {
            Endpoint key = route.getEndpoint();
            assertEquals("From endpoint", "seda:a", key.getEndpointUri());
            Processor processor = getProcessorWithoutErrorHandler(route);
            if (!Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, processor);
                processor = interceptor.getProcessor();
            }
            IdempotentConsumer idempotentConsumer = assertIsInstanceOf(IdempotentConsumer.class, processor);

            assertEquals("messageIdExpression", "header(myMessageId)", idempotentConsumer
                .getMessageIdExpression().toString());
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                                                                          processor);
                Processor outputProcessor = loggingProcessor.getOutput();
                if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                    sendProcessor = assertIsInstanceOf(SendProcessor.class, outputProcessor);
                } else {
                    InstrumentationProcessor interceptor =
                        assertIsInstanceOf(InstrumentationProcessor.class, outputProcessor);
                    sendProcessor = assertIsInstanceOf(SendProcessor.class, interceptor.getProcessor());
                }
            } else {
                assertEquals("From endpoint", "seda:b", endpointUri);
                DeadLetterChannel deadLetterChannel = assertIsInstanceOf(DeadLetterChannel.class, processor);
                Processor outputProcessor = deadLetterChannel.getOutput();
                if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                    sendProcessor = assertIsInstanceOf(SendProcessor.class, outputProcessor);
                } else {
                    InstrumentationProcessor interceptor =
                        assertIsInstanceOf(InstrumentationProcessor.class, outputProcessor);
                    sendProcessor = assertIsInstanceOf(SendProcessor.class, interceptor.getProcessor());
                }
            }
            log.debug("For " + endpointUri + " using: " + sendProcessor);
        }
    }
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

            LoggingErrorHandler loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class, processor);

            if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
                processor = loggingProcessor.getOutput();
            } else {
                InstrumentationProcessor interceptor =
                    assertIsInstanceOf(InstrumentationProcessor.class, loggingProcessor.getOutput());
                processor = interceptor.getProcessor();
            }

            FilterProcessor filterProcessor = assertIsInstanceOf(FilterProcessor.class, processor);
            SendProcessor sendProcessor = assertIsInstanceOf(SendProcessor.class, filterProcessor.getProcessor());
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                target = routePolicyProcessor;
            }

            // and wrap it by a instrumentation processor that is to be used for performance stats
            // for this particular route
            InstrumentationProcessor wrapper = new InstrumentationProcessor();
            wrapper.setType("route");
            wrapper.setProcessor(target);

            // and create the route that wraps the UoW
            Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
            // create the route id
            String routeId = route.idOrCreate(getCamelContext().getNodeIdFactory());
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                target = unitOfWorkProcessor;
            }

            // and wrap it by a instrumentation processor that is to be used for performance stats
            // for this particular route
            InstrumentationProcessor wrapper = new InstrumentationProcessor();
            wrapper.setType("route");
            wrapper.setProcessor(target);

            // and create the route that wraps the UoW
            Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
            // create the route id
            String routeId = route.idOrCreate(getCamelContext().getNodeIdFactory());
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

        Processor processor = unwrap(consumerRoute.getProcessor());

        DeadLetterChannel deadLetterChannel = assertIsInstanceOf(DeadLetterChannel.class, processor);
        Processor outputProcessor = deadLetterChannel.getOutput();
        if (!Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
            InstrumentationProcessor interceptor =
                assertIsInstanceOf(InstrumentationProcessor.class, outputProcessor);
            outputProcessor = interceptor.getProcessor();
        }

        // we are not interested in any other delegate processors in the route (e.g. stream caching)
        while (outputProcessor instanceof DelegateProcessor) {
            outputProcessor = ((DelegateProcessor) outputProcessor).getProcessor();
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                target = routePolicyProcessor;
            }

            // and wrap it by a instrumentation processor that is to be used for performance stats
            // for this particular route
            InstrumentationProcessor wrapper = new InstrumentationProcessor();
            wrapper.setType("route");
            wrapper.setProcessor(target);

            // and create the route that wraps the UoW
            Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
            edcr.getProperties().put(Route.ID_PROPERTY, route.idOrCreate(getCamelContext().getNodeIdFactory()));
            edcr.getProperties().put(Route.PARENT_PROPERTY, Integer.toHexString(route.hashCode()));
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

            // get the 3rd last as its the bean
            Processor last = list.get(list.size() - 3).getProcessor();

            // wrapped by JMX
            if (last instanceof InstrumentationProcessor) {
                InstrumentationProcessor ip = (InstrumentationProcessor) last;
                last = ip.getProcessor();
            }

            // set error message
            exchange.getOut().setFault(true);
            exchange.getOut().setBody("Failed at: " + last.toString());
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                target = routePolicyProcessor;
            }

            // and wrap it by a instrumentation processor that is to be used for performance stats
            // for this particular route
            InstrumentationProcessor wrapper = new InstrumentationProcessor();
            wrapper.setType("route");
            wrapper.setProcessor(target);

            // and create the route that wraps the UoW
            Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
            edcr.getProperties().put(Route.ID_PROPERTY, route.idOrCreate(getCamelContext().getNodeIdFactory()));
            edcr.getProperties().put(Route.PARENT_PROPERTY, Integer.toHexString(route.hashCode()));
View Full Code Here

Examples of org.apache.camel.management.InstrumentationProcessor

                target = routePolicyProcessor;
            }

            // and wrap it by a instrumentation processor that is to be used for performance stats
            // for this particular route
            InstrumentationProcessor wrapper = new InstrumentationProcessor();
            wrapper.setType("route");
            wrapper.setProcessor(target);

            // and create the route that wraps the UoW
            Route edcr = new EventDrivenConsumerRoute(this, getEndpoint(), wrapper);
            edcr.getProperties().put(Route.ID_PROPERTY, route.idOrCreate(getCamelContext().getNodeIdFactory()));
            edcr.getProperties().put(Route.PARENT_PROPERTY, Integer.toHexString(route.hashCode()));
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.