diff --git a/bindings/java/org/collectd/api/CollectdReadInterface.java b/bindings/java/org/collectd/api/CollectdReadInterface.java
index d5b924b24945dc93551c2c62446a56770ab95d31..67f1898ba2411a08892fe84734a5f3ad35980d46 100644 (file)
package org.collectd.api;
package org.collectd.api;
+/**
+ * Interface for objects implementing a read method.
+ *
+ * Objects implementing this interface can be registered with the daemon. Their
+ * read method is then called periodically to acquire and submit values.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerRead
+ */
public interface CollectdReadInterface
{
public interface CollectdReadInterface
{
- public int Read ();
+ /**
+ * Callback method for read plugins.
+ *
+ * This method is called once every few seconds (depends on the
+ * configuration of the daemon). It is supposed to gather values in
+ * some way and submit them to the daemon using
+ * {@link Collectd#dispatchValues}.
+ *
+ * @return zero when successful, non-zero when an error occurred.
+ * @see Collectd#dispatchValues
+ */
+ public int read ();
}
}