Class InterfaceIndexesBean

All Implemented Interfaces:
Runnable, Observer

public class InterfaceIndexesBean extends SNMPRunBean implements Observer

This bean collects information about the number of interfaces on a system and their index.

The number is the number of network interfaces (regardless of their current state) present on this system. The number will remain the same untill the next time the SNMP server is restarted. The interfaces may go up and down while running.

The properties in the parent classes should be set, before calling the action() method. Via a PropertyChangeEvent the application/applet will be notified.

Version:
$Revision: 1.13 $ $Date: 2006/01/25 18:08:55 $
Author:
Birgit Arkesteijn
See Also:
  • Constructor Details

  • Method Details

    • getLastUpdateDate

      public Date getLastUpdateDate()
      Returns the date of the moment when this bean was last updated. This might be null when the first time the update was not finished.
      Returns:
      the last update date
    • getInterfaceIndexes

      public Enumeration getInterfaceIndexes()
      Returns the indexes (as Strings) of the current interfaces (the list of ifIndex).
    • getInterfaceIndexSet

      public Set getInterfaceIndexSet()
      Returns the indexes (as Strings) of the current interfaces (the list of ifIndex).
      Since:
      4_14
    • getInterfaceCount

      public int getInterfaceCount()
      Returns the number of current interfaces.
    • action

      public void action()
      This method starts the action of the bean. It will initialises all variables before starting.
      Specified by:
      action in class SNMPBean
    • run

      public void run()
      Implements the running of the bean. It will send the Pdu, if the previous one is not still in flight.
      Specified by:
      run in interface Runnable
      Specified by:
      run in class SNMPRunBean
      See Also:
    • update

      public void update(Observable obs, Object ov)
      This method is called when the Pdu response is received. When all answers are received it will fire the property change event. The answers are stored in a hashtable, this is done because the speed can only be calculated with the previous answer.
      Specified by:
      update in interface Observer
      See Also: