Class OneInterfaceBean

All Implemented Interfaces:
Runnable, Observer

public class OneInterfaceBean extends SNMPRunBean implements Observer

This bean collects information about one interface.

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.14 $ $Date: 2006/01/25 18:08:56 $
Author:
Birgit Arkesteijn
See Also:
  • Constructor Details

  • Method Details

    • setIndex

      public void setIndex(int i)
      Sets the index of the interface that will be requested.
      Parameters:
      i - the index
      See Also:
    • getIndex

      public int getIndex()
      Returns the index of the interface.
      Returns:
      the index
      See Also:
    • getDescription

      public String getDescription()
      Returns the description of the interface.
      Returns:
      the description
    • getOperStatusString

      public String getOperStatusString()
      Returns the operation state of the interface.
      Returns:
      the operation state
    • getSpeed

      public long getSpeed()
      Returns the speed (bits per second) of the interface.
      Returns:
      the speed
    • 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
    • action

      public void action()
      This method starts sending the SNMP request. All properties should be set before this method is called. The actual sending will take place in the run method. It makes a new snmp context and initialises all variables before starting.
      Specified by:
      action in class SNMPBean
    • run

      public void run()
      The run method according to the Runnable interface. This method will send the Pdu request, 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)
      The update method according to the Observer interface, it will be called when the Pdu response is received. The speed is calculated with the previous answer, after that the property change event is fired.
      Specified by:
      update in interface Observer
      See Also: