MBeanInfoAssembler interface
that encapsulates the creation of a ModelMBeanInfo instance
but delegates the creation of metadata to subclasses.
This class offers two flavors of Class extraction from a managed bean
instance: getTargetClass, extracting the target class behind
any kind of AOP proxy, and getClassToExpose, returning the
class or interface that will be searched for annotations and exposed
to the JMX runtime.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | checkManagedBean(Object
the bean that will be exposed (might be an AOP proxy) managedBean)Check the given bean instance, throwing an IllegalArgumentException if it is not eligible for exposure with this assembler. |
| protected abstract ModelMBeanAttributeInfo[] | Returns: the attribute metadatathe bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the attribute metadata for the MBean resource. |
| protected String | Returns: the MBean descriptionthe bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the class name of the MBean resource. |
| protected Class | Returns: the bean class to exposethe bean instance (might be an AOP proxy) managedBean)Return the class or interface to expose for the given bean. |
| protected Class | Returns: the bean class to exposethe bean class (might be an AOP proxy class) beanClass)Return the class or interface to expose for the given bean class. |
| protected ModelMBeanConstructorInfo[] | Returns: the constructor metadatathe bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the constructor metadata for the MBean resource. |
| protected String | getDescription(Object
the bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the description of the MBean resource. |
| public ModelMBeanInfo | Returns: the populated ModelMBeanInfo instancethe bean that will be exposed (might be an AOP proxy) managedBean, String the key associated with the managed bean beanKey)Implements org. Create an instance of the |
| protected ModelMBeanNotificationInfo[] | Returns: the notification metadatathe bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the notification metadata for the MBean resource. |
| protected abstract ModelMBeanOperationInfo[] | Returns: the operation metadatathe bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterGet the operation metadata for the MBean resource. |
| protected Class | Returns: the bean class to exposethe bean instance (might be an AOP proxy) managedBean)Return the actual bean class of the given bean instance. |
| protected void | populateMBeanDescriptor(Descriptor
the descriptor, Object Descriptor for the MBean resource.the bean instance (might be an AOP proxy) managedBean, String the key associated with the MBean in the beans map
of the beanKey)MBeanExporterCalled after the |
| AbstractMBeanInfoAssembler | back to summary |
|---|---|
| public AbstractMBeanInfoAssembler() | |
| checkManagedBean | back to summary |
|---|---|
| protected void checkManagedBean(Object managedBean) throws IllegalArgumentException Check the given bean instance, throwing an IllegalArgumentException if it is not eligible for exposure with this assembler. Default implementation is empty, accepting every bean instance.
| |
| getAttributeInfo | back to summary |
|---|---|
| protected abstract ModelMBeanAttributeInfo[] getAttributeInfo(Object managedBean, String beanKey) throws JMException Get the attribute metadata for the MBean resource. Subclasses should implement this method to return the appropriate metadata for all the attributes that should be exposed in the management interface for the managed resource.
| |
| getClassName | back to summary |
|---|---|
| protected String getClassName(Object managedBean, String beanKey) throws JMException Get the class name of the MBean resource. Default implementation returns a simple description for the MBean based on the class name.
| |
| getClassToExpose | back to summary |
|---|---|
| protected Class Return the class or interface to expose for the given bean. This is the class that will be searched for attributes and operations (for example, checked for annotations).
| |
| getClassToExpose | back to summary |
|---|---|
| protected Class Return the class or interface to expose for the given bean class. This is the class that will be searched for attributes and operations
| |
| getConstructorInfo | back to summary |
|---|---|
| protected ModelMBeanConstructorInfo[] getConstructorInfo(Object managedBean, String beanKey) throws JMException Get the constructor metadata for the MBean resource. Subclasses should implement this method to return the appropriate metadata for all constructors that should be exposed in the management interface for the managed resource. Default implementation returns an empty array of
| |
| getDescription | back to summary |
|---|---|
| protected String getDescription(Object managedBean, String beanKey) throws JMException Get the description of the MBean resource. Default implementation returns a simple description for the MBean based on the class name.
| |
| getMBeanInfo | back to summary |
|---|---|
| public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException Implements org. Create an instance of the
| |
| getNotificationInfo | back to summary |
|---|---|
| protected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean, String beanKey) throws JMException Get the notification metadata for the MBean resource. Subclasses should implement this method to return the appropriate metadata for all notifications that should be exposed in the management interface for the managed resource. Default implementation returns an empty array of
| |
| getOperationInfo | back to summary |
|---|---|
| protected abstract ModelMBeanOperationInfo[] getOperationInfo(Object managedBean, String beanKey) throws JMException Get the operation metadata for the MBean resource. Subclasses should implement this method to return the appropriate metadata for all operations that should be exposed in the management interface for the managed resource.
| |
| getTargetClass | back to summary |
|---|---|
| protected Class Return the actual bean class of the given bean instance. This is the class exposed to description-style JMX properties. Default implementation returns the target class for an AOP proxy, and the plain bean class else.
| |
| populateMBeanDescriptor | back to summary |
|---|---|
| protected void populateMBeanDescriptor(Descriptor descriptor, Object managedBean, String beanKey) throws JMException Called after the Subclasses can implement this method to add additional descriptors to the MBean metadata. Default implementation is empty.
| |