org.apache.muse.ws.notification.impl
Class TopicFilter

java.lang.Object
  extended byorg.apache.muse.ws.notification.impl.TopicFilter
All Implemented Interfaces:
Filter, XmlSerializable

public class TopicFilter
extends java.lang.Object
implements Filter

TopicFilter is the implementation of topic-based filters for WS-N subscriptions. All messages that have a wsnt:Topic field that matches the filter's topic will be sent to subscribers. Only simple and concrete topic expressions are supported by this filter.

Author:
Dan Jemiolo (danj)

Constructor Summary
TopicFilter(QName topicName)
           
TopicFilter(QName topicName, java.lang.String dialect)
           
TopicFilter(Topic topic)
           
TopicFilter(Topic topic, java.lang.String dialect)
           
 
Method Summary
 boolean accepts(NotificationMessage message)
           
 QName getTopic()
           
 void setTopic(QName topicName)
           
 void setTopic(Topic topic)
           
 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

TopicFilter

public TopicFilter(QName topicName)
            throws TopicExpressionDialectUnknownFault,
                   InvalidTopicExpressionFault

TopicFilter

public TopicFilter(QName topicName,
                   java.lang.String dialect)
            throws TopicExpressionDialectUnknownFault,
                   InvalidTopicExpressionFault

TopicFilter

public TopicFilter(Topic topic)
            throws TopicExpressionDialectUnknownFault,
                   InvalidTopicExpressionFault

TopicFilter

public TopicFilter(Topic topic,
                   java.lang.String dialect)
            throws TopicExpressionDialectUnknownFault,
                   InvalidTopicExpressionFault
Method Detail

accepts

public boolean accepts(NotificationMessage message)
Specified by:
accepts in interface Filter
Parameters:
message -
Returns:
True if the content of the message passes the filter tests (and, consequently, should be sent to the subscriber that created the filter).

getTopic

public QName getTopic()

setTopic

public void setTopic(QName topicName)

setTopic

public void setTopic(Topic topic)

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.