org.globus.wsrf.impl
Class SimpleTopicList

java.lang.Object
  extended byorg.globus.wsrf.impl.SimpleTopicList
All Implemented Interfaces:
TopicList, TopicListener, TopicListenerList

public class SimpleTopicList
extends java.lang.Object
implements TopicList, TopicListener

Simplistic in memory topic list.


Field Summary
private  ResourceProperty fixedTopicSet
           
protected  java.util.Collection listeners
           
(package private) static org.apache.commons.logging.Log logger
           
private  TopicListMetaData metaData
           
protected  java.util.Map rootTopics
           
private  ResourceProperty supportedTopics
           
private static TopicExpressionEngine topicExpressionEngine
           
 
Constructor Summary
SimpleTopicList(ResourceProperties resource)
          This constructor will add the resource properties associated with the notification producer porttype to the supplied resource object
SimpleTopicList(ResourceProperties resource, TopicListMetaData metaData)
          This constructor will add the resource properties associated with the notification producer porttype to the supplied resource object
 
Method Summary
 void addTopic(Topic topic)
          Add a root topic
 void addTopicListener(TopicListener listener)
          Add a topic listener
 Topic getTopic(java.util.List topicPath)
          Get the topic for the given topic path.
 TopicListMetaData getTopicListMetaData()
          Returns meta data associated with this topic list.
 java.util.Collection getTopics(TopicExpressionType topicExpression)
          Get the set of topics the given topic expression resolves to
 void removeTopic(Topic topic)
          Remove the root topic
 void removeTopicListener(TopicListener listener)
          Remove a topic listener
 void topicAdded(Topic topic)
          Called when a topic is added
 void topicChanged(Topic topic)
          Called when the value of the topic changes
 java.util.Iterator topicIterator()
          Iterator for the set of root topics
 java.util.Iterator topicListenerIterator()
          Get a iterator for the list of TopicListeners.
 void topicRemoved(Topic topic)
          Called when a topic is removed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootTopics

protected java.util.Map rootTopics

listeners

protected java.util.Collection listeners

supportedTopics

private ResourceProperty supportedTopics

fixedTopicSet

private ResourceProperty fixedTopicSet

topicExpressionEngine

private static TopicExpressionEngine topicExpressionEngine

metaData

private TopicListMetaData metaData

logger

static org.apache.commons.logging.Log logger
Constructor Detail

SimpleTopicList

public SimpleTopicList(ResourceProperties resource)
This constructor will add the resource properties associated with the notification producer porttype to the supplied resource object

Parameters:
resource - Resource object, must implement the ResourceProperties interface

SimpleTopicList

public SimpleTopicList(ResourceProperties resource,
                       TopicListMetaData metaData)
This constructor will add the resource properties associated with the notification producer porttype to the supplied resource object

Parameters:
resource - Resource object, must implement the ResourceProperties interface
Method Detail

addTopic

public void addTopic(Topic topic)
Description copied from interface: TopicList
Add a root topic

Specified by:
addTopic in interface TopicList
Parameters:
topic - The topic to add

addTopicListener

public void addTopicListener(TopicListener listener)
Description copied from interface: TopicListenerList
Add a topic listener

Specified by:
addTopicListener in interface TopicListenerList
Parameters:
listener - The topic listener to add
See Also:
TopicListener

getTopics

public java.util.Collection getTopics(TopicExpressionType topicExpression)
                               throws UnsupportedTopicExpressionDialectException,
                                      TopicExpressionResolutionException,
                                      InvalidTopicExpressionException,
                                      TopicExpressionException
Description copied from interface: TopicList
Get the set of topics the given topic expression resolves to

Specified by:
getTopics in interface TopicList
Parameters:
topicExpression - The topic expression to resolve to a set of topics
Returns:
The resulting set of topics
Throws:
TopicExpressionException - if any other error occurs
InvalidTopicExpressionException - if the topic expression is invalid
UnsupportedTopicExpressionDialectException - if the topic expression dialect is not supported
TopicExpressionResolutionException - if the expression could not be evaluated

removeTopic

public void removeTopic(Topic topic)
Description copied from interface: TopicList
Remove the root topic

Specified by:
removeTopic in interface TopicList
Parameters:
topic - The topic to remove

removeTopicListener

public void removeTopicListener(TopicListener listener)
Description copied from interface: TopicListenerList
Remove a topic listener

Specified by:
removeTopicListener in interface TopicListenerList
Parameters:
listener - The topic listener to remove.
See Also:
TopicListener

topicListenerIterator

public java.util.Iterator topicListenerIterator()
Description copied from interface: TopicListenerList
Get a iterator for the list of TopicListeners.
The function should be called in and iteration performed in a synchronized block on the TopicListenerList instance.

Specified by:
topicListenerIterator in interface TopicListenerList
Returns:
The iterator
See Also:
TopicListener

getTopic

public Topic getTopic(java.util.List topicPath)
Description copied from interface: TopicList
Get the topic for the given topic path.

Specified by:
getTopic in interface TopicList
Parameters:
topicPath - The topic path (list of topic names)
Returns:
The topic corresponding to the given topic path

getTopicListMetaData

public TopicListMetaData getTopicListMetaData()
Description copied from interface: TopicList
Returns meta data associated with this topic list.

Specified by:
getTopicListMetaData in interface TopicList
Returns:
meta data of this topic list.

topicIterator

public java.util.Iterator topicIterator()
Description copied from interface: TopicList
Iterator for the set of root topics

Specified by:
topicIterator in interface TopicList
Returns:
The iterator

topicAdded

public void topicAdded(Topic topic)
Description copied from interface: TopicListener
Called when a topic is added

Specified by:
topicAdded in interface TopicListener
Parameters:
topic - The topic being added

topicChanged

public void topicChanged(Topic topic)
Description copied from interface: TopicListener
Called when the value of the topic changes

Specified by:
topicChanged in interface TopicListener
Parameters:
topic - The topic that changed

topicRemoved

public void topicRemoved(Topic topic)
Description copied from interface: TopicListener
Called when a topic is removed

Specified by:
topicRemoved in interface TopicListener
Parameters:
topic - The topic being removed