All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class examples.mo.Scheduler.Season

java.lang.Object
   |
   +----examples.mo.Scheduler.Season

public class Season
extends Object
implements Serializable, SchedulerListener
A simple definition of an m-bean.
The m-bean shows how to: The object has two properties :

See Also:
Scheduler

Constructor Index

 o Season()

Method Index

 o deleteCmf()
Stop the scheduler and remove the m-bean as a listener.
 o getListOfEvents()
Returns in an array all the events registered into the scheduler vector.
 o getNotifyPastEvents()
Returns the flag that indicates if the scheduler notifies past events or not.
 o getNumberOfEvents()
Returns the number of events registered into the scheduler vector.
 o getState()
Returns the current value of the "State" property.
 o getTemp()
Returns the current value of the "Temp" property.
 o handleScheduler(SchedulerEvent)
This handle will be called each time the date of an event in the scheduler vector has been reached.
 o initCmf(Framework, ObjectName, boolean, ModificationList)
Register the m-bean, add m-bean as a listener and start the scheduler service.
 o isActive()
Tests if the Scheduler is active.
 o performStartScheduler()
Starts the scheduler service and add events into the scheduler vector if it is empty.
 o performStopScheduler()
Stops the scheduler service and reset the season object.

Constructors

 o Season
 public Season()

Methods

 o initCmf
 public void initCmf(Framework agent,
                     ObjectName name,
                     boolean db,
                     ModificationList list) throws IllegalAccessException, ServiceNotFoundException, InstanceAlreadyExistException, IllegalArgumentException, InvalidPropertyValueException
Register the m-bean, add m-bean as a listener and start the scheduler service.

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.
Throws: InvalidPropertyValueException
The value specified for a property is invalid.
 o deleteCmf
 public void deleteCmf()
Stop the scheduler and remove the m-bean as a listener.

 o handleScheduler
 public void handleScheduler(SchedulerEvent event)
This handle will be called each time the date of an event in the scheduler vector has been reached.

The event to handle can be one of these :

Parameters:
event - The scheduler event.
See Also:
SchedulerEvent
 o performStartScheduler
 public void performStartScheduler() throws InstanceAlreadyExistException, InvalidPropertyValueException
Starts the scheduler service and add events into the scheduler vector if it is empty.

Throws: InstanceAlreadyExistException
The m-bean is already registered in the repository.
Throws: InvalidPropertyValueException
The value specified for a property is invalid.
 o performStopScheduler
 public void performStopScheduler()
Stops the scheduler service and reset the season object.

 o getState
 public String getState()
Returns the current value of the "State" property.

 o getTemp
 public Float getTemp()
Returns the current value of the "Temp" property.

 o getNumberOfEvents
 public int getNumberOfEvents()
Returns the number of events registered into the scheduler vector.

 o isActive
 public boolean isActive()
Tests if the Scheduler is active.

 o getNotifyPastEvents
 public boolean getNotifyPastEvents()
Returns the flag that indicates if the scheduler notifies past events or not.

 o getListOfEvents
 public SchedulerEvent[] getListOfEvents()
Returns in an array all the events registered into the scheduler vector.


All Packages  Class Hierarchy  This Package  Previous  Next  Index