public class MetadataMBeanInfoAssembler extends AbstractReflectiveMBeanInfoAssembler implements AutodetectCapableMBeanInfoAssembler, InitializingBean
MBeanInfoAssembler interface that reads
 the management interface information from source level metadata.
 Uses the JmxAttributeSource strategy interface, so that
 metadata can be read using any supported implementation. Out of the box,
 Spring provides an implementation based on annotations:
 AnnotationJmxAttributeSource.
setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource), 
AnnotationJmxAttributeSourceATTRIBUTE_OPERATION_VISIBILITY, FIELD_CLASS, FIELD_CURRENCY_TIME_LIMIT, FIELD_DEFAULT, FIELD_DISPLAY_NAME, FIELD_GET_METHOD, FIELD_LOG, FIELD_LOG_FILE, FIELD_METRIC_CATEGORY, FIELD_METRIC_TYPE, FIELD_PERSIST_LOCATION, FIELD_PERSIST_NAME, FIELD_PERSIST_PERIOD, FIELD_PERSIST_POLICY, FIELD_ROLE, FIELD_SET_METHOD, FIELD_UNITS, FIELD_VISIBILITY, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER| Constructor and Description | 
|---|
| MetadataMBeanInfoAssembler()Create a new  MetadataMBeanInfoAssemblerwhich needs to be
 configured through thesetAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource)method. | 
| MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource)Create a new  MetadataMBeanInfoAssemblerfor the givenJmxAttributeSource. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet()Invoked by the containing  BeanFactoryafter it has set all bean properties
 and satisfiedBeanFactoryAware,ApplicationContextAwareetc. | 
| protected void | checkManagedBean(Object managedBean)Throws an IllegalArgumentException if it encounters a JDK dynamic proxy. | 
| protected String | getAttributeDescription(PropertyDescriptor propertyDescriptor,
                       String beanKey)Creates a description for the attribute corresponding to this property
 descriptor. | 
| protected String | getDescription(Object managedBean,
              String beanKey)Reads managed resource description from the source level metadata. | 
| protected ModelMBeanNotificationInfo[] | getNotificationInfo(Object managedBean,
                   String beanKey)Reads the  ManagedNotificationmetadata from theClassof the managed resource
 and generates and returns the correspondingModelMBeanNotificationInfometadata. | 
| protected String | getOperationDescription(Method method,
                       String beanKey)Retrieves the description for the supplied  Methodfrom the
 metadata. | 
| protected MBeanParameterInfo[] | getOperationParameters(Method method,
                      String beanKey)Reads  MBeanParameterInfofrom theManagedOperationParameterattributes attached to a method. | 
| boolean | includeBean(Class<?> beanClass,
           String beanName)Used for autodetection of beans. | 
| protected boolean | includeOperation(Method method,
                String beanKey)Votes on the inclusion of an operation. | 
| protected boolean | includeReadAttribute(Method method,
                    String beanKey)Vote on the inclusion of an attribute accessor. | 
| protected boolean | includeWriteAttribute(Method method,
                     String beanKey)Votes on the inclusion of an attribute mutator. | 
| protected void | populateAttributeDescriptor(Descriptor desc,
                           Method getter,
                           Method setter,
                           String beanKey)Adds descriptor fields from the  ManagedAttributeattribute or theManagedMetricattribute
 to the attribute descriptor. | 
| protected void | populateMBeanDescriptor(Descriptor desc,
                       Object managedBean,
                       String beanKey)Adds descriptor fields from the  ManagedResourceattribute
 to the MBean descriptor. | 
| protected void | populateOperationDescriptor(Descriptor desc,
                           Method method,
                           String beanKey)Adds descriptor fields from the  ManagedAttributeattribute
 to the attribute descriptor. | 
| void | setAttributeSource(JmxAttributeSource attributeSource)Set the  JmxAttributeSourceimplementation to use for
 reading the metadata from the bean class. | 
applyCurrencyTimeLimit, applyDefaultCurrencyTimeLimit, createModelMBeanOperationInfo, getAttributeInfo, getClassForDescriptor, getDefaultCurrencyTimeLimit, getOperationInfo, getParameterNameDiscoverer, isExposeClassDescriptor, isUseStrictCasing, setDefaultCurrencyTimeLimit, setExposeClassDescriptor, setParameterNameDiscoverer, setUseStrictCasinggetClassName, getClassToExpose, getClassToExpose, getConstructorInfo, getMBeanInfo, getTargetClassclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMBeanInfopublic MetadataMBeanInfoAssembler()
MetadataMBeanInfoAssembler which needs to be
 configured through the setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource) method.public MetadataMBeanInfoAssembler(JmxAttributeSource attributeSource)
MetadataMBeanInfoAssembler for the given
 JmxAttributeSource.attributeSource - the JmxAttributeSource to usepublic void setAttributeSource(JmxAttributeSource attributeSource)
