| java.lang.Object com.ecyrd.management.SimpleMBean
All known Subclasses: com.ecyrd.jspwiki.ui.admin.SimpleAdminBean, com.ecyrd.jspwiki.ui.admin.beans.PlainEditorAdminBean,
SimpleMBean | abstract public class SimpleMBean implements DynamicMBean(Code) | | A simple MBean which does not require an interface class unlike
the StandardMBean class. The methods are exposed through a method
call, which in turn then calls the methods using the Reflection API.
This class is similar to the javax.management.StandardMBean, but it does
require the API interface to be declared, so it's simpler. It's not as
powerful, but it does not require you to declare two classes (and keep
them in sync).
author: Janne Jalkanen since: 2.6 |
getAttributeNames | abstract public String[] getAttributeNames()(Code) | | This method must return a list of attributes which are
exposed by the SimpleMBean. If there's a getXXX() method
available, it'll be exposed as a getter, and if there's a
setXXX() method available, it'll be exposed as a setter.
For example:
public void setFoo( String foo ) ...
public String getFoo() ...
public String[] getAttributeNames()
{
String[] attrs = { "foo" };
return attrs;
}
Also, methods starting with "is" are also recognized as getters
(e.g. public boolean isFoo() .)
An array of attribute names that can be get and optionally set. |
getDescription | protected String getDescription()(Code) | | Customization hook: Override this to get a description for your MBean. By default,
this is an empty string.
A description for the MBean. |
getMethodNames | abstract public String[] getMethodNames()(Code) | | This method must return a list of operations which
are to be exposed by the SimpleMBean. Note that using overloaded
method names is not supported - only one will be exposed as a JMX method
at random.
An array of method names that should be exposed asJMX operations. |
|
|