All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.weatherstation.WeatherStation

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

public class WeatherStation
extends Object
implements WeatherStationInterface
This class object is used by the other Weather Station beans to access Dallas Weather Station.


Constructor Index

 o WeatherStation()
Construct a new WeatherStation object.

Method Index

 o addCommunicationErrorListener(CommunicationErrorListener)
Add a communicationError listener to the listener list.
 o addPropertyChangeListener(PropertyChangeListener)
Add a propertyChange listener to the listener list.
 o closePort()
Close a communication port.
 o firePropertyChange(String, Object, Object)
Report a bound property update to any registered listeners.
 o getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.
 o getMyself()
Gets the myself property (com.ibm.weatherstation.WeatherStationInterface) value.
 o getPort()
Get the port property (java.lang.String) value.
 o getPropertyChange()
Returns the current PropertyChangeSupport object.
 o openPort()
Open a communication port.
 o readTemperature()
Read the current temperature.
 o readWindDirection()
Read the current wind direction.
 o readWindSpeed()
Read the current wind speed.
 o removeCommunicationErrorListener(CommunicationErrorListener)
Remove a communicationError listener from the listener list.
 o removePropertyChangeListener(PropertyChangeListener)
Remove a propertyChange listener from the listener list.
 o setAboutThisBean(String)
Sets the aboutThisBean property (java.lang.String) value.
 o setPort(String)
Set the port property (java.lang.String) value.

Constructors

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

Methods

 o addCommunicationErrorListener
 public void addCommunicationErrorListener(CommunicationErrorListener listener)
Add a communicationError listener to the listener list.

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

Parameters:
listener - java.beans.PropertyChangeListener
Throws: IllegalArgumentException
if listener is null.
 o closePort
 public void closePort()
Close a communication port.

 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 getAboutThisBean
 public String getAboutThisBean()
Gets the aboutThisBean property (java.lang.String) value.

Returns:
The aboutThisBean property value.
See Also:
setAboutThisBean
 o getMyself
 public WeatherStationInterface getMyself()
Gets the myself property (com.ibm.weatherstation.WeatherStationInterface) value.

Returns:
The myself property value.
 o getPort
 public String getPort()
Get the port property (java.lang.String) value.

Returns:
The port property value.
See Also:
setPort
 o getPropertyChange
 protected PropertyChangeSupport getPropertyChange()
Returns the current PropertyChangeSupport object.

Returns:
java.beans.PropertyChangeSupport
 o openPort
 protected void openPort()
Open a communication port.

 o readTemperature
 public synchronized float readTemperature() throws MonitoringException
Read the current temperature.

Returns:
float
Throws: MonitoringException
if an error occurs.
 o readWindDirection
 public synchronized char[] readWindDirection() throws MonitoringException
Read the current wind direction.

Returns:
char[]
Throws: MonitoringException
if an error occurs.
 o readWindSpeed
 public synchronized float readWindSpeed() throws MonitoringException
Read the current wind speed.

Returns:
float
Throws: MonitoringException
if an error occurs.
 o removeCommunicationErrorListener
 public void removeCommunicationErrorListener(CommunicationErrorListener newListener)
Remove a communicationError listener from the listener list.

Parameters:
newListener - com.ibm.weatherstation.event.CommunicationErrorListener
Throws: IllegalArgumentException
if newListener is null
 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Remove a propertyChange listener from the listener list.

Parameters:
listener - java.beans.PropertyChangeListener
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 setPort
 public void setPort(String port)
Set the port property (java.lang.String) value.

Parameters:
port - The new value for the property.
Throws: IllegalArgumentException
if port is a wrong port name or null.
See Also:
getPort

All Packages  Class Hierarchy  This Package  Previous  Next  Index