Package org.ametys.core.mbean
Class AbstractAmetysDynamicMBean
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.mbean.AbstractAmetysDynamicMBean
- All Implemented Interfaces:
DynamicMBean
,LogEnabled
- Direct Known Subclasses:
CacheUsageMBean
,JackrabbitMBean
Abstract class for Ametys Dynamic MBean.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Object
_getAttribute
(String attributeName) Get the value of the attribute.getAttribute
(String attributeName) getAttributes
(String[] attributeNames) protected abstract MBeanAttributeInfo[]
Get the definition of the attributes exposed by the MBean.protected MBeanConstructorInfo[]
Get the definition of the constructors exposed by the MBean.protected abstract String
Get the description of the MBeanprotected abstract String
Get the human readable name of the MBean.protected MBeanNotificationInfo[]
Get the definition of the notification exposed by the MBeanprotected MBeanOperationInfo[]
Get the definition of the operation methods exposed by the MBeanvoid
setAttribute
(Attribute attribute) setAttributes
(AttributeList attributes) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
_mBeanInfo
The MBean metadata
-
-
Constructor Details
-
AbstractAmetysDynamicMBean
public AbstractAmetysDynamicMBean()AbstractAmetysDynamicMBean basic constructor. Generate the MBean info.
-
-
Method Details
-
getAttribute
- Specified by:
getAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
-
_getAttribute
Get the value of the attribute. This method should assume that attributeName is not null. And return null if the name is not recognized- Parameters:
attributeName
- the name of the attribute- Returns:
- the value of the attribute
-
getAttributes
- Specified by:
getAttributes
in interfaceDynamicMBean
-
invoke
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException - Specified by:
invoke
in interfaceDynamicMBean
- Throws:
MBeanException
ReflectionException
-
setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException - Specified by:
setAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
-
setAttributes
- Specified by:
setAttributes
in interfaceDynamicMBean
-
getMBeanInfo
- Specified by:
getMBeanInfo
in interfaceDynamicMBean
-
getMBeanName
Get the human readable name of the MBean. This name will be exposed.- Returns:
- the name
-
getMBeanDescription
Get the description of the MBean- Returns:
- the description
-
getMBeanAttributes
Get the definition of the attributes exposed by the MBean.- Returns:
- the attributes information
-
getMBeanConstructorInfo
Get the definition of the constructors exposed by the MBean.- Returns:
- the constructors information
-
getMBeanOperationInfo
Get the definition of the operation methods exposed by the MBean- Returns:
- the operations information
-
getMBeanNotificationInfo
Get the definition of the notification exposed by the MBean- Returns:
- the notification information
-