Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.muse.ws.notification.impl
Class SimpleNotificationMessage

    java.lang.Object
      org.apache.muse.ws.notification.impl.SimpleNotificationMessage

All Implemented Interfaces:
  NotificationMessage, XmlSerializable

public class SimpleNotificationMessage
extends java.lang.Object
implements XmlSerializable, NotificationMessage

SimpleNotificationMessage is Muse's default implementation of the WS-Notification NotificationMessageHolderType type. It provides serialization capabilities for these messages and validation of their contents.

Author:
  Dan Jemiolo (danj)

Constructor Summary
`SimpleNotificationMessage()` The default constructor provides no initialization, allowing users to create messages in an 'aseembly line' system, where pieces of the messages are added by different components before being published.
`SimpleNotificationMessage(org.w3c.dom.Element root)`
`SimpleNotificationMessage(QName topicPath)`

Method Summary
`void` | `addMessageContent(org.w3c.dom.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, java.lang.Object content)` This method allows you to add message content that has not yet been serialized into XML.
`org.w3c.dom.Element` | `getMessageContent(QName qname)`
`java.lang.Object` | `getMessageContent(QName qname, java.lang.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.
`java.util.Collection` | `getMessageContentNames()`
`EndpointReference` | `getProducerReference()`
`EndpointReference` | `getSubscriptionReference()`
`QName` | `getTopic()`
`java.lang.String` | `getTopicDialect()`
`void` | `setProducerReference(EndpointReference producer)`
`void` | `setSubscriptionReference(EndpointReference subscription)`
`void` | `setTopic(QName topicPath)`
`void` | `setTopicDialect(java.lang.String dialect)`
`java.lang.String` | `toString()`
`org.w3c.dom.Element` | `toXML()` Converts this object into an XML representation, as defined by its related schema or specification.
`org.w3c.dom.Element` | `toXML(org.w3c.dom.Document doc)` Converts this object into an XML representation, as defined by its related schema or specification.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleNotificationMessage

    public SimpleNotificationMessage()

  The default constructor provides no initialization, allowing users to create messages in an 'aseembly line' system, where pieces of the messages are added by different components before being published.

### SimpleNotificationMessage

    public SimpleNotificationMessage(org.w3c.dom.Element root)
                              throws SoapFault

Parameters:
  `root` - A DOM Element representing a WS-N SimpleNotificationMessage

### SimpleNotificationMessage

    public SimpleNotificationMessage(QName topicPath)

Method Detail

### addMessageContent

    public void addMessageContent(org.w3c.dom.Element content)

  Description copied from interface: `NotificationMessage`
  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.

  Specified by:
    `addMessageContent` in interface `NotificationMessage`
  Parameters:
    `content` -

### addMessageContent

    public void addMessageContent(QName qname,
                                  java.lang.Object content)
                           throws SoapFault

  Description copied from interface: `NotificationMessage`
  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.

  Specified by:
    `addMessageContent` in interface `NotificationMessage`
  Parameters:
    `content` -
    `qname` -
  Throws:
    `SoapFault`
  See Also:
    `Serializer`

### getMessageContent

    public org.w3c.dom.Element getMessageContent(QName qname)

  Specified by:
    `getMessageContent` in interface `NotificationMessage`
  Parameters:
    `qname` -
  Returns:
    The element under wsnt:Message that has the given name, or null if no such element exists.

### getMessageContent

    public java.lang.Object getMessageContent(QName qname,
                                              java.lang.Class type)
                                       throws SoapFault

  Description copied from interface: `NotificationMessage`
  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.

  Specified by:
    `getMessageContent` in interface `NotificationMessage`
  Throws:
    `SoapFault`

### getMessageContentNames

    public java.util.Collection getMessageContentNames()

  Specified by:
    `getMessageContentNames` in interface `NotificationMessage`
  Returns:
    The names of all elements added under the wsnt:Message section.

### getProducerReference

    public EndpointReference getProducerReference()

  Specified by:
    `getProducerReference` in interface `NotificationMessage`
  Returns:
    The EPR of the resource that is sending the message. This may be null.

### getSubscriptionReference

    public EndpointReference getSubscriptionReference()

  Specified by:
    `getSubscriptionReference` in interface `NotificationMessage`
  Returns:
    The EPR of the subscription that is causing the message to be sent to the subscriber. This may be null.

### getTopic

    public QName getTopic()

  Specified by:
    `getTopic` in interface `NotificationMessage`
  Returns:
    The topic that this message was published under. This may be null.

### getTopicDialect

    public java.lang.String getTopicDialect()

  Specified by:
    `getTopicDialect` in interface `NotificationMessage`
  Returns:
    The concrete expression dialect
  See Also:
    `WstConstants.CONCRETE_TOPIC_URI`

### setProducerReference

    public void setProducerReference(EndpointReference producer)

  Specified by:
    `setProducerReference` in interface `NotificationMessage`

### setSubscriptionReference

    public void setSubscriptionReference(EndpointReference subscription)

  Specified by:
    `setSubscriptionReference` in interface `NotificationMessage`

### setTopic

    public void setTopic(QName topicPath)

  Specified by:
    `setTopic` in interface `NotificationMessage`

### setTopicDialect

    public void setTopicDialect(java.lang.String dialect)
                         throws TopicExpressionDialectUnknownFault

  Specified by:
    `setTopicDialect` in interface `NotificationMessage`
  Throws:
    `TopicExpressionDialectUnknownFault`

### toString

    public java.lang.String toString()

### toXML

    public org.w3c.dom.Element toXML()

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Returns:
    An XML representation of this object.

### toXML

    public org.w3c.dom.Element toXML(org.w3c.dom.Document doc)

  Description copied from interface: `XmlSerializable`
  Converts this object into an XML representation, as defined by its related schema or specification. The format of the XML is dependent on the concrete type.

  Specified by:
    `toXML` in interface `XmlSerializable`
  Parameters:
    `doc` - The DOM Document that will be used to create all of the nodes in the resulting XML fragment.
  Returns:
    An XML representation of this object.

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD