All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.mo.Monitor2.Weather

java.lang.Object
   |
   +----examples.mo.Monitor2.Weather

public class Weather
extends Object
implements Serializable, AlarmClockListener
A simple definition of an m-bean.
The m-bean shows how to: The object has one property:

See Also:
AlarmClock

Constructor Index

 o Weather()

Method Index

 o deleteCmf()
Stop the alarm-clock and remove the m-bean as a listener.
 o getState()
Getter for the "State" property.
 o getTemp()
Getter for the "Temp" property.
 o handleAlarmClock(AlarmClockEvent)
This handle will be called each time the alarm-clock has exceeded its timeout.
 o initCmf(Framework, ObjectName)
Register the m-bean, add m-bean as a listener and start the clock-alarm.

Constructors

 o Weather
 public Weather()

Methods

 o getState
 public String getState()
Getter for the "State" property. The method is compliant with the Bean design pattern.

Returns:
the current value of the "State" property.
 o getTemp
 public Float getTemp()
Getter for the "Temp" property. The method is compliant with the Bean design pattern.

Returns:
the current value of the "Temp" property.
 o initCmf
 public void initCmf(Framework agent,
                     ObjectName name) throws IllegalAccessException, ServiceNotFoundException, InstanceAlreadyExistException, IllegalArgumentException
Register the m-bean, add m-bean as a listener and start the clock-alarm.

Parameters:
agent - a reference to the core management framework.
name - the object name to use for registering.
Throws: IllegalAccessException
The method cannot access the class definition of the specified m-bean.
Throws: ServiceNotFoundException
The requested service is not supported.
Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
Throws: IllegalArgumentException
One of the parameters in the call to the method is invalid.
 o deleteCmf
 public void deleteCmf()
Stop the alarm-clock and remove the m-bean as a listener.

 o handleAlarmClock
 public void handleAlarmClock(AlarmClockEvent event)
This handle will be called each time the alarm-clock has exceeded its timeout.


All Packages  Class Hierarchy  This Package  Previous  Next  Index