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:
- Implement the
AlarmClockListener interface.
- Use the
initCmf method to register the m-bean and start the alarm-clock.
- Register itself to receive event
AlarmClockEvent events.
- Use the
deleteCmf method to stop the alarm-clock and remove itself as a listener.
The object has one property:
- "Temp" a read only property
- "State" a read only property
- See Also:
- AlarmClock
-
Weather()
-
-
deleteCmf()
- Stop the alarm-clock and remove the m-bean as a listener.
-
getState()
- Getter for the "State" property.
-
getTemp()
- Getter for the "Temp" property.
-
handleAlarmClock(AlarmClockEvent)
- This handle will be called each time the alarm-clock has exceeded its timeout.
-
initCmf(Framework, ObjectName)
- Register the m-bean, add m-bean as a listener and start the clock-alarm.
Weather
public Weather()
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.
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.
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.
deleteCmf
public void deleteCmf()
- Stop the alarm-clock and remove the m-bean as a listener.
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