Bring in hostname as defined in the main configuration by default
[collectd.git] / bindings / java / org / collectd / api / Collectd.java
index 022fd07..e962f6e 100644 (file)
@@ -219,7 +219,7 @@ public class Collectd
    * Java representation of collectd/src/filter_chain.h:fc_register_target
    *
    * @return Zero when successful, non-zero otherwise.
-   * @see CollectdTargetTargetInterface
+   * @see CollectdTargetFactoryInterface
    */
   native public static int registerTarget (String name,
       CollectdTargetFactoryInterface object);
@@ -252,6 +252,13 @@ public class Collectd
   native private static void log (int severity, String message);
 
   /**
+   * Yield contents of collectd/src/collectd.h:hostname_g
+   *
+   * @return The hostname as set in the collectd configuration.
+   */
+  native public static java.lang.String getHostname ();
+
+  /**
    * Prints an error message.
    */
   public static void logError (String message)