MySnmpCrawler API

snmp.test.manager
Class MySnmpCrawlerTestManager

java.lang.Object
  |
  +--snmp.test.manager.MySnmpCrawlerTestManager
All Implemented Interfaces:
org.opennms.protocols.snmp.SnmpHandler

public class MySnmpCrawlerTestManager
extends java.lang.Object
implements org.opennms.protocols.snmp.SnmpHandler

This class sends customized Snmp-GetPDU or Snmp-SetPDU request to the SNMP agent to retrieve or set the object variables. This is used for testing only.

Version:
$Revision: 0.1 $ $Date: 2004/03/09 06:03:48 $
Author:
Scott Cheng

Field Summary
private  java.lang.String host
           
(package private)  org.opennms.protocols.snmp.SnmpSession m_session
           
private  int port
           
 
Constructor Summary
MySnmpCrawlerTestManager(java.lang.String host, int port)
           
 
Method Summary
private  void init()
           
static void main(java.lang.String[] args)
           
 void sendGetRequest()
           
 void sendSetRequest()
           
 void snmpInternalError(org.opennms.protocols.snmp.SnmpSession session, int err, org.opennms.protocols.snmp.SnmpSyntax pdu)
           
 void snmpReceivedPdu(org.opennms.protocols.snmp.SnmpSession session, int command, org.opennms.protocols.snmp.SnmpPduPacket pdu)
          Handles the received pdu.
 void snmpTimeoutError(org.opennms.protocols.snmp.SnmpSession session, org.opennms.protocols.snmp.SnmpSyntax pdu)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

host

private java.lang.String host

port

private int port

m_session

org.opennms.protocols.snmp.SnmpSession m_session
Constructor Detail

MySnmpCrawlerTestManager

public MySnmpCrawlerTestManager(java.lang.String host,
                                int port)
Method Detail

init

private void init()

sendGetRequest

public void sendGetRequest()
                    throws java.lang.Exception
java.lang.Exception

sendSetRequest

public void sendSetRequest()
                    throws java.lang.Exception
java.lang.Exception

snmpReceivedPdu

public void snmpReceivedPdu(org.opennms.protocols.snmp.SnmpSession session,
                            int command,
                            org.opennms.protocols.snmp.SnmpPduPacket pdu)
Handles the received pdu.

Specified by:
snmpReceivedPdu in interface org.opennms.protocols.snmp.SnmpHandler

snmpInternalError

public void snmpInternalError(org.opennms.protocols.snmp.SnmpSession session,
                              int err,
                              org.opennms.protocols.snmp.SnmpSyntax pdu)
Specified by:
snmpInternalError in interface org.opennms.protocols.snmp.SnmpHandler

snmpTimeoutError

public void snmpTimeoutError(org.opennms.protocols.snmp.SnmpSession session,
                             org.opennms.protocols.snmp.SnmpSyntax pdu)
Specified by:
snmpTimeoutError in interface org.opennms.protocols.snmp.SnmpHandler

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception

MySnmpCrawler API