Usage of @PluginLoaded

40 views
Skip to first unread message

gupta....@gmail.com

unread,
Jun 12, 2014, 2:52:25 PM6/12/14
to js...@googlegroups.com
Hello everyone,

I am using JSPF to have plugin architecture in my application. I want that whenever in future, a new plugin is added/registered to my application, I want to run some functionality to update a common data structure to which all the plugin implementations should contribute to.

I read the documentation and came across @PluginLoaded annotation. This is what I am doing,

public class MyMonitorPlugin implements MyPlugin
{
    @PluginLoaded
    public void newPlugin(MyPlugin p) {
        System.out.printf("PluginLoaded (%d): %s\n",
                System.currentTimeMillis(), p);
    }

    public void run()
    {

    }


But whenever a new plugin is registered to my application, this method is not being called.

P.S : I understand the registration of a plugin with respect to JSPF as adding the JAR file of the plugin

 
 
Reply all
Reply to author
Forward
0 new messages