All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.weatherstation.TemperatureMonitor

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

public class TemperatureMonitor
extends Monitor
This class performs temperature monitoring.


Variable Index

 o CELSIUS
Use Celsius scale
 o FAHRENHEIT
Use Fahrenheit scale

Constructor Index

 o TemperatureMonitor()
Constructs a new TemperatureMonitor object.

Method Index

 o addThresholdListener(ThresholdListener)
Add a threshold listener to the listener list.
 o getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.
 o getAutoStart()
Gets the autoStart property (boolean) value.
 o getFirePropertyChangeEveryTime()
Gets the firePropertyChangeEveryTime property (boolean) value.
 o getMeasureUnit()
Gets the measureUnit property (int) value.
 o getNotifyWhenThresholdExceeded()
Gets the notifyWhenThresholdExceeded property (boolean) value.
 o getResult()
Gets the result property (float) value.
 o getResultString()
Gets the resultString property (java.lang.String) value.
 o getTemperatureInterval()
Gets the temperatureInterval property (float) value.
 o getThresholdMaximum()
Gets the thresholdMaximum property (float) value.
 o getThresholdMinimum()
Gets the thresholdMinimum property (float) value.
 o performAction()
Perform reading the current temperature.
 o removeThresholdListener(ThresholdListener)
Remove a threshold listener from the listener list.
 o setAboutThisBean(String)
Sets the aboutThisBean property (java.lang.String) value.
 o setAutoStart(boolean)
Sets the autoStart property (boolean) value.
 o setFirePropertyChangeEveryTime(boolean)
Sets the firePropertyChangeEveryTime property (boolean) value.
 o setMeasureUnit(int)
Sets the measureUnit property (int) value.
 o setNotifyWhenThresholdExceeded(boolean)
Sets the notifyWhenThresholdExceeded property (boolean) value.
 o setTemperatureInterval(float)
Sets the temperatureInterval property (float) value.
 o setThresholdMaximum(float)
Sets the thresholdMaximum property (float) value.
 o setThresholdMinimum(float)
Sets the thresholdMinimum property (float) value.
 o setWeatherStation(WeatherStationInterface)
Sets the weatherStation property (com.ibm.weatherstation.WeatherStationInterface) value.
 o triggerAction()
Make the bean to take a probe immediatelly.

Variables

 o CELSIUS
 public static final int CELSIUS
Use Celsius scale

 o FAHRENHEIT
 public static final int FAHRENHEIT
Use Fahrenheit scale

Constructors

 o TemperatureMonitor
 public TemperatureMonitor()
Constructs a new TemperatureMonitor object.

Methods

 o addThresholdListener
 public void addThresholdListener(ThresholdListener listener)
Add a threshold listener to the listener list.

Parameters:
listener - com.ibm.weatherstation.event.ThresholdListener
Throws: IllegalArgumentException
if listener is null.
 o getAboutThisBean
 public String getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.

Returns:
The aboutThisBean property value.
See Also:
setAboutThisBean
 o getAutoStart
 public boolean getAutoStart()
Gets the autoStart property (boolean) value.

Returns:
The autoStart property value.
See Also:
setAutoStart
 o getFirePropertyChangeEveryTime
 public boolean getFirePropertyChangeEveryTime()
Gets the firePropertyChangeEveryTime property (boolean) value.

Returns:
The firePropertyChangeEveryTime property value.
See Also:
setFirePropertyChangeEveryTime
 o getMeasureUnit
 public int getMeasureUnit()
Gets the measureUnit property (int) value.

Returns:
The measureUnit property value.
See Also:
setMeasureUnit
 o getNotifyWhenThresholdExceeded
 public boolean getNotifyWhenThresholdExceeded()
Gets the notifyWhenThresholdExceeded property (boolean) value.

Returns:
The notifyWhenThresholdExceeded property value.
See Also:
setNotifyWhenThresholdExceeded
 o getResult
 public float getResult()
Gets the result property (float) value.

