All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.weatherstation.Monitor

java.lang.Object
   |
   +----com.ibm.weatherstation.Monitor

public abstract class Monitor
extends Object
implements Runnable, Serializable
This class is a basis class for all monitors.


Constructor Index

 o Monitor()
Construct a new Monitor object.

Method Index

 o abortMonitoring()
Abort the monitoring.
 o addMonitoringStateListener(MonitoringStateListener)
Add a monitoringState listener to the listener list.
 o addPropertyChangeListener(PropertyChangeListener)
Add a propertyChange listener to the listener list.
 o firePropertyChange(String, Object, Object)
Report a bound property update to any registered listeners.
 o getPropertyChange()
Return the current PropertyChangeSupport object.
 o getTimeInterval()
Get a timeInterval property (int) value.
 o performAction()
Perform an action.
 o removeMonitoringStateListener(MonitoringStateListener)
Remove a monitoringState listener from the listener list.
 o removePropertyChangeListener(PropertyChangeListener)
Remove a propertyChange listener from the listener list.
 o run()
This method is ivnoked in a separately executing thread when the monitoring is started.
 o setTimeInterval(int)
Set the timeInterval property (int) value.
 o start()
Start monitoring.
 o stop()
Stop monitoring.

Constructors

 o Monitor
 public Monitor()
Construct a new Monitor object.

Methods

 o abortMonitoring
 protected void abortMonitoring()
Abort the monitoring.

 o addMonitoringStateListener
 public void addMonitoringStateListener(MonitoringStateListener listener)
Add a monitoringState listener to the listener list.

Parameters:
listener - com.ibm.weatherstation.event.MonitoringStateListener
Throws: IllegalArgumentException
if listener is null.
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener listener)
Add a propertyChange listener to the listener list.

Parameters:
listener - java.beans.PropertyChangeListener
Throws: IllegalArgumentException
if listener is null.
 o firePropertyChange
 protected void firePropertyChange(String propertyName,
                                   Object oldValue,
                                   Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

Parameters:
propertyName - java.lang.String
oldValue - java.lang.Object
newValue - java.lang.Object
 o getPropertyChange
 protected PropertyChangeSupport getPropertyChange()
Return the current PropertyChangeSupport object.

Returns:
java.beans.PropertyChangeSupport
 o getTimeInterval
 public int getTimeInterval()
Get a timeInterval property (int) value.

Returns:
The timeInterval property value.
See Also:
setTimeInterval
 o performAction
 protected abstract void performAction() throws MonitoringException
Perform an action.

Throws: MonitoringException
if an error occurs.
 o removeMonitoringStateListener
 public void removeMonitoringStateListener(MonitoringStateListener l)
Remove a monitoringState listener from the listener list.

Parameters:
l - com.ibm.weatherstation.event.MonitoringStateListener exception IllegalArgumentException if l is null
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
Remove a propertyChange listener from the listener list.

Parameters:
l - java.beans.PropertyChangeListener exception IllegalArgumentException if l is null
 o run
 public void run()
This method is ivnoked in a separately executing thread when the monitoring is started.

 o setTimeInterval
 public void setTimeInterval(int timeInterval)
Set the timeInterval property (int) value.

Parameters:
timeInterval - The new value for the property.
Throws: IllegalArgumentException
if timeInterval is negative.
See Also:
getTimeInterval
 o start
 public void start()
Start monitoring.

 o stop
 public void stop()
Stop monitoring.


All Packages  Class Hierarchy  This Package  Previous  Next  Index