Package org.jmxtrans.agent
Class JConsoleResultNameStrategyImpl
java.lang.Object
org.jmxtrans.agent.JConsoleResultNameStrategyImpl
- All Implemented Interfaces:
ResultNameStrategy
public class JConsoleResultNameStrategyImpl extends Object implements ResultNameStrategy
Builds names with general rules like JConsole / VisualVM do.
i.e.
<domain-name>.<property-name><property-name><attribute-name><composite-data-key-name>
E.g. For objectName = "type:name=metric,value=bar" and attribute "count",
it will general resultName = "type.metric.bar.count"- Author:
- Mahesh V Kelkar, Cyrille Le Clerc
-
Field Summary
-
Constructor Summary
Constructors Constructor Description JConsoleResultNameStrategyImpl() -
Method Summary
Modifier and Type Method Description protected StringescapeObjectName(ObjectName objectName)Transforms an ObjectName into a plain String only composed of ('a' to 'Z', 'A' to 'Z', '.', '_') similar to JConsole naming.ExpressionLanguageEnginegetExpressionLanguageEngine()StringgetResultName(Query query, ObjectName objectName, String attribute, String compositeDataKey, Integer position)voidpostConstruct(Map<String,String> settings)voidsetExpressionLanguageEngine(ExpressionLanguageEngine expressionLanguageEngine)
-
Field Details
-
logger
-
-
Constructor Details
-
JConsoleResultNameStrategyImpl
public JConsoleResultNameStrategyImpl()
-
-
Method Details
-
getResultName
@Nonnull public String getResultName(@Nonnull Query query, @Nonnull ObjectName objectName, @Nullable String attribute, @Nullable String compositeDataKey, @Nullable Integer position)- Specified by:
getResultNamein interfaceResultNameStrategy
-
escapeObjectName
Transforms an ObjectName into a plain String only composed of ('a' to 'Z', 'A' to 'Z', '.', '_') similar to JConsole naming. '_' is the escape char for not compliant chars. -
getExpressionLanguageEngine
-
setExpressionLanguageEngine
-
postConstruct
- Specified by:
postConstructin interfaceResultNameStrategy
-