43 lines
1011 B
Java
43 lines
1011 B
Java
package com.nms.thread;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.Map;
|
|
|
|
import nis.nms.util.BaseAction;
|
|
import nis.nms.util.ConnectionOracle;
|
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
import com.nms.thread.service.NmsReportService;
|
|
|
|
public class NmsPortThread implements Runnable {
|
|
|
|
private Logger logger = Logger.getLogger(NmsPortThread.class);
|
|
|
|
@Override
|
|
public void run() {
|
|
Date now = new Date();
|
|
Long nowLong = now.getTime();
|
|
Integer interval = null;
|
|
try {
|
|
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.interval"));
|
|
} catch (Exception e) {
|
|
interval = 300;
|
|
}
|
|
|
|
ConnectionOracle connection = null;
|
|
try {
|
|
connection = ConnectionOracle.getConnection();
|
|
NmsReportService service = new NmsReportService(connection);
|
|
//ArrayList<Map<String, String>> nmsRuleInfo = service.getNmsPortInfo(nowLong, nowLong-interval);
|
|
} catch (Exception e) {
|
|
logger.error(e);
|
|
} finally {
|
|
if (connection != null) {
|
|
connection.close();
|
|
}
|
|
}
|
|
}
|
|
}
|