Openfire Translation Plugin

I am trying to develop a translation plugin for openfire. client will send the text to my “service” and will be returned with the translated text that can then be sent to the receipient user (during a chat). i need some help with the following matter:

where can i get a good tutorial for developing custom openfire plugins? (i dont need help with building plugins in Eclipse. i know how to do that thanks to the incredible work already done by other people. I just need help or guidelines while writing the actual java code for the plugin) - a good tutorial will go a long way.

Thanks.