JmxAttributeSource implementation to use for
 reading the metadata from the bean class.AnnotationJmxAttributeSourcepublic void afterPropertiesSet()
InitializingBeanBeanFactory after it has set all bean properties
 and satisfied BeanFactoryAware, ApplicationContextAware etc.
 This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet in interface InitializingBeanprotected void checkManagedBean(Object managedBean) throws IllegalArgumentException
checkManagedBean in class AbstractMBeanInfoAssemblermanagedBean - the bean that will be exposed (might be an AOP proxy)IllegalArgumentException - the bean is not valid for exposurepublic boolean includeBean(Class<?> beanClass, String beanName)
ManagedResource attribute. If so it will add it list of included beans.includeBean in interface AutodetectCapableMBeanInfoAssemblerbeanClass - the class of the beanbeanName - the name of the bean in the bean factoryprotected boolean includeReadAttribute(Method method, String beanKey)
includeReadAttribute in class AbstractReflectiveMBeanInfoAssemblermethod - the accessor methodbeanKey - the key associated with the MBean in the beans mapprotected boolean includeWriteAttribute(Method method, String beanKey)
includeWriteAttribute in class AbstractReflectiveMBeanInfoAssemblermethod - the mutator methodbeanKey - the key associated with the MBean in the beans mapprotected boolean includeOperation(Method method, String beanKey)
includeOperation in class AbstractReflectiveMBeanInfoAssemblermethod - the operation methodbeanKey - the key associated with the MBean in the beans mapprotected String getDescription(Object managedBean, String beanKey)
String if no description can be found.getDescription in class AbstractMBeanInfoAssemblermanagedBean - the bean instance (might be an AOP proxy)beanKey - the key associated with the MBean in the beans map
 of the MBeanExporterprotected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey)
getAttributeDescription in class AbstractReflectiveMBeanInfoAssemblerpropertyDescriptor - the PropertyDescriptor for the attributebeanKey - the key associated with the MBean in the beans map
 of the MBeanExporterprotected String getOperationDescription(Method method, String beanKey)
Method from the
 metadata. Uses the method name is no description is present in the metadata.getOperationDescription in class AbstractReflectiveMBeanInfoAssemblermethod - the operation methodbeanKey - the key associated with the MBean in the beans map
 of the MBeanExporterprotected MBeanParameterInfo[] getOperationParameters(Method method, String beanKey)
MBeanParameterInfo from the ManagedOperationParameter
 attributes attached to a method. Returns an empty array of MBeanParameterInfo
 if no attributes are found.getOperationParameters in class AbstractReflectiveMBeanInfoAssemblermethod - the Method to get the parameter information forbeanKey - the key associated with the MBean in the beans map
 of the MBeanExporterMBeanParameterInfo arrayprotected ModelMBeanNotificationInfo[] getNotificationInfo(Object managedBean, String beanKey)
ManagedNotification metadata from the Class of the managed resource
 and generates and returns the corresponding ModelMBeanNotificationInfo metadata.getNotificationInfo in class AbstractMBeanInfoAssemblermanagedBean - the bean instance (might be an AOP proxy)beanKey - the key associated with the MBean in the beans map
 of the MBeanExporterprotected void populateMBeanDescriptor(Descriptor desc, Object managedBean, String beanKey)
ManagedResource attribute
 to the MBean descriptor. Specifically, adds the currencyTimeLimit,
 persistPolicy, persistPeriod, persistLocation
 and persistName descriptor fields if they are present in the metadata.populateMBeanDescriptor in class AbstractReflectiveMBeanInfoAssemblerdesc - the Descriptor for the MBean resource.managedBean - the bean instance (might be an AOP proxy)beanKey - the key associated with the MBean in the beans map
 of the MBeanExporterAbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer), 
AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)protected void populateAttributeDescriptor(Descriptor desc, @Nullable Method getter, @Nullable Method setter, String beanKey)
ManagedAttribute attribute or the ManagedMetric attribute
 to the attribute descriptor.populateAttributeDescriptor in class AbstractReflectiveMBeanInfoAssemblerdesc - the attribute descriptorgetter - the accessor method for the attributesetter - the mutator method for the attributebeanKey - the key associated with the MBean in the beans map
 of the MBeanExporterAbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer), 
AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)protected void populateOperationDescriptor(Descriptor desc, Method method, String beanKey)
ManagedAttribute attribute
 to the attribute descriptor. Specifically, adds the currencyTimeLimit
 descriptor field if it is present in the metadata.populateOperationDescriptor in class AbstractReflectiveMBeanInfoAssemblerdesc - the operation descriptormethod - the method corresponding to the operationbeanKey - the key associated with the MBean in the beans map
 of the MBeanExporterAbstractReflectiveMBeanInfoAssembler.setDefaultCurrencyTimeLimit(Integer), 
AbstractReflectiveMBeanInfoAssembler.applyDefaultCurrencyTimeLimit(javax.management.Descriptor)