projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee7a974
)
java plugin: Change the name of all functions to conform to the Java convention.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sun, 22 Feb 2009 17:55:27 +0000
(18:55 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sun, 22 Feb 2009 18:03:15 +0000
(19:03 +0100)
bindings/java/org/collectd/api/CollectdAPI.java
patch
|
blob
|
history
bindings/java/org/collectd/api/CollectdConfigInterface.java
patch
|
blob
|
history
bindings/java/org/collectd/api/CollectdInitInterface.java
patch
|
blob
|
history
bindings/java/org/collectd/api/CollectdReadInterface.java
patch
|
blob
|
history
bindings/java/org/collectd/api/CollectdShutdownInterface.java
patch
|
blob
|
history
bindings/java/org/collectd/api/CollectdWriteInterface.java
patch
|
blob
|
history
src/collectd-java.pod
patch
|
blob
|
history
src/java.c
patch
|
blob
|
history
diff --git
a/bindings/java/org/collectd/api/CollectdAPI.java
b/bindings/java/org/collectd/api/CollectdAPI.java
index
2b6e06c
..
3d713ba
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdAPI.java
+++ b/
bindings/java/org/collectd/api/CollectdAPI.java
@@
-37,72
+37,72
@@
public class CollectdAPI
/**
* Java representation of collectd/src/plugin.h:plugin_register_config
*/
/**
* Java representation of collectd/src/plugin.h:plugin_register_config
*/
- native public static int
R
egisterConfig (String name,
- CollectdConfigInterface obj);
+ native public static int
r
egisterConfig (String name,
+ CollectdConfigInterface obj
ect
);
/**
* Java representation of collectd/src/plugin.h:plugin_register_init
*/
/**
* Java representation of collectd/src/plugin.h:plugin_register_init
*/
- native public static int
R
egisterInit (String name,
- CollectdInitInterface obj);
+ native public static int
r
egisterInit (String name,
+ CollectdInitInterface obj
ect
);
/**
* Java representation of collectd/src/plugin.h:plugin_register_read
*/
/**
* Java representation of collectd/src/plugin.h:plugin_register_read
*/
- native public static int
R
egisterRead (String name,
- CollectdReadInterface obj);
+ native public static int
r
egisterRead (String name,
+ CollectdReadInterface obj
ect
);
/**
* Java representation of collectd/src/plugin.h:plugin_register_write
*/
/**
* Java representation of collectd/src/plugin.h:plugin_register_write
*/
- native public static int
R
egisterWrite (String name,
- CollectdWriteInterface obj);
+ native public static int
r
egisterWrite (String name,
+ CollectdWriteInterface obj
ect
);
/**
* Java representation of collectd/src/plugin.h:plugin_register_shutdown
*/
/**
* Java representation of collectd/src/plugin.h:plugin_register_shutdown
*/
- native public static int
R
egisterShutdown (String name,
- CollectdShutdownInterface obj);
+ native public static int
r
egisterShutdown (String name,
+ CollectdShutdownInterface obj
ect
);
/**
* Java representation of collectd/src/plugin.h:plugin_dispatch_values
*/
/**
* Java representation of collectd/src/plugin.h:plugin_dispatch_values
*/
- native public static int
D
ispatchValues (ValueList vl);
+ native public static int
d
ispatchValues (ValueList vl);
/**
* Java representation of collectd/src/plugin.h:plugin_get_ds
*/
/**
* Java representation of collectd/src/plugin.h:plugin_get_ds
*/
- native public static DataSet
G
etDS (String type);
+ native public static DataSet
g
etDS (String type);
/**
* Java representation of collectd/src/plugin.h:plugin_log
*/
/**
* Java representation of collectd/src/plugin.h:plugin_log
*/
- native private static void
L
og (int severity, String message);
+ native private static void
l
og (int severity, String message);
- public static void
L
ogError (String message)
+ public static void
l
ogError (String message)
{
{
-
L
og (LOG_ERR, message);
- } /* void
L
ogError */
+
l
og (LOG_ERR, message);
+ } /* void
l
ogError */
- public static void
L
ogWarning (String message)
+ public static void
l
ogWarning (String message)
{
{
-
L
og (LOG_WARNING, message);
- } /* void
L
ogWarning */
+
l
og (LOG_WARNING, message);
+ } /* void
l
ogWarning */
- public static void
L
ogNotice (String message)
+ public static void
l
ogNotice (String message)
{
{
-
L
og (LOG_NOTICE, message);
- } /* void
L
ogNotice */
+
l
og (LOG_NOTICE, message);
+ } /* void
l
ogNotice */
- public static void
L
ogInfo (String message)
+ public static void
l
ogInfo (String message)
{
{
-
L
og (LOG_INFO, message);
- } /* void
L
ogInfo */
+
l
og (LOG_INFO, message);
+ } /* void
l
ogInfo */
- public static void
L
ogDebug (String message)
+ public static void
l
ogDebug (String message)
{
{
-
L
og (LOG_DEBUG, message);
- } /* void
L
ogDebug */
+
l
og (LOG_DEBUG, message);
+ } /* void
l
ogDebug */
} /* class CollectdAPI */
} /* class CollectdAPI */
diff --git
a/bindings/java/org/collectd/api/CollectdConfigInterface.java
b/bindings/java/org/collectd/api/CollectdConfigInterface.java
index
8753072
..
fc6d9bd
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdConfigInterface.java
+++ b/
bindings/java/org/collectd/api/CollectdConfigInterface.java
@@
-23,5
+23,5
@@
package org.collectd.api;
public interface CollectdConfigInterface
{
public interface CollectdConfigInterface
{
- public int
C
onfig (OConfigItem ci);
+ public int
c
onfig (OConfigItem ci);
}
}
diff --git
a/bindings/java/org/collectd/api/CollectdInitInterface.java
b/bindings/java/org/collectd/api/CollectdInitInterface.java
index
09a2ab7
..
6997a2f
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdInitInterface.java
+++ b/
bindings/java/org/collectd/api/CollectdInitInterface.java
@@
-23,5
+23,5
@@
package org.collectd.api;
public interface CollectdInitInterface
{
public interface CollectdInitInterface
{
- public int
I
nit ();
+ public int
i
nit ();
}
}
diff --git
a/bindings/java/org/collectd/api/CollectdReadInterface.java
b/bindings/java/org/collectd/api/CollectdReadInterface.java
index
d5b924b
..
ac6060b
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdReadInterface.java
+++ b/
bindings/java/org/collectd/api/CollectdReadInterface.java
@@
-23,5
+23,5
@@
package org.collectd.api;
public interface CollectdReadInterface
{
public interface CollectdReadInterface
{
- public int
R
ead ();
+ public int
r
ead ();
}
}
diff --git
a/bindings/java/org/collectd/api/CollectdShutdownInterface.java
b/bindings/java/org/collectd/api/CollectdShutdownInterface.java
index
f0ccba0
..
4181a10
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdShutdownInterface.java
+++ b/
bindings/java/org/collectd/api/CollectdShutdownInterface.java
@@
-23,5
+23,5
@@
package org.collectd.api;
public interface CollectdShutdownInterface
{
public interface CollectdShutdownInterface
{
- public int
S
hutdown ();
+ public int
s
hutdown ();
}
}
diff --git
a/bindings/java/org/collectd/api/CollectdWriteInterface.java
b/bindings/java/org/collectd/api/CollectdWriteInterface.java
index
dd76f2c
..
13315a6
100644
(file)
--- a/
bindings/java/org/collectd/api/CollectdWriteInterface.java
+++ b/
bindings/java/org/collectd/api/CollectdWriteInterface.java
@@
-23,5
+23,5
@@
package org.collectd.api;
public interface CollectdWriteInterface
{
public interface CollectdWriteInterface
{
- public int
W
rite (ValueList vl);
+ public int
w
rite (ValueList vl);
}
}
diff --git
a/src/collectd-java.pod
b/src/collectd-java.pod
index
97204bc
..
02feff6
100644
(file)
--- a/
src/collectd-java.pod
+++ b/
src/collectd-java.pod
@@
-88,11
+88,11
@@
whenever one is available.
Each callback method is now explained in more detail:
Each callback method is now explained in more detail:
-=head2
C
onfig callback
+=head2
c
onfig callback
Interface: B<org.collectd.api.CollectdConfigInterface>
Interface: B<org.collectd.api.CollectdConfigInterface>
-Signature: I<int> B<
C
onfig> (I<OConfigItem>)
+Signature: I<int> B<
c
onfig> (I<OConfigItem>)
This method is passed a B<OConfigItem> object, if both, method and
configuration, are available. B<OConfigItem> is the root of a tree representing
This method is passed a B<OConfigItem> object, if both, method and
configuration, are available. B<OConfigItem> is the root of a tree representing
@@
-103,11
+103,11
@@
root are the first interesting objects.
To signal success, this method has to return zero. Anything else will be
considered an error condition and the plugin will be disabled entirely.
To signal success, this method has to return zero. Anything else will be
considered an error condition and the plugin will be disabled entirely.
-=head2
I
nit callback
+=head2
i
nit callback
Interface: B<org.collectd.api.CollectdInitInterface>
Interface: B<org.collectd.api.CollectdInitInterface>
-Signature: I<int> B<
I
nit> ()
+Signature: I<int> B<
i
nit> ()
This method is called after the configuration has been handled. It is
supposed to set up the plugin. e.E<nbsp>g. start threads, open connections, or
This method is called after the configuration has been handled. It is
supposed to set up the plugin. e.E<nbsp>g. start threads, open connections, or
@@
-116,15
+116,15
@@
check if can do anything useful at all.
To signal success, this method has to return zero. Anything else will be
considered an error condition and the plugin will be disabled entirely.
To signal success, this method has to return zero. Anything else will be
considered an error condition and the plugin will be disabled entirely.
-=head2
R
ead callback
+=head2
r
ead callback
Interface: B<org.collectd.api.CollectdReadInterface>
Interface: B<org.collectd.api.CollectdReadInterface>
-Signature: I<int> B<
R
ead> ()
+Signature: I<int> B<
r
ead> ()
This method is called periodically and is supposed to gather statistics in
whatever fashion. These statistics are represented as a B<ValueList> object and
This method is called periodically and is supposed to gather statistics in
whatever fashion. These statistics are represented as a B<ValueList> object and
-sent to the daemon using B<
D
ispatchValues>, see L<"CALLING API FUNCTIONS">
+sent to the daemon using B<
d
ispatchValues>, see L<"CALLING API FUNCTIONS">
below.
To signal success, this method has to return zero. Anything else will be
below.
To signal success, this method has to return zero. Anything else will be
@@
-133,11
+133,11
@@
Currently, returning non-zero does not have any other effects. In particular,
Java "read"-methods are not suspended for increasing intervals like C
"read"-functions.
Java "read"-methods are not suspended for increasing intervals like C
"read"-functions.
-=head2
W
rite callback
+=head2
w
rite callback
Interface: B<org.collectd.api.CollectdWriteInterface>
Interface: B<org.collectd.api.CollectdWriteInterface>
-Signature: I<int> B<
W
rite> (I<ValueList>)
+Signature: I<int> B<
w
rite> (I<ValueList>)
This method is called whenever a value is dispatched to the daemon. The
corresponding C "write"-functions are passed a C<data_set_t>, so they can
This method is called whenever a value is dispatched to the daemon. The
corresponding C "write"-functions are passed a C<data_set_t>, so they can
@@
-148,11
+148,11
@@
method of the B<ValueList> object.
To signal success, this method has to return zero. Anything else will be
considered an error condition and cause an appropriate message to be logged.
To signal success, this method has to return zero. Anything else will be
considered an error condition and cause an appropriate message to be logged.
-=head2
S
hutdown callback
+=head2
s
hutdown callback
Interface: B<org.collectd.api.CollectdShutdownInterface>
Interface: B<org.collectd.api.CollectdShutdownInterface>
-Signature: I<int> B<
S
hutdown> ()
+Signature: I<int> B<
s
hutdown> ()
This method is called when the daemon is shutting down. You should not rely on
the destructor to clean up behind the object but use this function instead.
This method is called when the daemon is shutting down. You should not rely on
the destructor to clean up behind the object but use this function instead.
@@
-174,16
+174,16
@@
daemon:
{
public Foobar ()
{
{
public Foobar ()
{
- CollectdAPI.
R
egisterRead ("Foobar", this);
+ CollectdAPI.
r
egisterRead ("Foobar", this);
}
}
- public int
R
ead ()
+ public int
r
ead ()
{
ValueList vl;
/* Do something... */
{
ValueList vl;
/* Do something... */
- CollectdAPI.
D
ispatchValues (vl);
+ CollectdAPI.
d
ispatchValues (vl);
}
}
}
}
@@
-195,31
+195,31
@@
class. This makes calling these functions pretty straight forward.
The currently exported functions are:
The currently exported functions are:
-=head2
R
egisterRead
+=head2
r
egisterRead
-Signature: I<int> B<
R
egisterRead> (I<String> name,
+Signature: I<int> B<
r
egisterRead> (I<String> name,
I<CollectdReadInterface> object)
I<CollectdReadInterface> object)
-Registers the B<
R
ead> function of I<object> with the daemon.
+Registers the B<
r
ead> function of I<object> with the daemon.
For a description of the B<CollectdReadInterface> interface, see
L<"REGISTERING CALLBACKS"> above.
Returns zero upon success and non-zero when an error occurred.
For a description of the B<CollectdReadInterface> interface, see
L<"REGISTERING CALLBACKS"> above.
Returns zero upon success and non-zero when an error occurred.
-=head2
R
egisterWrite
+=head2
r
egisterWrite
-Signature: I<int> B<
R
egisterWrite> (I<String> name,
+Signature: I<int> B<
r
egisterWrite> (I<String> name,
I<CollectdWriteInterface> object)
I<CollectdWriteInterface> object)
-Registers the B<
W
rite> function of I<object> with the daemon.
+Registers the B<
w
rite> function of I<object> with the daemon.
For a description of the B<CollectdWriteInterface> interface, see
L<"REGISTERING CALLBACKS"> above.
Returns zero upon success and non-zero when an error occurred.
For a description of the B<CollectdWriteInterface> interface, see
L<"REGISTERING CALLBACKS"> above.
Returns zero upon success and non-zero when an error occurred.
-=head2
D
ispatchValues
+=head2
d
ispatchValues
-Signature: I<int> B<
D
ispatchValues> (I<ValueList>)
+Signature: I<int> B<
d
ispatchValues> (I<ValueList>)
Passes the values represented by the B<ValueList> object to the
C<plugin_dispatch_values> function of the daemon. The "data set" (or list of
Passes the values represented by the B<ValueList> object to the
C<plugin_dispatch_values> function of the daemon. The "data set" (or list of
@@
-229,9
+229,9
@@
is therefore absolutely okay to leave this blank.
Returns zero upon success or non-zero upon failure.
Returns zero upon success or non-zero upon failure.
-=head2
G
etDS
+=head2
g
etDS
-Signature: I<DataSet> B<
G
etDS> (I<String>)
+Signature: I<DataSet> B<
g
etDS> (I<String>)
Returns the approrpate I<type> or B<null> if the type is not defined.
Returns the approrpate I<type> or B<null> if the type is not defined.
diff --git
a/src/java.c
b/src/java.c
index
5538270
..
d4acdab
100644
(file)
--- a/
src/java.c
+++ b/
src/java.c
@@
-1280,35
+1280,35
@@
static void JNICALL cjni_api_log (JNIEnv *jvm_env, /* {{{ */
* Java. */
static JNINativeMethod jni_api_functions[] = /* {{{ */
{
* Java. */
static JNINativeMethod jni_api_functions[] = /* {{{ */
{
- { "
D
ispatchValues",
+ { "
d
ispatchValues",
"(Lorg/collectd/api/ValueList;)I",
cjni_api_dispatch_values },
"(Lorg/collectd/api/ValueList;)I",
cjni_api_dispatch_values },
- { "
G
etDS",
+ { "
g
etDS",
"(Ljava/lang/String;)Lorg/collectd/api/DataSet;",
cjni_api_get_ds },
"(Ljava/lang/String;)Lorg/collectd/api/DataSet;",
cjni_api_get_ds },
- { "
R
egisterConfig",
+ { "
r
egisterConfig",
"(Ljava/lang/String;Lorg/collectd/api/CollectdConfigInterface;)I",
cjni_api_register_config },
"(Ljava/lang/String;Lorg/collectd/api/CollectdConfigInterface;)I",
cjni_api_register_config },
- { "
R
egisterInit",
+ { "
r
egisterInit",
"(Ljava/lang/String;Lorg/collectd/api/CollectdInitInterface;)I",
cjni_api_register_init },
"(Ljava/lang/String;Lorg/collectd/api/CollectdInitInterface;)I",
cjni_api_register_init },
- { "
R
egisterRead",
+ { "
r
egisterRead",
"(Ljava/lang/String;Lorg/collectd/api/CollectdReadInterface;)I",
cjni_api_register_read },
"(Ljava/lang/String;Lorg/collectd/api/CollectdReadInterface;)I",
cjni_api_register_read },
- { "
R
egisterWrite",
+ { "
r
egisterWrite",
"(Ljava/lang/String;Lorg/collectd/api/CollectdWriteInterface;)I",
cjni_api_register_write },
"(Ljava/lang/String;Lorg/collectd/api/CollectdWriteInterface;)I",
cjni_api_register_write },
- { "
R
egisterShutdown",
+ { "
r
egisterShutdown",
"(Ljava/lang/String;Lorg/collectd/api/CollectdShutdownInterface;)I",
cjni_api_register_shutdown },
"(Ljava/lang/String;Lorg/collectd/api/CollectdShutdownInterface;)I",
cjni_api_register_shutdown },
- { "
L
og",
+ { "
l
og",
"(ILjava/lang/String;)V",
cjni_api_log },
};
"(ILjava/lang/String;)V",
cjni_api_log },
};
@@
-1332,27
+1332,27
@@
static cjni_callback_info_t *cjni_callback_info_create (JNIEnv *jvm_env, /* {{{
switch (type)
{
case CB_TYPE_CONFIG:
switch (type)
{
case CB_TYPE_CONFIG:
- method_name = "
C
onfig";
+ method_name = "
c
onfig";
method_signature = "(Lorg/collectd/api/OConfigItem;)I";
break;
case CB_TYPE_INIT:
method_signature = "(Lorg/collectd/api/OConfigItem;)I";
break;
case CB_TYPE_INIT:
- method_name = "
I
nit";
+ method_name = "
i
nit";
method_signature = "()I";
break;
case CB_TYPE_READ:
method_signature = "()I";
break;
case CB_TYPE_READ:
- method_name = "
R
ead";
+ method_name = "
r
ead";
method_signature = "()I";
break;
case CB_TYPE_WRITE:
method_signature = "()I";
break;
case CB_TYPE_WRITE:
- method_name = "
W
rite";
+ method_name = "
w
rite";
method_signature = "(Lorg/collectd/api/ValueList;)I";
break;
case CB_TYPE_SHUTDOWN:
method_signature = "(Lorg/collectd/api/ValueList;)I";
break;
case CB_TYPE_SHUTDOWN:
- method_name = "
S
hutdown";
+ method_name = "
s
hutdown";
method_signature = "()I";
break;
method_signature = "()I";
break;