use of com.tremolosecurity.proxy.filter.HttpFilterConfig in project OpenUnison by TremoloSecurity.
the class UrlComp method init.
/**
* Initializes a URL from the XML configuration. Multiple calls perform no actions.
* @throws Exception
*/
public void init() throws Exception {
if (!this.inited) {
this.lowerCasePath = url.getUri().toLowerCase();
this.filterChain = new ArrayList<HttpFilter>();
List<FilterConfigType> filterCfgs = url.getFilterChain().getFilter();
if (filterCfgs != null) {
Iterator<FilterConfigType> it = filterCfgs.iterator();
while (it.hasNext()) {
FilterConfigType cfg = it.next();
HttpFilter filter = (HttpFilter) Class.forName(cfg.getClazz()).newInstance();
this.filterChain.add(filter);
filter.initFilter(new HttpFilterConfig(cfg, this.cfg));
}
}
this.inited = true;
}
}
Aggregations