All Packages Class Hierarchy This Package Previous Next Index
Class examples.mo.SelfReg.SelfRegBean
java.lang.Object
|
+----examples.mo.SelfReg.SelfRegBean
- public class SelfRegBean
- 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.
- use the
deleteCmf method to serialize the m-bean.
The object has two properties:
- "State" a read/write property
- "NbChanges" a read only property
-
SelfRegBean()
-
-
deleteCmf()
- Perform closedown tasks.
-
getNbChanges()
- Getter for the "NbChanges" property.
-
getState()
- Getter for the "State" property.
-
initCmf(Framework, ObjectName)
- Perform initialization tasks and register the m-bean.
-
performReset()
- Resetter for the "NbChanges" property.
-
setState(String)
-
Setter for the "State" property.
SelfRegBean
public SelfRegBean()
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.
setState
public void setState(String s)
- Setter for the "State" property. The method is
compliant with the Bean design pattern.
- Parameters:
- s - the new value of the property.
getNbChanges
public Integer getNbChanges()
- Getter for the "NbChanges" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "NbChanges" property.
performReset
public void performReset()
- Resetter for the "NbChanges" property.
initCmf
public void initCmf(Framework agent,
ObjectName name) throws IllegalAccessException, ServiceNotFoundException, InstanceAlreadyExistException, IllegalArgumentException
- Perform initialization tasks and register the m-bean.
- 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()
- Perform closedown tasks. In this example we serialize the m-bean on closedown.
All Packages Class Hierarchy This Package Previous Next Index