use of org.eweb4j.config.EWeb4JListener in project eweb4j-framework by laiweiwei.
the class EWebFilter method destroy.
/**
* 退出Filter
*/
public void destroy() {
String info = "eweb4j filter destroy invoke...\n";
LogFactory.getMVCLogger(EWebFilter.class).debug(info);
//CallBack after destroy
ConfigBean cb = (ConfigBean) SingleBeanCache.get(ConfigBean.class.getName());
Listeners listeners = cb.getListeners();
if (listeners != null && listeners.getListener() != null && !listeners.getListener().isEmpty()) {
for (ListenerBean lb : listeners.getListener()) {
String clazz = lb.getClazz();
try {
EWeb4JListener listener = (EWeb4JListener) CommonUtil.loadClass(clazz).newInstance();
listener.onDestroy();
LogFactory.getMVCLogger(EWebFilter.class).debug("listener->" + listener + ".onDestroy execute...");
} catch (Throwable e) {
e.printStackTrace();
}
}
}
}
Aggregations