if (inst != null && inst instanceof IOManager) {
ioManager = (IOManager)inst;
ioManager.setDetector(detector);
// get optional 'iohandler' child elements and populate the
// ioManager with the instances
ElementIterator iohElements = DomUtil.getChildren(el, "iohandler", null);
while (iohElements.hasNext()) {
Element iohEl = iohElements.nextElement();
inst = buildClassFromConfig(iohEl);
if (inst != null && inst instanceof IOHandler) {
ioManager.addIOHandler((IOHandler) inst);
} else {
log.warn("Resource configuration: the handler is not a valid IOHandler.");
}
}
} else {
log.warn("Resource configuration: 'iomanager' does not define a valid IOManager.");
}
} else {
log.warn("Resource configuration: 'iomanager' element is missing.");
}
// propertymanager config entry
el = DomUtil.getChildElement(config, "propertymanager", null);
if (el != null) {
Object inst = buildClassFromConfig(el);
if (inst != null && inst instanceof PropertyManager) {
propManager = (PropertyManager)inst;
// get optional 'iohandler' child elements and populate the
// ioManager with the instances
ElementIterator iohElements = DomUtil.getChildren(el, "propertyhandler", null);
while (iohElements.hasNext()) {
Element iohEl = iohElements.nextElement();
inst = buildClassFromConfig(iohEl);
if (inst != null && inst instanceof PropertyHandler) {
propManager.addPropertyHandler((PropertyHandler) inst);
} else {
log.warn("Resource configuration: the handler is not a valid PropertyHandler.");