Internal component

Hi, do you have an example of a Abstract Component implementation?

I have create an Abstract Component which is instantiated by a Plugin, however when I send messages it never hits the ‘handleMessage’ method.

I do call componentManager.addComponent and pass in my component. Is there anything else I need to do?

I’ve also tried extending Component, and I see that processPacket is called only once on startup when addComponent is invoked, it is not invoked for any subsequent messages.

Appreciate the help.


Hi There,

I’m fairly new to Openfire but what helped me get something going is the Weather example that’s bundled with Whack. Get the latest from the svn.

It details both Component and AbstractComponent usage and actually works!

A note for when you start with components; they are addressable. That means the only way to communicate with them (that I found) with a client is to add an arbitary “” to your roster (buddy list) and send it a message. (Obviously where you define componentname and your xmpp domain)

When you go to use your Component remember it’s running in a seperate process so you have to start it in the usual way seperatley to openfire. To set the shared secret etc go to Openfire Admin Console and then server settings and then external components and set it there. Once you’ve started your component you cna view all connected components in the component manager within Openfire admin console.

You can send raw xml via a couple of clients (Pidgin xmpp consol is the easiest I’ve found) but it still has to be to

I managed to fake presence quite easily and I reccomend this as a way to get started with Openfire and XMPP.