Package net.welen.jmole.collector
Class MBeanCollectorImpl
- java.lang.Object
-
- net.welen.jmole.collector.MBeanCollectorImpl
-
- All Implemented Interfaces:
MBeanCollector
public class MBeanCollectorImpl extends Object implements MBeanCollector
The impl, of a MBeanCollector
-
-
Constructor Summary
Constructors Constructor Description MBeanCollectorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getAttributes()StringgetConstructedName(ObjectName objectName)By using the supplied name (together with the NameParameters and NameAttribute lists) a complete name is constructed that may be dynamic in runtimeMap<String,Long>getCounterIntervals()StringgetName()Map<String,Object>getValues(ObjectName objectName)voidsetAttributeFormatPatterns(Map<String,String> attributeFormatPatterns)voidsetAttributeRecalculations(Map<String,String> attributeRecalculations)voidsetAttributes(List<String> attributes)Which attributes from the found MBean should be collectedvoidsetCounterIntervals(Map<String,Long> counterIntervals)voidsetDataCollectorExtractors(Map<String,DataCollectorExtractor> attributeExtractors)Specify of any of the collected attributes needs to be collected using a CollectorExtractorvoidsetName(String name)Set the name of the measurementvoidsetNameAttributes(List<String> nameAttributes)Configure if the name of the measurement should be completed by a dynamic content from the found MBeans attributes.voidsetNameDomainNameParts(List<Integer> nameDomainNameParts)voidsetNameParameters(List<String> nameParameters)Configure if the name of the measurement should be completed by a dynamic content from the found MBeans parameters.
-
-
-
Method Detail
-
setName
public void setName(String name)
Description copied from interface:MBeanCollectorSet the name of the measurementUse %s to to indicate where provided attribute/parameter values should be injected when constructing the individual name for a measurement
- Specified by:
setNamein interfaceMBeanCollector
-
getName
public String getName()
- Specified by:
getNamein interfaceMBeanCollector
-
setNameAttributes
public void setNameAttributes(List<String> nameAttributes)
Description copied from interface:MBeanCollectorConfigure if the name of the measurement should be completed by a dynamic content from the found MBeans attributes.- Specified by:
setNameAttributesin interfaceMBeanCollector- Parameters:
nameAttributes- A list of attributes to parse into the name of the measurement
-
setNameParameters
public void setNameParameters(List<String> nameParameters)
Description copied from interface:MBeanCollectorConfigure if the name of the measurement should be completed by a dynamic content from the found MBeans parameters.- Specified by:
setNameParametersin interfaceMBeanCollector
-
setAttributes
public void setAttributes(List<String> attributes)
Description copied from interface:MBeanCollectorWhich attributes from the found MBean should be collected- Specified by:
setAttributesin interfaceMBeanCollector- Parameters:
attributes- A list of the attributes names
-
getAttributes
public List<String> getAttributes()
- Specified by:
getAttributesin interfaceMBeanCollector
-
setDataCollectorExtractors
public void setDataCollectorExtractors(Map<String,DataCollectorExtractor> attributeExtractors)
Description copied from interface:MBeanCollectorSpecify of any of the collected attributes needs to be collected using a CollectorExtractor- Specified by:
setDataCollectorExtractorsin interfaceMBeanCollector- Parameters:
attributeExtractors- A map of the attribute name and the CollectorExtractor to use
-
setAttributeRecalculations
public void setAttributeRecalculations(Map<String,String> attributeRecalculations)
- Specified by:
setAttributeRecalculationsin interfaceMBeanCollector
-
setAttributeFormatPatterns
public void setAttributeFormatPatterns(Map<String,String> attributeFormatPatterns)
- Specified by:
setAttributeFormatPatternsin interfaceMBeanCollector
-
getConstructedName
public String getConstructedName(ObjectName objectName) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException
Description copied from interface:MBeanCollectorBy using the supplied name (together with the NameParameters and NameAttribute lists) a complete name is constructed that may be dynamic in runtime- Specified by:
getConstructedNamein interfaceMBeanCollector- Parameters:
objectName- The MBean of which attribute and parameters may be used- Returns:
- Throws:
MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionException
-
getValues
public Map<String,Object> getValues(ObjectName objectName) throws InstanceNotFoundException, ReflectionException, AttributeNotFoundException, MBeanException
- Specified by:
getValuesin interfaceMBeanCollector- Throws:
InstanceNotFoundExceptionReflectionExceptionAttributeNotFoundExceptionMBeanException
-
-