Java examples for javax.management:MBean
get Attribute from MBeanServerConnection
//package com.java2s; import javax.management.MBeanServerConnection; import javax.management.ObjectName; public class Main { @SuppressWarnings("unchecked") public static <T> T getAttribute(MBeanServerConnection connection, ObjectName objectName, String attribute) throws Exception { return (T) connection.getAttribute(objectName, attribute); }/* w ww.j a v a 2 s .c om*/ }