I need to built an PacketExtionsion and tried to learn from the documentation. But I didn’t found any documention how to create my custom PacketExtension or how a PacketExtensionProvider works. I tried to learn from the existing XHTML Extension, but didn’t understand anything. Is there a howto or something, which would help me?
I want to send SVG-data via Jabber, but thinks this is to complex and didn’t found an extension for that. So I want to write my own primitive extension.
I don’t have any experience with packet extension providers, but there are a couple other things you can use to achieve a similar result. This is a stripped down example of 2 methods for adding and extracting some extension data using a chat message:
// This is used to add custom extension data before sending a packet
private void addCustomExt(Message message) {
DefaultPacketExtension extension = new DefaultPacketExtension(“custom”,
“jabber:x:custom”);
extension.setValue(“key”, “value”);
message.addExtension(extension);
}
// This is used to extract custom extension data after receiving a packet
Oh damn. This looks great. I will check it out, when I am back on a x86-PC. Do you know, that I work on an whiteboard extension for jabber, but for JBother and not for Spark? I will dig into your code