CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 WEB源码 JSP源码/Java

文件名称:SNMP_DEMO

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2012-10-24
  • 文件大小:
    301.16kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

本程序很简单总共涉及到三个类,分别是Receiver (Trap接收者), Sender (Trap发送者), Startup(启动类)。

Receiver会实例化Snmp,并设定好IP,端口及监听程序,之后调用listen方法开始接收Trap。这边main方法最后会起一个用户线程,是为了让接收程序一直处于运行状态。

Sender会实例化Snmp,并实例化CommunityTarget类,这个类描述了发送目标的IP,端口等信息。然后实例化一个PDU类,里面设定了OID和变量值,最后通过Snmp对象调用send方法来实现Trap的发送。这里程序会发10个Trap作为测试。

Startup用来启动整个测试程序,它会先调Receiver.main,再调Sender.main。

-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.
(系统自动生成,下载前可以参看下载内容)

下载文件列表

lib/SNMP4J.jar
src/com/broada/demo/snmp/Receiver.java
src/com/broada/demo/snmp/Sender.java
src/com/broada/demo/snmp/Startup.java
.classpath
.project
classes/com/broada/demo/snmp/Receiver$1.class
classes/com/broada/demo/snmp/Receiver$2.class
classes/com/broada/demo/snmp/Receiver.class
classes/com/broada/demo/snmp/Sender.class
classes/com/broada/demo/snmp/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

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com