package org.collectd.api;
+/**
+ * Interface for objects implementing a config function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerConfig(String, CollectdConfigInterface)
+ */
public interface CollectdConfigInterface
{
public int config (OConfigItem ci);
package org.collectd.api;
+/**
+ * Interface for objects implementing a flush function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerFlush
+ */
public interface CollectdFlushInterface
{
public int flush (int timeout, String identifier);
package org.collectd.api;
+/**
+ * Interface for objects implementing an init function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerInit
+ */
public interface CollectdInitInterface
{
public int init ();
package org.collectd.api;
+/**
+ * Interface for objects implementing a log function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerLog
+ */
public interface CollectdLogInterface
{
public void log (int severity, String message);
package org.collectd.api;
+/**
+ * Interface for objects implementing a read function.
+ *
+ * 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
{
+ /**
+ * 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 ();
}
package org.collectd.api;
+/**
+ * Interface for objects implementing a shutdown function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerShutdown
+ */
public interface CollectdShutdownInterface
{
public int shutdown ();
package org.collectd.api;
+/**
+ * Interface for objects implementing a write function.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ * @see Collectd#registerWrite
+ */
public interface CollectdWriteInterface
{
public int write (ValueList vl);