Package org.apache.camel.component.jmx

Examples of org.apache.camel.component.jmx.JMXUriBuilder


        Map<String, String> map = new HashMap<String, String>();
        map.put("context", "localhost/" + getContext().getName());
        map.put("type", "routes");
        map.put("name", "\"monitorRoute\"");

        JMXUriBuilder jmxUriBuilder = new JMXUriBuilder("platform")
            .withObjectDomain("org.apache.camel")
            .withObjectProperties(map)
            .withMonitorType("counter")
            .withObservedAttribute("ExchangesCompleted")
            .withInitThreshold(0)
            .withGranularityPeriod(500)
            .withOffset(1)
            .withDifferenceMode(false);

        log.info("jmxUri = {}", jmxUriBuilder.toString());

        from(jmxUriBuilder.toString())
                .routeId("jmxMonitor")
            .log("${body}")
            .to("mock:monitor");
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.jmx.JMXUriBuilder

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.