public abstract class SnmpWalker extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
protected static class |
SnmpWalker.WalkerPduBuilder |
Modifier | Constructor and Description |
---|---|
protected |
SnmpWalker(InetAddress address,
String name,
int maxVarsPerPdu,
int maxRepetitions,
int maxRetries,
CollectionTracker tracker) |
Modifier and Type | Method and Description |
---|---|
protected void |
buildAndSendNextPdu() |
abstract void |
close() |
protected abstract SnmpWalker.WalkerPduBuilder |
createPduBuilder(int maxVarsPerPdu) |
boolean |
failed()
Returns the success or failure code for collection of the data.
|
protected InetAddress |
getAddress() |
String |
getErrorMessage() |
Throwable |
getErrorThrowable() |
int |
getMaxVarsPerPdu() |
String |
getName() |
protected void |
handleAuthError(String msg) |
protected void |
handleDone() |
protected void |
handleError(String msg) |
protected void |
handleError(String msg,
Throwable t) |
protected void |
handleFatalError(Throwable e) |
protected void |
handleTimeout(String msg) |
protected boolean |
processErrors(int errorStatus,
int errorIndex) |
protected void |
processResponse(SnmpObjId receivedOid,
SnmpValue val) |
protected abstract void |
sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder) |
void |
setCallback(SnmpWalkCallback callback)
Sets an (optional) callback that will be triggered when the walk was successfully completed,
or failed due to some error.
|
void |
start() |
boolean |
timedOut() |
void |
waitFor() |
boolean |
waitFor(long timeout) |
protected SnmpWalker(InetAddress address, String name, int maxVarsPerPdu, int maxRepetitions, int maxRetries, CollectionTracker tracker)
public void setCallback(SnmpWalkCallback callback)
callback
- the callbackprotected abstract SnmpWalker.WalkerPduBuilder createPduBuilder(int maxVarsPerPdu)
public void start()
public final int getMaxVarsPerPdu()
protected void buildAndSendNextPdu() throws SnmpException
SnmpException
protected abstract void sendNextPdu(SnmpWalker.WalkerPduBuilder pduBuilder) throws SnmpException
SnmpException
protected void handleDone()
public boolean failed()
Returns the success or failure code for collection of the data.
public boolean timedOut()
protected void handleAuthError(String msg)
protected void handleError(String msg)
protected void handleFatalError(Throwable e)
protected void handleTimeout(String msg)
public abstract void close()
close
in interface AutoCloseable
public final String getName()
public void waitFor() throws InterruptedException
InterruptedException
public boolean waitFor(long timeout) throws InterruptedException
InterruptedException
protected boolean processErrors(int errorStatus, int errorIndex) throws SnmpException
SnmpException
protected void processResponse(SnmpObjId receivedOid, SnmpValue val) throws SnmpException
SnmpException
protected final InetAddress getAddress()
public final String getErrorMessage()
public final Throwable getErrorThrowable()
Copyright © 2021. All rights reserved.