public class JexlNamingStrategy extends java.lang.Object implements NamingStrategy
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_EXPRESSION |
protected org.apache.commons.jexl2.JexlEngine |
jexl |
protected org.apache.commons.jexl2.Expression |
parsedExpr |
static java.lang.String |
VAR_ATTRIBUTE_NAME |
static java.lang.String |
VAR_CLASSNAME |
static java.lang.String |
VAR_CLASSNAME_ALIAS |
static java.lang.String |
VAR_EFFECTIVE_CLASSNAME |
static java.lang.String |
VAR_RESULT |
static java.lang.String |
VAR_TYPENAME |
| Constructor and Description |
|---|
JexlNamingStrategy()
Create a new naming strategy using an JEXL expression and the default expression.
|
JexlNamingStrategy(java.lang.String expr)
Create a new naming strategy using an JEXL expression and the given expression.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.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(java.lang.String expr) |
public static final java.lang.String DEFAULT_EXPRESSION
public static final java.lang.String VAR_CLASSNAME
public static final java.lang.String VAR_ATTRIBUTE_NAME
public static final java.lang.String VAR_CLASSNAME_ALIAS
public static final java.lang.String VAR_EFFECTIVE_CLASSNAME
public static final java.lang.String VAR_TYPENAME
public static final java.lang.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(java.lang.String expr)
throws org.apache.commons.jexl2.JexlException
expr - - the JEXL expression to use to create names.org.apache.commons.jexl2.JexlExceptionpublic java.lang.String formatName(Result result)
formatName in interface NamingStrategyresult - - the result of a JMX query.public void setExpression(java.lang.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-2018 JmxTrans team. All Rights Reserved.