Package org.apache.camel.util

Examples of org.apache.camel.util.RouteStatDump


                // the route must be part of the camel context
                String camelId = (String) mBeanServer.getAttribute(routeMBean, "CamelId");
                if (camelId != null && camelId.equals(camelContext.getName())) {

                    String xml = (String) mBeanServer.invoke(routeMBean, "dumpRouteStatsAsXml", new Object[]{Boolean.FALSE, Boolean.TRUE}, new String[]{"boolean", "boolean"});
                    RouteStatDump route = (RouteStatDump) unmarshaller.unmarshal(new StringReader(xml));

                    long count = route.getExchangesCompleted() + route.getExchangesFailed();
                    System.out.println(String.format(OUTPUT_FORMAT, route.getId(), count, route.getLastProcessingTime(), route.getDeltaProcessingTime(),
                            route.getMeanProcessingTime(), route.getMinProcessingTime(), route.getMaxProcessingTime(), route.getTotalProcessingTime(), route.getSelfProcessingTime()));

                    for (ProcessorStatDump ps : route.getProcessorStats()) {
                        // the self time is the total time of the processor itself
                        long selfTime = ps.getTotalProcessingTime();
                        count = ps.getExchangesCompleted() + ps.getExchangesFailed();
                        // indent route id with 2 spaces
                        System.out.println(String.format(OUTPUT_FORMAT, "  " + ps.getId(), count, ps.getLastProcessingTime(), ps.getDeltaProcessingTime(),
View Full Code Here


                // the route must be part of the camel context
                String camelId = (String) mBeanServer.getAttribute(routeMBean, "CamelId");
                if (camelId != null && camelId.equals(camelContext.getName())) {

                    String xml = (String) mBeanServer.invoke(routeMBean, "dumpRouteStatsAsXml", new Object[]{Boolean.FALSE, Boolean.TRUE}, new String[]{"boolean", "boolean"});
                    RouteStatDump route = (RouteStatDump) unmarshaller.unmarshal(new StringReader(xml));

                    long count = route.getExchangesCompleted() + route.getExchangesFailed();
                    System.out.println(String.format(OUTPUT_FORMAT, route.getId(), count, route.getLastProcessingTime(), route.getDeltaProcessingTime(),
                            route.getMeanProcessingTime(), route.getMinProcessingTime(), route.getMaxProcessingTime(), route.getTotalProcessingTime(), route.getSelfProcessingTime()));

                    for (ProcessorStatDump ps : route.getProcessorStats()) {
                        // the self time is the total time of the processor itself
                        long selfTime = ps.getTotalProcessingTime();
                        count = ps.getExchangesCompleted() + ps.getExchangesFailed();
                        // indent route id with 2 spaces
                        System.out.println(String.format(OUTPUT_FORMAT, "  " + ps.getId(), count, ps.getLastProcessingTime(), ps.getDeltaProcessingTime(),
View Full Code Here

                // the route must be part of the camel context
                String camelId = (String) mBeanServer.getAttribute(routeMBean, "CamelId");
                if (camelId != null && camelId.equals(camelContext.getName())) {

                    String xml = (String) mBeanServer.invoke(routeMBean, "dumpRouteStatsAsXml", new Object[]{Boolean.FALSE, Boolean.TRUE}, new String[]{"boolean", "boolean"});
                    RouteStatDump route = (RouteStatDump) unmarshaller.unmarshal(new StringReader(xml));

                    long count = route.getExchangesCompleted() + route.getExchangesFailed();
                    System.out.println(String.format(OUTPUT_FORMAT, route.getId(), count, route.getLastProcessingTime(), route.getDeltaProcessingTime(),
                            route.getMeanProcessingTime(), route.getMinProcessingTime(), route.getMaxProcessingTime(), route.getTotalProcessingTime(), route.getSelfProcessingTime()));

                    for (ProcessorStatDump ps : route.getProcessorStats()) {
                        // the self time is the total time of the processor itself
                        long selfTime = ps.getTotalProcessingTime();
                        count = ps.getExchangesCompleted() + ps.getExchangesFailed();
                        // indent route id with 2 spaces
                        System.out.println(String.format(OUTPUT_FORMAT, "  " + ps.getId(), count, ps.getLastProcessingTime(), ps.getDeltaProcessingTime(),
View Full Code Here

TOP

Related Classes of org.apache.camel.util.RouteStatDump

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.