Returns:
The result property value.
 o getResultString
 public String getResultString()
Gets the resultString property (java.lang.String) value.

Returns:
The resultString property value.
 o getTemperatureInterval
 public float getTemperatureInterval()
Gets the temperatureInterval property (float) value.

Returns:
The temperatureInterval property value.
See Also:
setTemperatureInterval
 o getThresholdMaximum
 public float getThresholdMaximum()
Gets the thresholdMaximum property (float) value.

Returns:
The thresholdMaximum property value.
See Also:
setThresholdMaximum
 o getThresholdMinimum
 public float getThresholdMinimum()
Gets the thresholdMinimum property (float) value.

Returns:
The thresholdMinimum property value.
See Also:
setThresholdMinimum
 o performAction
 protected void performAction() throws MonitoringException
Perform reading the current temperature.

Throws: MonitoringException
if an error occurs.
Overrides:
performAction in class Monitor
 o removeThresholdListener
 public void removeThresholdListener(ThresholdListener listener)
Remove a threshold listener from the listener list.

Parameters:
listener - com.ibm.weatherstation.event.ThresholdListener
Throws: IllegalArgumentException
if listener is null.
 o setAboutThisBean
 public void setAboutThisBean(String aboutThisBean)
Sets the aboutThisBean property (java.lang.String) value.

Parameters:
aboutThisBean - The new value for the property.
See Also:
getAboutThisBean
 o setAutoStart
 public void setAutoStart(boolean autoStart)
Sets the autoStart property (boolean) value.

Parameters:
autoStart - The new value for the property.
See Also:
getAutoStart
 o setFirePropertyChangeEveryTime
 public void setFirePropertyChangeEveryTime(boolean firePropertyChangeEveryTime)
Sets the firePropertyChangeEveryTime property (boolean) value.

Parameters:
firePropertyChangeEveryTime - The new value for the property.
See Also:
getFirePropertyChangeEveryTime
 o setMeasureUnit
 public void setMeasureUnit(int measureUnit)
Sets the measureUnit property (int) value.

Parameters:
measureUnit - The new value for the property.
Throws: IllegalArgumentException
if measureUnit is not valid value.
See Also:
getMeasureUnit
 o setNotifyWhenThresholdExceeded
 public void setNotifyWhenThresholdExceeded(boolean notifyWhenThresholdExceeded)
Sets the notifyWhenThresholdExceeded property (boolean) value.

Parameters:
notifyWhenThresholdExceeded - The new value for the property.
See Also:
getNotifyWhenThresholdExceeded
 o setTemperatureInterval
 public void setTemperatureInterval(float temperatureInterval)
Sets the temperatureInterval property (float) value.

Parameters:
temperatureInterval - The new value for the property.
Throws: IllegalArgumentException
if temperatureInterval is negative.
See Also:
getTemperatureInterval
 o setThresholdMaximum
 public void setThresholdMaximum(float thresholdMaximum)
Sets the thresholdMaximum property (float) value.

Parameters:
thresholdMaximum - The new value for the property.
Throws: IllegalArgumentException
if thresholdMaximum is less than thresholdMinimum property value.
See Also:
getThresholdMaximum
 o setThresholdMinimum
 public void setThresholdMinimum(float thresholdMinimum)
Sets the thresholdMinimum property (float) value.

Parameters:
thresholdMinimum - The new value for the property.
Throws: IllegalArgumentException
if thresholdMinimum is greater than thresholdMaximum property value.
See Also:
getThresholdMinimum
 o setWeatherStation
 public void setWeatherStation(WeatherStationInterface weatherStation)
Sets the weatherStation property (com.ibm.weatherstation.WeatherStationInterface) value.

Parameters:
weatherStation - The new value for the property.
Throws: IllegalArgumentException
if weatherStation is null.
 o triggerAction
 public void triggerAction()
Make the bean to take a probe immediatelly.


All Packages  Class Hierarchy  This Package  Previous  Next  Index