use of com.creditease.agent.feature.monitoragent.MDFListenServer in project uavstack by uavorg.
the class MonitorAgent method startMDSListenServer.
private void startMDSListenServer() {
boolean isStartMDFListener = DataConvertHelper.toBoolean(this.getConfigManager().getFeatureConfiguration(this.feature, "http.enable"), false);
if (isStartMDFListener == true) {
// start MDFListenServer
int port = Integer.parseInt(this.getConfigManager().getFeatureConfiguration(this.feature, "http.port"));
int backlog = Integer.parseInt(this.getConfigManager().getFeatureConfiguration(this.feature, "http.backlog"));
int core = Integer.parseInt(this.getConfigManager().getFeatureConfiguration(this.feature, "http.core"));
int max = Integer.parseInt(this.getConfigManager().getFeatureConfiguration(this.feature, "http.max"));
int bqsize = Integer.parseInt(this.getConfigManager().getFeatureConfiguration(this.feature, "http.bqsize"));
mdfListenServer = new MDFListenServer("MDFListenServer", this.feature, "mdfhandlers");
@SuppressWarnings({ "rawtypes", "unchecked" }) ThreadPoolExecutor exe = new ThreadPoolExecutor(core, max, 30000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(bqsize));
mdfListenServer.start(exe, port, backlog);
if (log.isTraceEnable()) {
log.info(this, "MDFListenServer started");
}
}
}
Aggregations