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.
-
Monitor()
- Construct a new Monitor object.
-
abortMonitoring()
- Abort the monitoring.
-
addMonitoringStateListener(MonitoringStateListener)
- Add a monitoringState listener to the listener list.
-
addPropertyChangeListener(PropertyChangeListener)
- Add a propertyChange listener to the listener list.
-
firePropertyChange(String, Object, Object)
- Report a bound property update to any registered listeners.
-
getPropertyChange()
- Return the current PropertyChangeSupport object.
-
getTimeInterval()
- Get a timeInterval property (int) value.
-
performAction()
- Perform an action.
-
removeMonitoringStateListener(MonitoringStateListener)
- Remove a monitoringState listener from the listener list.
-
removePropertyChangeListener(PropertyChangeListener)
- Remove a propertyChange listener from the listener list.
-
run()
- This method is ivnoked in a separately executing thread when the monitoring is started.
-
setTimeInterval(int)
- Set the timeInterval property (int) value.
-
start()
- Start monitoring.
-
stop()
- Stop monitoring.
Monitor
public Monitor()
- Construct a new Monitor object.
abortMonitoring
protected void abortMonitoring()
- Abort the monitoring.
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.
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.
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
getPropertyChange
protected PropertyChangeSupport getPropertyChange()
- Return the current PropertyChangeSupport object.
- Returns:
- java.beans.PropertyChangeSupport
getTimeInterval
public int getTimeInterval()
- Get a timeInterval property (int) value.
- Returns:
- The timeInterval property value.
- See Also:
- setTimeInterval
performAction
protected abstract void performAction() throws MonitoringException
- Perform an action.
- Throws: MonitoringException
- if an error occurs.
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
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
run
public void run()
- This method is ivnoked in a separately executing thread when the monitoring is started.
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
start
public void start()
- Start monitoring.
stop
public void stop()
- Stop monitoring.
All Packages Class Hierarchy This Package Previous Next Index