Change NotificationProducer.publish( ) to take a topic and message content
instead of a NotificationMessage
-----------------------------------------------------------------------------------------------------------
Key: MUSE-31
URL: http://issues.apache.org/jira/browse/MUSE-31
Project: Muse
Type: Improvement
Environment: Axis2 and OSGi
Reporter: Dan Jemiolo
Priority: Trivial
The WSN NotificationProducer interface could be improved so that users have to
write less code and learn less APIs in order to publish a notification.
Right now, users must create a NotificationMessage, set the topic (or provide
it in the constructor), add the message content (Objects or Elements), and then
call NotificationProducer.publish( ) with the message as a parameter. The other
fields in the message - e.g., the subscription reference - are filled in by the
NotificationProducer implementation. This is inconsistent and can be fixed
easily.
By making publish have the following signature:
void publish(QName topicName, Object messageContent)
The NP implementation can create a NotificationMessage object itself, set the
topic itself, set the other fields it's already setting, and add the message
content before publishing. This removes three lines of code from the process
and lowers the number of classes (by 1) and methods (by 2) the user must know.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]