public class JexlNamingStrategy extends Object implements NamingStrategy
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_EXPRESSION |
protected org.apache.commons.jexl2.JexlEngine |
jexl |
protected org.apache.commons.jexl2.Expression |
parsedExpr |
static String |
VAR__ATTRIBUTE_NAME |
static String |
VAR__CLASSNAME |
static String |
VAR__CLASSNAME_ALIAS |
static String |
VAR__EFFECTIVE_CLASSNAME |
static String |
VAR__RESULT |
static String |
VAR__TYPENAME |
| Constructor and Description |
|---|
JexlNamingStrategy()
Create a new naming strategy using an JEXL expression and the default expression.
|
JexlNamingStrategy(String expr)
Create a new naming strategy using an JEXL expression and the given expression.
|
| Modifier and Type | Method and Description |
|---|---|
String |
formatName(Result result)
Format the name for the given result.
|
protected void |
populateContext(org.apache.commons.jexl2.JexlContext context,
Result result)
Populate the context with values from the result.
|
void |
setExpression(String expr) |
public static final String DEFAULT_EXPRESSION
public static final String VAR__CLASSNAME
public static final String VAR__ATTRIBUTE_NAME
public static final String VAR__CLASSNAME_ALIAS
public static final String VAR__EFFECTIVE_CLASSNAME
public static final String VAR__TYPENAME
public static final String VAR__RESULT
protected org.apache.commons.jexl2.JexlEngine jexl
protected org.apache.commons.jexl2.Expression parsedExpr
public JexlNamingStrategy()
throws org.apache.commons.jexl2.JexlException
org.apache.commons.jexl2.JexlExceptionpublic JexlNamingStrategy(String expr) throws org.apache.commons.jexl2.JexlException
expr - - the JEXL expression to use to create names.org.apache.commons.jexl2.JexlExceptionpublic String formatName(Result result)
formatName in interface NamingStrategyresult - - the result of a JMX query.public void setExpression(String expr) throws org.apache.commons.jexl2.JexlException
org.apache.commons.jexl2.JexlExceptionprotected void populateContext(org.apache.commons.jexl2.JexlContext context,
Result result)
context - - the expression context used when evaluating JEXL expressions.result - - the result of a JMX query.Copyright © 2010-2016 JmxTrans team. All Rights Reserved.