org.apache.muse.ws.notification
Interface NotificationMessage

All Superinterfaces:
XmlSerializable
All Known Implementing Classes:
SimpleNotificationMessage

public interface NotificationMessage
extends XmlSerializable

NotificationMessage represents the wsnt:NotificationMessageHolderType type defined by the WS-Notification 1.3 schema. It is used as part of the wsnt:Notify and wsnt:GetCurrentMessage operations.

Author:
Dan Jemiolo (danj)

Method Summary
 void addMessageContent(Element content)
          This method allows you to add message content in its XML form - the element will be added as the last child under the wsnt:Message part of the notification message.
 void addMessageContent(QName qname, Object content)
          This method allows you to add message content that has not yet been serialized into XML.
 Element getMessageContent(QName qname)
           
 Object getMessageContent(QName qname, Class type)
          This is a convenience method that does the same task as getMessageContent(QName) but deserializes the message content into a POJO of the given type before returning it.
 Collection getMessageContentNames()
           
 EndpointReference getProducerReference()
           
 EndpointReference getSubscriptionReference()
           
 QName getTopic()
           
 String getTopicDialect()
           
 void setProducerReference(EndpointReference producer)
           
 void setSubscriptionReference(EndpointReference subscription)
           
 void setTopic(QName topicPath)
           
 void setTopicDialect(String dialect)
           
 
Methods inherited from interface org.apache.muse.util.xml.XmlSerializable
toXML, toXML
 

Method Detail

addMessageContent

void addMessageContent(Element content)
This method allows you to add message content in its XML form - the element will be added as the last child under the wsnt:Message part of the notification message.

Parameters:
content -

addMessageContent

void addMessageContent(QName qname,
                       Object content)
                       throws SoapFault
This method allows you to add message content that has not yet been serialized into XML. The content object must be of a type that has a Muse Serializer registered for it; these types include all of the base/built-in types plus those that had serializers registered for them in muse.xml.

Parameters:
content -
qname -
Throws:
SoapFault
See Also:
Serializer

getMessageContent

Element getMessageContent(QName qname)
Parameters:
qname -
Returns:
The element under wsnt:Message that has the given name, or null if no such element exists.

getMessageContent

Object getMessageContent(QName qname,
                         Class type)
                         throws SoapFault
This is a convenience method that does the same task as getMessageContent(QName) but deserializes the message content into a POJO of the given type before returning it.

Throws:
SoapFault

getMessageContentNames

Collection getMessageContentNames()
Returns:
The names of all elements added under the wsnt:Message section.

getProducerReference

EndpointReference getProducerReference()
Returns:
The EPR of the resource that is sending the message. This may be null.

getSubscriptionReference

EndpointReference getSubscriptionReference()
Returns:
The EPR of the subscription that is causing the message to be sent to the subscriber. This may be null.

getTopic

QName getTopic()
Returns:
The topic that this message was published under. This may be null.

getTopicDialect

String getTopicDialect()
Returns:
The concrete expression dialect
See Also:
WstConstants.CONCRETE_TOPIC_URI

setProducerReference

void setProducerReference(EndpointReference producer)

setSubscriptionReference

void setSubscriptionReference(EndpointReference subscription)

setTopic

void setTopic(QName topicPath)

setTopicDialect

void setTopicDialect(String dialect)
                     throws TopicExpressionDialectUnknownFault
Throws:
TopicExpressionDialectUnknownFault


Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.