if (m.getType().equals("ganglia")) {
gangliaMap.put(componentName, getPropertyInfo(m));
} else if (m.getType().equals("jmx")) {
jmxMap.put(componentName, getPropertyInfo(m));
} else {
PropertyProvider pp = getDelegate(m);
if (null != pp)
additional.add(pp);
}
}
}
if (gangliaMap.size() > 0) {
GangliaPropertyProvider gpp = type.equals (Resource.Type.Component) ?
new GangliaComponentPropertyProvider(gangliaMap,
streamProvider, sslConfig, gangliaHostProvider,
clusterNamePropertyId, componentNamePropertyId) :
new GangliaHostComponentPropertyProvider(gangliaMap,
streamProvider, sslConfig, gangliaHostProvider,
clusterNamePropertyId, hostNamePropertyId, componentNamePropertyId);
gpp.populateResources(resources, request, predicate);
} else {
defaultGanglia.populateResources(resources, request, predicate);
}
if (jmxMap.size() > 0) {
JMXPropertyProvider jpp = new JMXPropertyProvider(jmxMap, streamProvider,
jmxHostProvider, clusterNamePropertyId, hostNamePropertyId,
componentNamePropertyId, jmxStatePropertyId, Collections.singleton("STARTED"));
jpp.populateResources(resources, request, predicate);
} else {
defaultJmx.populateResources(resources, request, predicate);
}
for (PropertyProvider pp : additional) {
pp.populateResources(resources, request, predicate);
}
} catch (Exception e) {
e.printStackTrace();
throw new SystemException("Error loading deferred resources", e);