- switch (type)
- {
- case CB_TYPE_CONFIG:
- method_name = "config";
- method_signature = "(Lorg/collectd/api/OConfigItem;)I";
- break;
-
- case CB_TYPE_INIT:
- method_name = "init";
- method_signature = "()I";
- break;
-
- case CB_TYPE_READ:
- method_name = "read";
- method_signature = "()I";
- break;
-
- case CB_TYPE_WRITE:
- method_name = "write";
- method_signature = "(Lorg/collectd/api/ValueList;)I";
- break;
-
- case CB_TYPE_FLUSH:
- method_name = "flush";
- method_signature = "(Ljava/lang/Number;Ljava/lang/String;)I";
- break;
-
- case CB_TYPE_SHUTDOWN:
- method_name = "shutdown";
- method_signature = "()I";
- break;
-
- case CB_TYPE_LOG:
- method_name = "log";
- method_signature = "(ILjava/lang/String;)V";
- break;
-
- case CB_TYPE_NOTIFICATION:
- method_name = "notification";
- method_signature = "(Lorg/collectd/api/Notification;)I";
- break;
-
- case CB_TYPE_MATCH:
- method_name = "createMatch";
- method_signature = "(Lorg/collectd/api/OConfigItem;)"
- "Lorg/collectd/api/CollectdMatchInterface;";
- break;
-
- case CB_TYPE_TARGET:
- method_name = "createTarget";
- method_signature = "(Lorg/collectd/api/OConfigItem;)"
- "Lorg/collectd/api/CollectdTargetInterface;";
- break;
-
- default:
- ERROR ("java plugin: cjni_callback_info_create: Unknown type: %#x",
- type);
- return (NULL);
+ switch (type) {
+ case CB_TYPE_CONFIG:
+ method_name = "config";
+ method_signature = "(Lorg/collectd/api/OConfigItem;)I";
+ break;
+
+ case CB_TYPE_INIT:
+ method_name = "init";
+ method_signature = "()I";
+ break;
+
+ case CB_TYPE_READ:
+ method_name = "read";
+ method_signature = "()I";
+ break;
+
+ case CB_TYPE_WRITE:
+ method_name = "write";
+ method_signature = "(Lorg/collectd/api/ValueList;)I";
+ break;
+
+ case CB_TYPE_FLUSH:
+ method_name = "flush";
+ method_signature = "(Ljava/lang/Number;Ljava/lang/String;)I";
+ break;
+
+ case CB_TYPE_SHUTDOWN:
+ method_name = "shutdown";
+ method_signature = "()I";
+ break;
+
+ case CB_TYPE_LOG:
+ method_name = "log";
+ method_signature = "(ILjava/lang/String;)V";
+ break;
+
+ case CB_TYPE_NOTIFICATION:
+ method_name = "notification";
+ method_signature = "(Lorg/collectd/api/Notification;)I";
+ break;
+
+ case CB_TYPE_MATCH:
+ method_name = "createMatch";
+ method_signature = "(Lorg/collectd/api/OConfigItem;)"
+ "Lorg/collectd/api/CollectdMatchInterface;";
+ break;
+
+ case CB_TYPE_TARGET:
+ method_name = "createTarget";
+ method_signature = "(Lorg/collectd/api/OConfigItem;)"
+ "Lorg/collectd/api/CollectdTargetInterface;";
+ break;
+
+ default:
+ ERROR("java plugin: cjni_callback_info_create: Unknown type: %#x", type);
+ return (NULL);