org.apache.ws.notification.topics
Interface TopicSet

All Known Subinterfaces:
ResourcePropertyValueChangeTopic, Topic, TopicSpace
All Known Implementing Classes:
AbstractTopicSet, ResourcePropertyValueChangeTopicImpl, TopicImpl, TopicSpaceImpl

public interface TopicSet

A set of Topics.


Method Summary
 Topic addTopic(java.lang.String name)
          Creates a new Topic object with the specified name and adds it to this set.
 Topic addTopic(Topic topic)
          Adds the specified topic to this set.
 boolean containsTopic(java.lang.String name)
          Returns true if this set contains a topic with the specified name.
 Topic getTopic(java.lang.String name)
          Gets the topic with the specified name.
 void removeTopic(java.lang.String name)
          Removes the topic with the specified name from this set.
 java.util.Iterator topicIterator()
          Gets an iterator of the topics in this set.
 

Method Detail

addTopic

public Topic addTopic(Topic topic)
               throws java.lang.Exception
Adds the specified topic to this set.

Parameters:
topic - the topic to add
Throws:
java.lang.Exception - if topic is null or has the same name as a topic already in this set

addTopic

public Topic addTopic(java.lang.String name)
               throws java.lang.Exception
Creates a new Topic object with the specified name and adds it to this set.

Parameters:
name - the name of the topic to add
Throws:
java.lang.Exception - if name is null, invalid (contains '/', '*', or '.'), or is the same as the name of a topic already in this set

removeTopic

public void removeTopic(java.lang.String name)
Removes the topic with the specified name from this set.

Parameters:
name - the name of the topic to remove

getTopic

public Topic getTopic(java.lang.String name)
Gets the topic with the specified name.

Parameters:
name - the name of the topic to get
Returns:
the topic, or null if no topic with the given name exists in this set

containsTopic

public boolean containsTopic(java.lang.String name)
Returns true if this set contains a topic with the specified name.

Parameters:
name - the name
Returns:
true if this set contains a topic with the specified name

topicIterator

public java.util.Iterator topicIterator()
Gets an iterator of the topics in this set.

Returns:
the iterator


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.