MainSnmpV2Receiver.java
1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.sitech.ismp.coll.i2000.alarm;
import org.apache.log4j.Logger;
public class MainSnmpV2Receiver {
static Logger logger = Logger.getLogger("I2000");
public MainSnmpV2Receiver() {
}
public static void start() {
// *************************//
logger.info("heartbeat alarm run!");
HeartbeatAlarm ha = new HeartbeatAlarm();
ha.start();
// *************************//
String host = Param.getString("host");
int port = Param.getInt("port");
logger.info("host :" + host + " port :" + port);
V2TrapReceiver v2 = new V2TrapReceiver(host, port);
v2.listen();
}
public static void main(String[] args) {
// *************************//
logger.info("heartbeat alarm run!");
HeartbeatAlarm ha = new HeartbeatAlarm();
ha.start();
// *************************//
String host = Param.getString("host");
int port = Param.getInt("port");
logger.info("host :" + host + " port :" + port);
V2TrapReceiver v2 = new V2TrapReceiver(host, port);
v2.listen();
}
}