/**
* Get MBean Attribute from Mbean Server
*
* @param jmxServerConnection
* @param name
* @param attribute
* @return The type
* @throws Exception
*/
protected String getMBeanAttributeType(MBeanServerConnection jmxServerConnection, String name, String attribute)
throws Exception {
ObjectName oname = new ObjectName(name);
String mattrType = null;
MBeanInfo minfo = jmxServerConnection.getMBeanInfo(oname);
MBeanAttributeInfo attrs[] = minfo.getAttributes();
for (int i = 0; mattrType == null && i < attrs.length; i++) {
if (attribute.equals(attrs[i].getName()))
mattrType = attrs[i].getType();
}
return mattrType;
}
JMXAccessorSetTask.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:lazycat
作者:
评论列表
文章目录