Description: This procedure is very simple involving a total of three categories, namely Receiver (Trap receiver), Sender (Trap sender), Startup (start class). Receiver will be instantiated Snmp, and set the IP, port and the listener, and then call the listen method to start receiving Trap. Here will play a main method of the last user thread is to allow the receiving program has been running. Sender will be instantiated Snmp, and instantiate CommunityTarget class that describes the transmission target IP, port and other information. PDU and then instantiate a class, which set the OID and variable values, and finally call the send method of the object through Snmp Trap sending to achieve. This program will send 10 Trap as a test. Startup to start the test program, it will be transferred Receiver.main, and then transferred Sender.main.
To Search:
File list (Check if you may need any files):
lib\SNMP4J.jar
src\com\broada\demo\snmp\Receiver.java
...\...\......\....\....\Sender.java
...\...\......\....\....\Startup.java
.classpath
.project
classes\com\broada\demo\snmp\Receiver$1.class
.......\...\......\....\....\Receiver$2.class
.......\...\......\....\....\Receiver.class
.......\...\......\....\....\Sender.class
.......\...\......\....\....\Startup.class
src\com\broada\demo\snmp
classes\com\broada\demo\snmp
src\com\broada\demo
classes\com\broada\demo
src\com\broada
classes\com\broada
src\com
classes\com
lib
src
classes