Class AnnotationJmxAttributeSource
java.lang.Object
org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource
- All Implemented Interfaces:
- Aware,- BeanFactoryAware,- JmxAttributeSource
public class AnnotationJmxAttributeSource
extends Object
implements JmxAttributeSource, BeanFactoryAware
Implementation of the 
JmxAttributeSource interface that
 reads annotations and exposes the corresponding attributes.- Since:
- 1.2
- Author:
- Rob Harrop, Juergen Hoeller, Jennifer Hickey, Stephane Nicoll
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetManagedAttribute(Method method) Implementations should return an instance ofManagedAttributeif the suppliedMethodhas the corresponding metadata.getManagedMetric(Method method) Implementations should return an instance ofManagedMetricif the suppliedMethodhas the corresponding metadata.getManagedNotifications(Class<?> clazz) Implementations should return an array ofManagedNotificationsif the suppliedClasshas the corresponding metadata.getManagedOperation(Method method) Implementations should return an instance ofManagedOperationif the suppliedMethodhas the corresponding metadata.getManagedOperationParameters(Method method) Implementations should return an array ofManagedOperationParameterif the suppliedMethodhas the corresponding metadata.getManagedResource(Class<?> beanClass) Implementations should return an instance ofManagedResourceif the suppliedClasshas the appropriate metadata.voidsetBeanFactory(BeanFactory beanFactory) Callback that supplies the owning factory to a bean instance.
- 
Constructor Details- 
AnnotationJmxAttributeSourcepublic AnnotationJmxAttributeSource()
 
- 
- 
Method Details- 
setBeanFactoryDescription copied from interface:BeanFactoryAwareCallback that supplies the owning factory to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean.afterPropertiesSet()or a custom init-method.- Specified by:
- setBeanFactoryin interface- BeanFactoryAware
- Parameters:
- beanFactory- owning BeanFactory (never- null). The bean can immediately call methods on the factory.
- See Also:
 
- 
getManagedResourcepublic @Nullable ManagedResource getManagedResource(Class<?> beanClass) throws InvalidMetadataException Description copied from interface:JmxAttributeSourceImplementations should return an instance ofManagedResourceif the suppliedClasshas the appropriate metadata. Otherwise, should returnnull.- Specified by:
- getManagedResourcein interface- JmxAttributeSource
- Parameters:
- beanClass- the class to read the attribute data from
- Returns:
- the attribute, or nullif not found
- Throws:
- InvalidMetadataException- in case of invalid attributes
 
- 
getManagedAttributepublic @Nullable ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException Description copied from interface:JmxAttributeSourceImplementations should return an instance ofManagedAttributeif the suppliedMethodhas the corresponding metadata. Otherwise, should returnnull.- Specified by:
- getManagedAttributein interface- JmxAttributeSource
- Parameters:
- method- the method to read the attribute data from
- Returns:
- the attribute, or nullif not found
- Throws:
- InvalidMetadataException- in case of invalid attributes
 
- 
getManagedMetricDescription copied from interface:JmxAttributeSourceImplementations should return an instance ofManagedMetricif the suppliedMethodhas the corresponding metadata. Otherwise, should returnnull.- Specified by:
- getManagedMetricin interface- JmxAttributeSource
- Parameters:
- method- the method to read the attribute data from
- Returns:
- the metric, or nullif not found
- Throws:
- InvalidMetadataException- in case of invalid attributes
 
- 
getManagedOperationpublic @Nullable ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException Description copied from interface:JmxAttributeSourceImplementations should return an instance ofManagedOperationif the suppliedMethodhas the corresponding metadata. Otherwise, should returnnull.- Specified by:
- getManagedOperationin interface- JmxAttributeSource
- Parameters:
- method- the method to read the attribute data from
- Returns:
- the attribute, or nullif not found
- Throws:
- InvalidMetadataException- in case of invalid attributes
 
- 
getManagedOperationParameterspublic @Nullable ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException Description copied from interface:JmxAttributeSourceImplementations should return an array ofManagedOperationParameterif the suppliedMethodhas the corresponding metadata. Otherwise, should return an empty array if no metadata is found.- Specified by:
- getManagedOperationParametersin interface- JmxAttributeSource
- Parameters:
- method- the- Methodto read the metadata from
- Returns:
- the parameter information.
- Throws:
- InvalidMetadataException- in the case of invalid attributes.
 
- 
getManagedNotificationspublic @Nullable ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException Description copied from interface:JmxAttributeSourceImplementations should return an array ofManagedNotificationsif the suppliedClasshas the corresponding metadata. Otherwise, should return an empty array.- Specified by:
- getManagedNotificationsin interface- JmxAttributeSource
- Parameters:
- clazz- the- Classto read the metadata from
- Returns:
- the notification information
- Throws:
- InvalidMetadataException- in the case of invalid metadata
 
 
-