X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bindings%2Fjava%2Forg%2Fcollectd%2Fapi%2FCollectdReadInterface.java;h=67f1898ba2411a08892fe84734a5f3ad35980d46;hb=9d15d1058b93acb7be041934acfe76548539041a;hp=6b3e1ad86bca657d3327aaec41a567a618f993a3;hpb=35b50aa3a8ba1b3b8abd2197a998c2622a763ac1;p=collectd.git diff --git a/bindings/java/org/collectd/api/CollectdReadInterface.java b/bindings/java/org/collectd/api/CollectdReadInterface.java index 6b3e1ad8..67f1898b 100644 --- a/bindings/java/org/collectd/api/CollectdReadInterface.java +++ b/bindings/java/org/collectd/api/CollectdReadInterface.java @@ -21,7 +21,27 @@ 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 { - 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 (); }