mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fondermann <bf_...@brainlounge.de>
Subject Re: [Vysper] Random thoughts on message stanza handling
Date Thu, 03 Sep 2009 08:07:59 GMT
Niklas Gustavsson wrote:
> Hi
> On hacking a bit on Vysper, I got some random thoughts:
> * How about making MessageStanza.getSubjects() and
> MessageStanza.getBodies() return a Map<String, String> rather than
> Map<String, XMLElement>? Looking at the XML schema for <message>, it
> seems that body and subject elements can only contain text.

the XML schemas are not normative.
rather, body elements can actually contain XML, see

> * Should we add a StanzaBuilder.createMessageStanza() that takes
> Map<String, String> for subjects and bodies?

we could. but where do we actually create pristine message stanzas?

> * Also, how about adding a StanzaBuilder.createMessageStanza() that
> takes a Delay object for adding a delay element?

What would be the use case, MUC history?
When I think about Delayed Delivery[1,2], I think of a some special
runtime service code which is responsible for
+ adding delay elements to stanzas
+ pruging stanzas which have expired
+ storing them (serialization)
+ unserializing them
+ putting them on the wire

Right now, I think it's making sense to encapsulate this.


[1] http://xmpp.org/extensions/xep-0203.html
[2] http://xmpp.org/extensions/xep-0160.html

View raw message