Examples of CounterJMX


Examples of org.apache.sirona.counters.jmx.CounterJMX

                                    + "counter:role=" + escapeJmx(key.getRole().getName())
                                    + ",name=" + escapeJmx(key.getName()));
                            DefaultCounter.class.cast(counter).setJmx(objectName);

                            if (!server.isRegistered(objectName)) {
                                server.registerMBean(new CounterJMX(counter), objectName);
                            }
                        } catch (final Exception e) {
                            // no-op
                        }
                    }
View Full Code Here

Examples of org.apache.sirona.counters.jmx.CounterJMX

            Configuration.CONFIG_PROPERTY_PREFIX
                + "counter:role=" + counter.getKey().getRole().getName()
                + ",name=" + counter.getKey().getName());
        counter.setJmx(objectName);

        server.registerMBean(new CounterJMX(counter), objectName);
        try {
            assertTrue(server.isRegistered(objectName));
            assertEquals(3., server.getAttribute(objectName, "Max"));
            assertEquals("def", server.getAttribute(objectName, "Name"));
            assertEquals("jdbc", server.getAttribute(objectName, "Role"));
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.