|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jmx.export.metadata.AttributesJmxAttributeSource
public class AttributesJmxAttributeSource
Implementation of the JmxAttributeSource
interface that
reads metadata via Spring's Attributes
abstraction.
Typically used for reading in source-level attributes via Commons Attributes.
Attributes
,
CommonsAttributes
Constructor Summary | |
---|---|
AttributesJmxAttributeSource()
Create a new AttributesJmxAttributeSource. |
|
AttributesJmxAttributeSource(Attributes attributes)
Create a new AttributesJmxAttributeSource. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
ManagedAttribute |
getManagedAttribute(Method method)
If the specified method has a ManagedAttribute attribute,
then it is returned. |
ManagedOperation |
getManagedOperation(Method method)
If the specified method has a ManagedOperation attribute,
then it is returned. |
ManagedOperationParameter[] |
getManagedOperationParameters(Method method)
If the specified method has ManagedOperationParameter attributes,
then these are returned, otherwise a zero length array is returned. |
ManagedResource |
getManagedResource(Class clazz)
If the specified class has a ManagedResource attribute,
then it is returned. |
void |
setAttributes(Attributes attributes)
Set the Attributes implementation to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributesJmxAttributeSource()
setAttributes(org.springframework.metadata.Attributes)
public AttributesJmxAttributeSource(Attributes attributes)
attributes
- the Attributes implementation to useCommonsAttributes
Method Detail |
---|
public void setAttributes(Attributes attributes)
CommonsAttributes
public void afterPropertiesSet()
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
public ManagedResource getManagedResource(Class clazz)
ManagedResource
attribute,
then it is returned. Otherwise returns null.
getManagedResource
in interface JmxAttributeSource
clazz
- the class to read the attribute data from
null
if not found
InvalidMetadataException
- if more than one attribute existspublic ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException
ManagedAttribute
attribute,
then it is returned. Otherwise returns null.
getManagedAttribute
in interface JmxAttributeSource
method
- the method to read the attribute data from
null
if not found
InvalidMetadataException
- if more than one attribute exists,
or if the supplied method does not represent a JavaBean propertypublic ManagedOperation getManagedOperation(Method method)
ManagedOperation
attribute,
then it is returned. Otherwise return null.
getManagedOperation
in interface JmxAttributeSource
method
- the method to read the attribute data from
null
if not found
InvalidMetadataException
- if more than one attribute exists,
or if the supplied method represents a JavaBean propertypublic ManagedOperationParameter[] getManagedOperationParameters(Method method) throws InvalidMetadataException
ManagedOperationParameter
attributes,
then these are returned, otherwise a zero length array is returned.
getManagedOperationParameters
in interface JmxAttributeSource
method
- the method to get the managed operation parameters for
InvalidMetadataException
- if the number of ManagedOperationParameter
attributes does not match the number of parameters in the method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |