Class Discovery

  • All Implemented Interfaces:
    Runnable, ReadyRunnable
    Direct Known Subclasses:
    DiscoveryBridgeDomains, NodeCollector, TopologyUpdater

    public abstract class Discovery
    extends Object
    implements ReadyRunnable
    This class is designed to collect the necessary SNMP information from the target address and store the collected information. When the class is initially constructed no information is collected. The SNMP Session creating and collection occurs in the main run method of the instance. This allows the collection to occur in a thread if necessary.
    • Constructor Detail

      • Discovery

        public Discovery​(long interval,
                         long initial)
        Constructs a new SNMP collector for a node using the passed interface as the collection point. The collection does not occur until the run method is invoked.
        Parameters:
        nodeid -
        config - The SnmpPeer object to collect from.
      • Discovery

        public Discovery()
    • Method Detail

      • getName

        public abstract String getName()
      • runDiscovery

        public abstract void runDiscovery()
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • getScheduler

        public LegacyScheduler getScheduler()

        getScheduler

        Returns:
        a org.opennms.netmgt.enlinkd.scheduler.Scheduler object.
      • setScheduler

        public void setScheduler​(LegacyScheduler scheduler)

        setScheduler

        Parameters:
        scheduler - a org.opennms.netmgt.enlinkd.scheduler.Scheduler object.
      • schedule

        public void schedule()

        schedule

      • isReady

        public boolean isReady()

        isReady

        Specified by:
        isReady in interface ReadyRunnable
        Returns:
        a boolean.
      • unschedule

        public void unschedule()
      • suspend

        public void suspend()

        suspend

      • wakeUp

        public void wakeUp()

        wakeUp

      • getInfo

        public String getInfo()

        getInfo

        Returns:
        a String object.
      • getPollInterval

        public long getPollInterval()

        getPollInterval

        Returns:
        Returns the initial_sleep_time.
      • setPollInterval

        public void setPollInterval​(long interval)

        setPollInterval

        Parameters:
        interval - a long.
      • getInitialSleepTime

        public long getInitialSleepTime()

        getInitialSleepTime

        Returns:
        Returns the initial_sleep_time.
      • setInitialSleepTime

        public void setInitialSleepTime​(long initial_sleep_time)

        setInitialSleepTime

        Parameters:
        initial_sleep_time - The initial_sleep_timeto set.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object