How to call openfire plugins on client

public Integer Add(Integer a,Integer b)
return a + b;

I want to add this function to the openfire plugin
So, How to write code in plugin and how to call this function in my client code?


Take a read of this - ev-guide.html - it should help you get started. There are a number of ways your code can get called from clients, for example by intercepting XMPP packets, various server events, using adhoc commands etc.