Class SnmpWalker

  • All Implemented Interfaces:
    java.lang.AutoCloseable
    Direct Known Subclasses:
    JoeSnmpWalker, MockSnmpWalker, Snmp4JWalker

    public abstract class SnmpWalker
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Detail

      • SnmpWalker

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

      • setCallback

        public void setCallback​(SnmpWalkCallback callback)
        Sets an (optional) callback that will be triggered when the walk was successfully completed, or failed due to some error.
        Parameters:
        callback - the callback
      • start

        public void start()
      • getMaxVarsPerPdu

        public final int getMaxVarsPerPdu()
      • handleDone

        protected void handleDone()
      • failed

        public boolean failed()

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

      • timedOut

        public boolean timedOut()
      • handleAuthError

        protected void handleAuthError​(java.lang.String msg)
      • handleError

        protected void handleError​(java.lang.String msg)
      • handleError

        protected void handleError​(java.lang.String msg,
                                   java.lang.Throwable t)
      • handleFatalError

        protected void handleFatalError​(java.lang.Throwable e)
      • handleTimeout

        protected void handleTimeout​(java.lang.String msg)
      • close

        public abstract void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • getName

        public final java.lang.String getName()
      • waitFor

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

        public boolean waitFor​(long timeout)
                        throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • processErrors

        protected boolean processErrors​(int errorStatus,
                                        int errorIndex)
                                 throws SnmpException
        Throws:
        SnmpException
      • getAddress

        protected final java.net.InetAddress getAddress()
      • getErrorMessage

        public final java.lang.String getErrorMessage()
      • getErrorThrowable

        public final java.lang.Throwable getErrorThrowable()