I found a problem with making the change to publish(QName, Object):
because the Serializer API takes a QName (for the name of the root
element) and an Object, the publish() method would actually need to look
like this:
publish(QName topic, QName contentName, Object content);
we can't change the existing publish() methods, then, because this would
break API compatibility. the only option, then, is to add another
overloaded version of publish(), for a total of three. I'm not sure how I
feel about this, because it seems kind of bloated. but if it really makes
a difference, we'll do it.
thoughts?
Dan
"Vinh Nguyen \(vinguye2\)" <[EMAIL PROTECTED]> wrote on 02/08/2007
02:24:15 AM:
> The current NotificationProducer has the following two methods:
> publish(QName, Element)
> publish(QName, XmlSerializable)
>
> Can an additional method be added to take any type of object, as long as
> a Serializer is registered for it? The code should take advantage of
> the same Muse serialization engine invoked when a custom object is
> returned from a capability method. The new publish() should throw an
> error if a non-serializable object is specified.
>
> This way, we don't need to explicitly serialize our objects to xml
> before sending them in a notification, and take advantage of what Muse
> can already do for us. Thanks!
> -Vinh
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]