use of com.creditease.monitor.globalfilter.jee.UAVServerJEEController in project uavstack by uavorg.
the class InterceptFrameworkSupportor method start.
@Override
public void start() {
String listenersString = System.getProperty("com.creditease.uav.interceptlisteners");
if (null == listenersString) {
return;
}
String[] defaultListeners = listenersString.split(",");
// Step 1: install intercept listeners
InterceptSupport is = InterceptSupport.instance();
for (String listenerClass : defaultListeners) {
InterceptEventListener listener = is.createInterceptEventListener(listenerClass);
if (listener != null) {
if (this.logger.isLogEnabled()) {
this.logger.info("InterceptEventListener[" + listenerClass + "] load SUCCESS");
}
is.addEventListener(listener);
}
}
// Step 2: register UAVServerController
ServerVendor vendor = (ServerVendor) UAVServer.instance().getServerInfo(CaptureConstants.INFO_APPSERVER_VENDOR);
GlobalFilterDispatchListener listener = (GlobalFilterDispatchListener) InterceptSupport.instance().getEventListener(GlobalFilterDispatchListener.class);
// MSCP
if (vendor == ServerVendor.MSCP) {
// TODO
} else // JEE
{
listener.registerHandler(new UAVServerJEEController("UAVServerJEEController"));
}
// init MonitorUrlFilterMgr
MonitorUrlFilterMgr.getInstance().init();
}
Aggregations