void processScanAttrib(Attributes attributes) {
String scanAttrib = attributes.getValue(SCAN_ATTR);
if (!OptionHelper.isEmpty(scanAttrib)
&& !"false".equalsIgnoreCase(scanAttrib)) {
ReconfigureOnChangeFilter rocf = new ReconfigureOnChangeFilter();
rocf.setContext(context);
String scanPeriodAttrib = attributes.getValue(SCAN_PERIOD_ATTR);
if (!OptionHelper.isEmpty(scanPeriodAttrib)) {
try {
Duration duration = Duration.valueOf(scanPeriodAttrib);
rocf.setRefreshPeriod(duration.getMilliseconds());
addInfo("Setting ReconfigureOnChangeFilter scanning period to "
+ duration);
} catch (NumberFormatException nfe) {
addError("Error while converting [" + scanAttrib + "] to long", nfe);
}
}
rocf.start();
LoggerContext lc = (LoggerContext) context;
addInfo("Adding ReconfigureOnChangeFilter as a turbo filter");
lc.addTurboFilter(rocf);
}
}