One of the ways to integrate the Cloud Alert Messaging Gateway with your databases is by writing plugins. Plugins are Java class files that are loaded by the gateway, and can thus extract data from any data source, including databases.
Plugin development is a lot simpler than it sounds - you can simply use the sample plugin provided and replace the sql statements and field names to make a working plugin. The code in the sample plugin is production-ready.
Once you have created your plugin's .java file as per the instructions in the
Plugin Developers Guide
, you need to compile it to create a .class that can be loaded by the gateway. The javacplugin.bat file in the \cag\dbc\plugins directory will help in the compilation process.
Note that your plugin can comprise of multiple classes. In this case, compile all of the java files into classes, but
enter the name of only the main file in the Configure Plugins section. The main file is the file that extends
DBCDBPlugin or DBCGenericPlugin.
If you wish to use a third-party IDE (for example, Eclipse or Idea) to create your plugins, ensure that the
\cag\dbc\pluginstubs directory is added or copied into your project. The database drivers in \cag\lib\jdbc may
also need to be added.