All Packages Class Hierarchy This Package Previous Next Index
Class examples.mo.Monitor.AskMe
java.lang.Object
|
+----examples.mo.Monitor.AskMe
- public class AskMe
- 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.
The object has two properties:
- "NbObjects" a read only property showing the number of objects in the agent.
- "FreeMem" a read only property showing the amount of bytes free in the VM.
-
AskMe()
-
-
getFreeMem()
- Getter for the "FreeMem" property.
-
getNbObjects()
- Getter for the "NbObjects" property.
-
initCmf(Framework, ObjectName)
- Registers the m-bean and keep a reference to the core framework.
AskMe
public AskMe()
getNbObjects
public Integer getNbObjects()
- Getter for the "NbObjects" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "NbObjects" property.
getFreeMem
public Integer getFreeMem()
- Getter for the "FreeMem" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "FreeMem" property.
initCmf
public void initCmf(Framework agent,
ObjectName name) throws InstanceAlreadyExistException, ServiceNotFoundException, IllegalAccessException
- Registers the m-bean and keep a reference to the core framework.
- 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.
All Packages Class Hierarchy This Package Previous Next Index