public class Query extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
attribute
The attribute to retrieve (
MBeanServer.getAttribute(javax.management.ObjectName, String)) |
protected String |
key
If the MBean attribute value is a
CompositeData, the key to lookup. |
protected ObjectName |
objectName |
protected Integer |
position
If the returned value is a
Collectionor an array, the position of the entry to lookup. |
protected String |
resultAlias |
protected ResultNameStrategy |
resultNameStrategy |
| Constructor and Description |
|---|
Query(String objectName,
String attribute,
int position,
ResultNameStrategy resultNameStrategy) |
Query(String objectName,
String attribute,
ResultNameStrategy resultNameStrategy) |
Query(String objectName,
String attribute,
String key,
Integer position,
String type,
String resultAlias,
ResultNameStrategy resultNameStrategy) |
Query(String objectName,
String attribute,
String resultAlias,
ResultNameStrategy resultNameStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
collectAndExport(MBeanServer mbeanServer,
OutputWriter outputWriter) |
String |
getAttribute() |
String |
getKey() |
ObjectName |
getObjectName() |
Integer |
getPosition() |
String |
getResultAlias() |
String |
getType() |
String |
toString() |
@Nonnull protected ResultNameStrategy resultNameStrategy
@Nonnull protected final ObjectName objectName
@Nonnull protected final String attribute
MBeanServer.getAttribute(javax.management.ObjectName, String))@Nullable protected final String key
CompositeData, the key to lookup.@Nullable protected final Integer position
Collectionor an array, the position of the entry to lookup.public Query(@Nonnull String objectName, @Nonnull String attribute, @Nonnull ResultNameStrategy resultNameStrategy)
public Query(@Nonnull String objectName, @Nonnull String attribute, int position, @Nonnull ResultNameStrategy resultNameStrategy)
public Query(@Nonnull String objectName, @Nonnull String attribute, @Nonnull String resultAlias, @Nonnull ResultNameStrategy resultNameStrategy)
public Query(@Nonnull String objectName, @Nonnull String attribute, @Nullable String key, @Nullable Integer position, @Nullable String type, @Nonnull String resultAlias, @Nonnull ResultNameStrategy resultNameStrategy)
objectName - The ObjectName to search for
(MBeanServer.queryMBeans(javax.management.ObjectName, javax.management.QueryExp)),
can contain wildcards and return several entries.attribute - The attribute to retrieve (MBeanServer.getAttribute(javax.management.ObjectName, String))key - if the MBean attribute value is a CompositeData, the key to lookup.position - if the returned value is a Collection or an array, the position of the entry to lookup.type - type of the metric ('counter', 'gauge', ...)resultAlias - resultNameStrategy - the ResultNameStrategy used during the
collectAndExport(javax.management.MBeanServer, OutputWriter) phase.public void collectAndExport(@Nonnull MBeanServer mbeanServer, @Nonnull OutputWriter outputWriter)
@Nonnull public ObjectName getObjectName()
Copyright © 2014. All Rights Reserved.