Message attributes

I was wandering what the best way of adding additional attributes to a message element would be.

For examlple I want to add the time at which the message was sent. My current thinking is to extend the message class, add the additional attributes i want to store with relevant getters and setters and then override the toXml().

Is there however a way to do this built in to the smack api, or is my way best?

Dwarfer

the best would be to use custom packet extensions … for example the defaultPackageExtension …

i think that’'ll be the most simple option