All Packages Class Hierarchy This Package Previous Next Index
Class examples.mo.Mlet2.Master
java.lang.Object
|
+----examples.mo.Mlet2.Master
- public class Master
- extends Object
- implements Serializable
A simple definition of an m-bean.
The m-bean shows how to:
- use the
initCmf method to register the m-bean and add two new sub m-beans.
- use the
deleteCmf method to remove the two sub m-beans.
The object has two properties:
- "StateA" a read only property showing the status of
Sub m-bean A.
- "StateB" a read only property showing the status of
Sub m-bean B.
-
Master()
-
-
deleteCmf()
- Perform closedown tasks.
-
getStateA()
- Getter for the "StateA" property.
-
getStateB()
-
Getter for the "StateB" property.
-
initCmf(Framework, ObjectName)
- Register the m-bean and instanciate and register two instances of the Sub m-bean
using two different methods.
Master
public Master()
getStateA
public String getStateA()
- Getter for the "StateA" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "State" property.
getStateB
public String getStateB()
- Getter for the "StateB" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "State" property.
initCmf
public void initCmf(Framework agent,
ObjectName name) throws ServiceNotFoundException, InstanceAlreadyExistException, IllegalAccessException, InstantiationException, InvocationTargetException, ClassNotFoundException
- Register the m-bean and instanciate and register two instances of the Sub m-bean
using two different methods.
- 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: ClassNotFoundException
- The class loader could not find the class to be instantiated.
- Throws: InstantiationException
- A new instance of the specified class could not be created.
- Throws: InvocationTargetException
- he initialization method (initCmf) of the specified class could not be executed.
deleteCmf
public void deleteCmf()
- Perform closedown tasks. Remove the two instances of the Sub m-bean from the agent.
All Packages Class Hierarchy This Package Previous Next Index