Package twitter4j.management

Examples of twitter4j.management.APIStatisticsOpenMBean


        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        ObjectName name = new ObjectName("twitter4j.mbean:type=APIStatistics");
        ObjectName name2 = new ObjectName("twitter4j.mbean:type=APIStatisticsOpenMBean");
        APIStatistics statsMBean = new APIStatistics(100);
        mbs.registerMBean(statsMBean, name);
        APIStatisticsOpenMBean openMBean = new APIStatisticsOpenMBean(statsMBean);
        mbs.registerMBean(openMBean, name2);

        for (int i = 0; i < 10; i++) {
            statsMBean.methodCalled("foo", 5, true);
            statsMBean.methodCalled("bar", 2, true);
View Full Code Here

TOP

Related Classes of twitter4j.management.APIStatisticsOpenMBean

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.