2 * collectd/java - org/collectd/api/Collectd.java
3 * Copyright (C) 2009 Florian octo Forster
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; only version 2 of the License is applicable.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 * Florian octo Forster <octo at verplant.org>
22 package org.collectd.api;
25 * Java API to internal functions of collectd.
27 * @author Florian Forster <octo at verplant.org>
31 public static final int LOG_ERR = 3;
32 public static final int LOG_WARNING = 4;
33 public static final int LOG_NOTICE = 5;
34 public static final int LOG_INFO = 6;
35 public static final int LOG_DEBUG = 7;
37 public static final int FC_MATCH_NO_MATCH = 0;
38 public static final int FC_MATCH_MATCHES = 1;
40 public static final int FC_TARGET_CONTINUE = 0;
41 public static final int FC_TARGET_STOP = 1;
42 public static final int FC_TARGET_RETURN = 2;
45 * Java representation of collectd/src/plugin.h:plugin_register_config
47 native public static int registerConfig (String name,
48 CollectdConfigInterface object);
51 * Java representation of collectd/src/plugin.h:plugin_register_init
53 native public static int registerInit (String name,
54 CollectdInitInterface object);
57 * Java representation of collectd/src/plugin.h:plugin_register_read
59 native public static int registerRead (String name,
60 CollectdReadInterface object);
63 * Java representation of collectd/src/plugin.h:plugin_register_write
65 native public static int registerWrite (String name,
66 CollectdWriteInterface object);
69 * Java representation of collectd/src/plugin.h:plugin_register_flush
71 native public static int registerFlush (String name,
72 CollectdFlushInterface object);
75 * Java representation of collectd/src/plugin.h:plugin_register_shutdown
77 native public static int registerShutdown (String name,
78 CollectdShutdownInterface object);
81 * Java representation of collectd/src/plugin.h:plugin_register_log
83 native public static int registerLog (String name,
84 CollectdLogInterface object);
87 * Java representation of collectd/src/plugin.h:plugin_register_notification
89 native public static int registerNotification (String name,
90 CollectdNotificationInterface object);
93 * Java representation of collectd/src/filter_chain.h:fc_register_match
95 native public static int registerMatch (String name,
96 CollectdMatchFactoryInterface object);
99 * Java representation of collectd/src/plugin.h:plugin_dispatch_values
101 native public static int dispatchValues (ValueList vl);
104 * Java representation of collectd/src/plugin.h:plugin_dispatch_notification
106 native public static int dispatchNotification (Notification n);
109 * Java representation of collectd/src/plugin.h:plugin_get_ds
111 native public static DataSet getDS (String type);
114 * Java representation of collectd/src/plugin.h:plugin_log
116 native private static void log (int severity, String message);
118 public static void logError (String message)
120 log (LOG_ERR, message);
121 } /* void logError */
123 public static void logWarning (String message)
125 log (LOG_WARNING, message);
126 } /* void logWarning */
128 public static void logNotice (String message)
130 log (LOG_NOTICE, message);
131 } /* void logNotice */
133 public static void logInfo (String message)
135 log (LOG_INFO, message);
138 public static void logDebug (String message)
140 log (LOG_DEBUG, message);
141 } /* void logDebug */
143 } /* class Collectd */
145 /* vim: set sw=2 sts=2 et fdm=marker : */