Interface JmxAttributeSource
- All Known Implementing Classes:
AnnotationJmxAttributeSource
public interface JmxAttributeSource
Interface used by the
MetadataMBeanInfoAssembler
to
read source-level metadata from a managed resource's class.- Since:
- 1.2
- Author:
- Rob Harrop, Jennifer Hickey
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetManagedAttribute
(Method method) Implementations should return an instance ofManagedAttribute
if the suppliedMethod
has the corresponding metadata.getManagedMetric
(Method method) Implementations should return an instance ofManagedMetric
if the suppliedMethod
has the corresponding metadata.getManagedNotifications
(Class<?> clazz) Implementations should return an array ofManagedNotifications
if the supplied theClass
has the corresponding metadata.getManagedOperation
(Method method) Implementations should return an instance ofManagedOperation
if the suppliedMethod
has the corresponding metadata.getManagedOperationParameters
(Method method) Implementations should return an array ofManagedOperationParameter
if the suppliedMethod
has the corresponding metadata.getManagedResource
(Class<?> clazz) Implementations should return an instance ofManagedResource
if the suppliedClass
has the appropriate metadata.
-
Method Details
-
getManagedResource
Implementations should return an instance ofManagedResource
if the suppliedClass
has the appropriate metadata. Otherwise should returnnull
.- Parameters:
clazz
- the class to read the attribute data from- Returns:
- the attribute, or
null
if not found - Throws:
InvalidMetadataException
- in case of invalid attributes
-
getManagedAttribute
Implementations should return an instance ofManagedAttribute
if the suppliedMethod
has the corresponding metadata. Otherwise should returnnull
.- Parameters:
method
- the method to read the attribute data from- Returns:
- the attribute, or
null
if not found - Throws:
InvalidMetadataException
- in case of invalid attributes
-
getManagedMetric
Implementations should return an instance ofManagedMetric
if the suppliedMethod
has the corresponding metadata. Otherwise should returnnull
.- Parameters:
method
- the method to read the attribute data from- Returns:
- the metric, or
null
if not found - Throws:
InvalidMetadataException
- in case of invalid attributes
-
getManagedOperation
Implementations should return an instance ofManagedOperation
if the suppliedMethod
has the corresponding metadata. Otherwise should returnnull
.- Parameters:
method
- the method to read the attribute data from- Returns:
- the attribute, or
null
if not found - Throws:
InvalidMetadataException
- in case of invalid attributes
-
getManagedOperationParameters
ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException Implementations should return an array ofManagedOperationParameter
if the suppliedMethod
has the corresponding metadata. Otherwise should return an empty array if no metadata is found.- Parameters:
method
- theMethod
to read the metadata from- Returns:
- the parameter information.
- Throws:
InvalidMetadataException
- in the case of invalid attributes.
-
getManagedNotifications
Implementations should return an array ofManagedNotifications
if the supplied theClass
has the corresponding metadata. Otherwise should return an empty array.- Parameters:
clazz
- theClass
to read the metadata from- Returns:
- the notification information
- Throws:
InvalidMetadataException
- in the case of invalid metadata
-