iter = names.iterator ();
while (iter.hasNext ())
{
ObjectName objName;
PluginData pd_tmp;
List<String> instanceList;
StringBuffer instance;
objName = iter.next ();
pd_tmp = new PluginData (pd);
instanceList = new ArrayList<String> ();
instance = new StringBuffer ();
Collectd.logDebug ("GenericJMXConfMBean: objName = "
+ objName.toString ());
for (int i = 0; i < this._instance_from.size (); i++)
{
String propertyName;
String propertyValue;
propertyName = this._instance_from.get (i);
propertyValue = objName.getKeyProperty (propertyName);
if (propertyValue == null)
{
Collectd.logError ("GenericJMXConfMBean: "
+ "No such property in object name: " + propertyName);
}
else
{
instanceList.add (propertyValue);
}
}
if (instance_prefix != null)
instance.append (instance_prefix);
if (this._instance_prefix != null)
instance.append (this._instance_prefix);
for (int i = 0; i < instanceList.size (); i++)
{
if (i > 0)
instance.append ("-");
instance.append (instanceList.get (i));
}
pd_tmp.setPluginInstance (instance.toString ());
Collectd.logDebug ("GenericJMXConfMBean: instance = " + instance.toString ());
for (int i = 0; i < this._values.size (); i++)
this._values.get (i).query (conn, objName, pd_tmp);