private void loadHttpFilters (String filters, List<HttpFilter> ls,
Config config, HttpProxy proxy) {
String[] filterArray = filters.split (",");
for (String className : filterArray) {
Logger log = proxy.getLogger ();
try {
className = className.trim ();
Class<? extends HttpFilter> cls =
Class.forName (className).asSubclass (HttpFilter.class);
HttpFilter hf = cls.newInstance ();
hf.setup (log, config.getProperties (className));
ls.add (hf);
} catch (ClassNotFoundException ex) {
log.logError ("Could not load class: '" +
className + "' " + ex);
} catch (InstantiationException ex) {
log.logError ("Could not instansiate: '" +
className + "' " + ex);
} catch (IllegalAccessException ex) {
log.logError ("Could not access: '" +
className + "' " + ex);
}
}
}