java plugin: Implemented write plugin registration.
[collectd.git] / bindings / java / org / collectd / api / CollectdAPI.java
index 67c8e6a..9e76e0e 100644 (file)
 
 package org.collectd.api;
 
-import java.util.List;
-import org.collectd.protocol.ValueList;
-import org.collectd.protocol.DataSource;
-
+/**
+ * Java API to internal functions of collectd.
+ *
+ * @author Florian Forster <octo at verplant.org>
+ */
 public class CollectdAPI
 {
+  /**
+   * Java representation of collectd/src/plugin.h:plugin_dispatch_values
+   */
   native public static int DispatchValues (ValueList vl);
 
-  native public static List<DataSource> GetDS (String type);
+  /**
+   * Java representation of collectd/src/plugin.h:plugin_get_ds
+   */
+  native public static DataSet GetDS (String type);
+
+  /**
+   * Java representation of collectd/src/plugin.h:plugin_register_read
+   */
+  native public static int RegisterRead (String name,
+      CollectdReadInterface obj);
+
+  /**
+   * Java representation of collectd/src/plugin.h:plugin_register_write
+   */
+  native public static int RegisterWrite (String name,
+      CollectdWriteInterface obj);
 } /* class CollectdAPI */
 
 /* vim: set sw=2 sts=2 et fdm=marker : */