Package org.jmxtrans.agent
Class JConsoleResultNameStrategyImpl
java.lang.Object
org.jmxtrans.agent.JConsoleResultNameStrategyImpl
- All Implemented Interfaces:
ResultNameStrategy
public class JConsoleResultNameStrategyImpl extends java.lang.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 java.lang.StringescapeObjectName(javax.management.ObjectName objectName)Transforms an ObjectName into a plain String only composed of ('a' to 'Z', 'A' to 'Z', '.', '_') similar to JConsole naming.ExpressionLanguageEnginegetExpressionLanguageEngine()java.lang.StringgetResultName(Query query, javax.management.ObjectName objectName, java.lang.String attribute, java.lang.String compositeDataKey, java.lang.Integer position)voidpostConstruct(java.util.Map<java.lang.String,java.lang.String> settings)voidsetExpressionLanguageEngine(ExpressionLanguageEngine expressionLanguageEngine)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
logger
-
-
Constructor Details
-
JConsoleResultNameStrategyImpl
public JConsoleResultNameStrategyImpl()
-
-
Method Details
-
getResultName
@Nonnull public java.lang.String getResultName(@Nonnull Query query, @Nonnull javax.management.ObjectName objectName, @Nullable java.lang.String attribute, @Nullable java.lang.String compositeDataKey, @Nullable java.lang.Integer position)- Specified by:
getResultNamein interfaceResultNameStrategy
-
escapeObjectName
protected java.lang.String escapeObjectName(@Nonnull javax.management.ObjectName objectName)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
public void postConstruct(@Nonnull java.util.Map<java.lang.String,java.lang.String> settings)- Specified by:
postConstructin interfaceResultNameStrategy
-