summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 19a08d2)
raw | patch | inline | side by side (parent: 19a08d2)
author | Florian Forster <octo@noris.net> | |
Wed, 28 Oct 2009 12:31:06 +0000 (13:31 +0100) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 28 Oct 2009 12:31:06 +0000 (13:31 +0100) |
bindings/java/org/collectd/java/GenericJMXConfConnection.java | patch | blob | history | |
bindings/java/org/collectd/java/GenericJMXConfMBean.java | patch | blob | history |
diff --git a/bindings/java/org/collectd/java/GenericJMXConfConnection.java b/bindings/java/org/collectd/java/GenericJMXConfConnection.java
index 7214fd761c54f1f5ddd184bd5da311e0d82e5226..ffa9ded4fbdc874b32dc3c5e6472df5352c6c59d 100644 (file)
pd.setPlugin ("GenericJMX");
for (int i = 0; i < this._mbeans.size (); i++)
- this._mbeans.get (i).query (this._jmx_connection, pd);
+ {
+ int status;
+
+ status = this._mbeans.get (i).query (this._jmx_connection, pd);
+ if (status != 0)
+ {
+ this._jmx_connection = null;
+ return;
+ }
+ } /* for */
} /* }}} void query */
public String toString ()
diff --git a/bindings/java/org/collectd/java/GenericJMXConfMBean.java b/bindings/java/org/collectd/java/GenericJMXConfMBean.java
index 27e9e329891bd1bb02e76624aad064edbf90a6e5..1587bd5f9729009d13d72f8a31766439f33a6341 100644 (file)
return (this._name);
} /* }}} */
- public void query (MBeanServerConnection conn, PluginData pd) /* {{{ */
+ public int query (MBeanServerConnection conn, PluginData pd) /* {{{ */
{
Set<ObjectName> names;
Iterator<ObjectName> iter;
catch (Exception e)
{
Collectd.logError ("GenericJMXConfMBean: queryNames failed: " + e);
- return;
+ return (-1);
}
if (names.size () == 0)
for (int i = 0; i < this._values.size (); i++)
this._values.get (i).query (conn, objName, pd_tmp);
}
+
+ return (0);
} /* }}} void query */
}