Run the command to produce a list. The method returns a String[] of
length 0 or more.
BaseMonitorMBean mbean = MonitoringHelper.getMonitorMBean(objectName);
ArrayList childList = null;
if (actionCode == LIST_INSTANCE) {
childList = mbean.getChildList(
MonitoredObjectType.getMonitoredObjectType(monitoredObjectType));
} else {
childList = mbean.getChildList();
}
String[] result = new String[childList.size()];
Iterator iter = childList.iterator();
int i = 0;
while (iter.hasNext()) {
BaseMonitorMBean child = (BaseMonitorMBean)iter.next();
MonitoredObjectType childType =
MonitoredObjectType.getMonitoredObjectType(child.getNodeType());
if (actionCode == LIST_INSTANCE) {
result[i] = child.getNodeName();
} else {
if (childType.isSingleton()) {
result[i] = child.getNodeType();
} else {
result[i] = child.getNodeType() + "." + child.getNodeName();
}
}
i++;
}
return result;