if (mons != null) {
selected_monitors = mons;
monitors.clear();
for (String string : mons) {
try {
ResourceMonitorIfc resMon =
(ResourceMonitorIfc) Class.forName(string).newInstance();
String monJid = getJID() + "/" + resMon.getClass().getSimpleName();
resMon.init(monJid, warning_treshold, this);
monitors.put(monJid, resMon);
log.config("Loaded resource monitor: " + monJid);
} catch (Exception ex) {
log.log(Level.SEVERE,
"Can't instantiate resource monitor: " + string, ex);