BaseMonitorMBean mbean = MonitoringHelper.getMonitorMBean(objectName);
if (mbean == null) {
throw new InstanceNotFoundException();
}
ArrayList mbeanList = null;
if (monitoredObjectType != null) {
mbeanList = mbean.getChildList(monitoredObjectType);
} else {
mbeanList = new ArrayList();
mbeanList.add(mbean);
}
AttributeList result = new AttributeList();
Object val = mbean.invoke(operationName, params, null);
Attribute attr = new Attribute(operationName, val);
result.add(attr);
return result;