powered by Jive Software

Custom routing in Wildfire?

I would like to do the following in the Wildfire Server:

Inspect every received message from a client, do some actions and either continue with normal routing of the message (maybe add or change some fields) or drop it and send my own custom message, either to the intended receiver or someone else.

Is this possible, and which is the best way to go?

Thanks for any ideas

//Peter

You will likely need to write a plugin for this. There is the Content Filter plugin already which is close to what you want, so maybe slight modifications to it would suit your needs.

Yes, I have actually looked at this plugin already, and made a skeleton version of it.

I was just not sure whether this was the best way to do it.

However I was planning to use Packet Extensions for my own fields, and used successfully the DefaultPacketExtension in the Smack client, but I have difficulties reading the Packet Extensions at the server.

Unfortunately there seems to be no DefaultPacketExtension in Wildfire, and I am not enough skilled in Java to create one right now. Also, the implementation of PacketExtension seems to be quite different from the one in Smack. Any ideas why this is so? And why the DefaultPacketExtension is missing in Wildfire?

Thanks

Peter

Hey Peter,

Wildfire uses another way to represent packets than Smack. In Wildfire packets data is kept as a DOM object. So you can use Packet#getElement() to access the DOM object that contains the entire parsed XML data.

Regards,

– Gato

OK that seems to work! Thanks!

//Peter