public class Query extends java.lang.Object implements Collector
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.String> |
attributes
The attribute(s) to retrieve (
MBeanServer.getAttribute(javax.management.ObjectName, String))
If empty, will fetch all attributes of the MBean. |
protected java.lang.String |
key
If the MBean attribute value is a
CompositeData, the key to lookup. |
protected javax.management.ObjectName |
objectName |
protected java.lang.Integer |
position
If the returned value is a
Collectionor an array, the position of the entry to lookup. |
protected java.lang.String |
resultAlias |
protected ResultNameStrategy |
resultNameStrategy |
| Constructor and Description |
|---|
Query(java.lang.String objectName,
java.util.List<java.lang.String> attributes,
java.lang.String key,
java.lang.Integer position,
java.lang.String type,
java.lang.String resultAlias,
ResultNameStrategy resultNameStrategy,
java.lang.Integer collectInterval)
Creates a query that accepts a list of attributes to collect.
|
Query(java.lang.String objectName,
java.lang.String attribute,
int position,
ResultNameStrategy resultNameStrategy) |
Query(java.lang.String objectName,
java.lang.String attribute,
ResultNameStrategy resultNameStrategy) |
Query(java.lang.String objectName,
java.lang.String attribute,
java.lang.String key,
java.lang.Integer position,
java.lang.String type,
java.lang.String resultAlias,
ResultNameStrategy resultNameStrategy)
Creates a Query with no collectInterval overide.
|
Query(java.lang.String objectName,
java.lang.String attribute,
java.lang.String key,
java.lang.Integer position,
java.lang.String type,
java.lang.String resultAlias,
ResultNameStrategy resultNameStrategy,
java.lang.Integer collectInterval) |
Query(java.lang.String objectName,
java.lang.String attribute,
java.lang.String resultAlias,
ResultNameStrategy resultNameStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
collectAndExport(javax.management.MBeanServer mbeanServer,
OutputWriter outputWriter) |
java.util.List<java.lang.String> |
getAttributes() |
java.lang.Integer |
getCollectIntervalOverrideOrNull() |
java.lang.String |
getKey() |
javax.management.ObjectName |
getObjectName() |
java.lang.Integer |
getPosition() |
java.lang.String |
getResultAlias() |
java.lang.String |
getType() |
java.lang.String |
toString() |
@Nonnull protected ResultNameStrategy resultNameStrategy
@Nonnull protected final javax.management.ObjectName objectName
@Nonnull protected java.util.List<java.lang.String> attributes
MBeanServer.getAttribute(javax.management.ObjectName, String))
If empty, will fetch all attributes of the MBean.@Nullable protected final java.lang.String resultAlias
@Nullable protected final java.lang.String key
CompositeData, the key to lookup.CompositeData.get(String)@Nullable protected final java.lang.Integer position
Collectionor an array, the position of the entry to lookup.public Query(@Nonnull
java.lang.String objectName,
@Nullable
java.lang.String attribute,
@Nonnull
ResultNameStrategy resultNameStrategy)
public Query(@Nonnull
java.lang.String objectName,
@Nullable
java.lang.String attribute,
int position,
@Nonnull
ResultNameStrategy resultNameStrategy)
public Query(@Nonnull
java.lang.String objectName,
@Nullable
java.lang.String attribute,
@Nullable
java.lang.String resultAlias,
@Nonnull
ResultNameStrategy resultNameStrategy)
public Query(@Nonnull
java.lang.String objectName,
@Nullable
java.lang.String attribute,
@Nullable
java.lang.String key,
@Nullable
java.lang.Integer position,
@Nullable
java.lang.String type,
@Nullable
java.lang.String resultAlias,
@Nonnull
ResultNameStrategy resultNameStrategy)
public Query(@Nonnull
java.lang.String objectName,
@Nullable
java.lang.String attribute,
@Nullable
java.lang.String key,
@Nullable
java.lang.Integer position,
@Nullable
java.lang.String type,
@Nullable
java.lang.String resultAlias,
@Nonnull
ResultNameStrategy resultNameStrategy,
@Nullable
java.lang.Integer collectInterval)
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 Query(@Nonnull
java.lang.String objectName,
@Nonnull
java.util.List<java.lang.String> attributes,
@Nullable
java.lang.String key,
@Nullable
java.lang.Integer position,
@Nullable
java.lang.String type,
@Nullable
java.lang.String resultAlias,
@Nonnull
ResultNameStrategy resultNameStrategy,
@Nullable
java.lang.Integer collectInterval)
collectInterval - Query(String, String, String, Integer, String, String, ResultNameStrategy)public void collectAndExport(@Nonnull
javax.management.MBeanServer mbeanServer,
@Nonnull
OutputWriter outputWriter)
collectAndExport in interface Collectorpublic java.lang.String toString()
toString in class java.lang.Object@Nonnull public javax.management.ObjectName getObjectName()
@Nullable public java.lang.String getResultAlias()
@Nullable public java.util.List<java.lang.String> getAttributes()
@Nullable public java.lang.String getKey()
@Nullable public java.lang.Integer getPosition()
@Nullable public java.lang.String getType()
@Nullable public java.lang.Integer getCollectIntervalOverrideOrNull()
Copyright © 2019. All Rights Reserved.