Home

 

If you want to develop your own plugin you have to download the TotalCounter plugin development library. You can either download the standalone library jar file or you better use one packaged together with the Simulator plugin (see below).

The easiest way to create a plugin is to use the template which comes in the form of a Simulator plugin, which is the skeleton plugin that you can extend. Download the zipped Simulator plugin and unzip it into any directory keeping the directory structure and all the files inside.

Pay attention to these three files:

1) build.xml file from the root directory. This is the Ant configuration file with several tasks predefined. The tasks are:
build - to compile the classes
clean - to clean the classes
jar - to build the final product inside the jar directory. The contents of this directory will constitute your plugin. Please, note that all the libraries required by your plugin must be situated in the same directory as the plugin's main jar file.

2) simulator_plugin.xml file from the src\xml directory. This is the plugin's definition file. It can be called whatever you like. The contents of this file is self-explanatory and you have to change it according to your needs. Pay attention to the comments in this file.

3) SimulatorPlugin.java file from the src directory. This is the main class of your plugin. Rename the file and the class accordingly. 
You must implement three methods that are defined abstract in the parent class CounterPlugin:
init() - this method is called when the plugin is initialized;
close() - this method is called when the plugin is closed;
poll() - this method is called whenever plugin should poll data from the information source. 
Besides, you need to define setters and getters method that will govern the plugin configuration process.
Pay attention to the comments in this file.


You can also download the source code of the LJ FriendOf plugin as an example.

Note again that all your development must be done using JDK 1.5 and no less!