Package org.opennms.netmgt.snmp.mock
Class MockSnmpWalker
- java.lang.Object
-
- org.opennms.netmgt.snmp.SnmpWalker
-
- org.opennms.netmgt.snmp.mock.MockSnmpWalker
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class MockSnmpWalker extends SnmpWalker
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.snmp.SnmpWalker
SnmpWalker.WalkerPduBuilder
-
-
Constructor Summary
Constructors Constructor Description MockSnmpWalker(SnmpAgentAddress agentAddress, int snmpVersion, PropertyOidContainer container, java.lang.String name, CollectionTracker tracker, int maxVarsPerPdu, int maxRetries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
buildAndSendNextPdu()
void
close()
protected SnmpWalker.WalkerPduBuilder
createPduBuilder(int maxVarsPerPdu)
protected void
handleAuthError(java.lang.String msg)
protected void
handleDone()
protected void
handleError(java.lang.String msg)
protected void
handleError(java.lang.String msg, java.lang.Throwable t)
protected void
handleFatalError(java.lang.Throwable e)
protected void
handleTimeout(java.lang.String msg)
protected void
sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder)
-
Methods inherited from class org.opennms.netmgt.snmp.SnmpWalker
failed, getAddress, getErrorMessage, getErrorThrowable, getMaxVarsPerPdu, getName, processErrors, processResponse, setCallback, start, timedOut, waitFor, waitFor
-
-
-
-
Constructor Detail
-
MockSnmpWalker
public MockSnmpWalker(SnmpAgentAddress agentAddress, int snmpVersion, PropertyOidContainer container, java.lang.String name, CollectionTracker tracker, int maxVarsPerPdu, int maxRetries)
-
-
Method Detail
-
createPduBuilder
protected SnmpWalker.WalkerPduBuilder createPduBuilder(int maxVarsPerPdu)
- Specified by:
createPduBuilder
in classSnmpWalker
-
sendNextPdu
protected void sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder) throws SnmpException
- Specified by:
sendNextPdu
in classSnmpWalker
- Throws:
SnmpException
-
handleDone
protected void handleDone()
- Overrides:
handleDone
in classSnmpWalker
-
handleAuthError
protected void handleAuthError(java.lang.String msg)
- Overrides:
handleAuthError
in classSnmpWalker
-
handleError
protected void handleError(java.lang.String msg)
- Overrides:
handleError
in classSnmpWalker
-
handleError
protected void handleError(java.lang.String msg, java.lang.Throwable t)
- Overrides:
handleError
in classSnmpWalker
-
handleFatalError
protected void handleFatalError(java.lang.Throwable e)
- Overrides:
handleFatalError
in classSnmpWalker
-
handleTimeout
protected void handleTimeout(java.lang.String msg)
- Overrides:
handleTimeout
in classSnmpWalker
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in classSnmpWalker
-
buildAndSendNextPdu
protected void buildAndSendNextPdu() throws SnmpException
- Overrides:
buildAndSendNextPdu
in classSnmpWalker
- Throws:
SnmpException
-
-