org.opennms.netmgt.snmp
Class SnmpWalker

java.lang.Object
  extended by org.opennms.netmgt.snmp.SnmpWalker

public abstract class SnmpWalker
extends java.lang.Object


Nested Class Summary
protected static class SnmpWalker.WalkerPduBuilder
           
 
Constructor Summary
protected SnmpWalker(java.net.InetAddress address, java.lang.String name, int maxVarsPerPdu, CollectionTracker tracker)
           
 
Method Summary
protected  void buildAndSendNextPdu()
           
protected abstract  void close()
           
protected abstract  SnmpWalker.WalkerPduBuilder createPduBuilder(int maxVarsPerPdu)
           
 boolean failed()
           Returns the success or failure code for collection of the data.
protected  java.net.InetAddress getAddress()
           
 int getMaxVarsPerPdu()
           
 java.lang.String getName()
           
protected  void handleAuthError(java.lang.String msg)
           
protected  void handleDone()
           
protected  void handleError(java.lang.String msg)
           
protected  void handleFatalError(java.lang.Throwable e)
           
protected  void handleTimeout(java.lang.String msg)
           
protected  boolean processErrors(int errorStatus, int errorIndex)
           
protected  void processResponse(SnmpObjId receivedOid, SnmpValue val)
           
protected abstract  void sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder)
           
protected  void setAddress(java.net.InetAddress address)
           
 void start()
           
 void waitFor()
           
 void waitFor(long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpWalker

protected SnmpWalker(java.net.InetAddress address,
                     java.lang.String name,
                     int maxVarsPerPdu,
                     CollectionTracker tracker)
Method Detail

createPduBuilder

protected abstract SnmpWalker.WalkerPduBuilder createPduBuilder(int maxVarsPerPdu)

start

public void start()

getMaxVarsPerPdu

public int getMaxVarsPerPdu()

buildAndSendNextPdu

protected void buildAndSendNextPdu()
                            throws java.io.IOException
Throws:
java.io.IOException

sendNextPdu

protected abstract void sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder)
                             throws java.io.IOException
Throws:
java.io.IOException

failed

public boolean failed()

Returns the success or failure code for collection of the data.


handleFatalError

protected void handleFatalError(java.lang.Throwable e)

handleAuthError

protected void handleAuthError(java.lang.String msg)

close

protected abstract void close()
                       throws java.io.IOException
Throws:
java.io.IOException

getName

public java.lang.String getName()

handleDone

protected void handleDone()

handleError

protected void handleError(java.lang.String msg)

handleTimeout

protected void handleTimeout(java.lang.String msg)

waitFor

public void waitFor()
             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitFor

public void waitFor(long timeout)
             throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

processErrors

protected boolean processErrors(int errorStatus,
                                int errorIndex)

processResponse

protected void processResponse(SnmpObjId receivedOid,
                               SnmpValue val)

setAddress

protected void setAddress(java.net.InetAddress address)

getAddress

protected java.net.InetAddress getAddress()


Copyright © 2007. All Rights Reserved.