Interface JmxAttributeSource
- All Known Implementing Classes:
AnnotationJmxAttributeSource
public interface JmxAttributeSource
Interface used by theMetadataMBeanInfoAssemblerto read source-level metadata from a managed resource's class.- Since:
- 1.2
- Author:
- Rob Harrop, Jennifer Hickey
- See Also:
MetadataMBeanInfoAssembler.setAttributeSource(org.springframework.jmx.export.metadata.JmxAttributeSource),MBeanExporter.setAssembler(org.springframework.jmx.export.assembler.MBeanInfoAssembler)
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ManagedAttributegetManagedAttribute(Method method)Implementations should return an instance ofManagedAttributeif the suppliedMethodhas the corresponding metadata.ManagedMetricgetManagedMetric(Method method)Implementations should return an instance ofManagedMetricif the suppliedMethodhas the corresponding metadata.ManagedNotification[]getManagedNotifications(Class<?> clazz)Implementations should return an array ofManagedNotificationsif the supplied theClasshas the corresponding metadata.ManagedOperationgetManagedOperation(Method method)Implementations should return an instance ofManagedOperationif the suppliedMethodhas the corresponding metadata.ManagedOperationParameter[]getManagedOperationParameters(Method method)Implementations should return an array ofManagedOperationParameterif the suppliedMethodhas the corresponding metadata.ManagedResourcegetManagedResource(Class<?> clazz)Implementations should return an instance ofManagedResourceif the suppliedClasshas the appropriate metadata.
Method Detail
getManagedResource
ManagedResource getManagedResource(Class<?> clazz) throws InvalidMetadataException
Implementations should return an instance ofManagedResourceif the suppliedClasshas the appropriate metadata. Otherwise should returnnull.- Parameters:
clazz- the class to read the attribute data from- Returns:
- the attribute, or
nullif not found - Throws:
InvalidMetadataException- in case of invalid attributes
getManagedAttribute
ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException
Implementations should return an instance ofManagedAttributeif the suppliedMethodhas the corresponding metadata. Otherwise should returnnull.- Parameters:
method- the method to read the attribute data from- Returns:
- the attribute, or
nullif not found - Throws:
InvalidMetadataException- in case of invalid attributes
getManagedMetric
ManagedMetric getManagedMetric(Method method) throws InvalidMetadataException
Implementations should return an instance ofManagedMetricif the suppliedMethodhas the corresponding metadata. Otherwise should returnnull.- Parameters:
method- the method to read the attribute data from- Returns:
- the metric, or
nullif not found - Throws:
InvalidMetadataException- in case of invalid attributes
getManagedOperation
ManagedOperation getManagedOperation(Method method) throws InvalidMetadataException
Implementations should return an instance ofManagedOperationif the suppliedMethodhas the corresponding metadata. Otherwise should returnnull.- Parameters:
method- the method to read the attribute data from- Returns:
- the attribute, or
nullif not found - Throws:
InvalidMetadataException- in case of invalid attributes
getManagedOperationParameters
ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException
Implementations should return an array ofManagedOperationParameterif the suppliedMethodhas the corresponding metadata. Otherwise should return an empty array if no metadata is found.- Parameters:
method- theMethodto read the metadata from- Returns:
- the parameter information.
- Throws:
InvalidMetadataException- in the case of invalid attributes.
getManagedNotifications
ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException
Implementations should return an array ofManagedNotificationsif the supplied theClasshas the corresponding metadata. Otherwise should return an empty array.- Parameters:
clazz- theClassto read the metadata from- Returns:
- the notification information
- Throws:
InvalidMetadataException- in the case of invalid metadata