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:
- Implement the
SchedulerListener interface.
- Use the
initCmf method to register the m-bean,
insert a new scheduler-event into the scheduler vector
and start the scheduler-service.
- Register itself to receive event
SchedulerEvent events.
- Use the
deleteCmf method to stop the scheduler-service and remove itself as a listener.
The object has two properties :
- "Temp" a read only property
- "State" a read only property
- See Also:
- Scheduler
-
Season()
-
-
deleteCmf()
- Stop the scheduler and remove the m-bean as a listener.
-
getListOfEvents()
- Returns in an array all the events registered into the scheduler vector.
-
getNotifyPastEvents()
- Returns the flag that indicates if the scheduler notifies past events or not.
-
getNumberOfEvents()
- Returns the number of events registered into the scheduler vector.
-
getState()
- Returns the current value of the "State" property.
-
getTemp()
- Returns the current value of the "Temp" property.
-
handleScheduler(SchedulerEvent)
- This handle will be called each time the date of an event in the scheduler vector
has been reached.
-
initCmf(Framework, ObjectName, boolean, ModificationList)
- Register the m-bean, add m-bean as a listener and start the scheduler service.
-
isActive()
- Tests if the
Scheduler is active.
-
performStartScheduler()
- Starts the scheduler service and add events into the scheduler vector if it is empty.
-
performStopScheduler()
- Stops the scheduler service and reset the season object.
Season
public Season()
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.
deleteCmf
public void deleteCmf()
- Stop the scheduler and remove the m-bean as a listener.
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 :
EventSpring
EventSummer
EventAutumn
EventWinter
- Parameters:
- event - The scheduler event.
- See Also:
- SchedulerEvent
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.
performStopScheduler
public void performStopScheduler()
- Stops the scheduler service and reset the season object.
getState
public String getState()
- Returns the current value of the "State" property.
getTemp
public Float getTemp()
- Returns the current value of the "Temp" property.
getNumberOfEvents
public int getNumberOfEvents()
- Returns the number of events registered into the scheduler vector.
isActive
public boolean isActive()
- Tests if the
Scheduler is active.
getNotifyPastEvents
public boolean getNotifyPastEvents()
- Returns the flag that indicates if the scheduler notifies past events or not.
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