org.globus.wsrf
Interface Topic

All Superinterfaces:
TopicListenerList
All Known Implementing Classes:
ResourcePropertyTopic, SimpleTopic

public interface Topic
extends TopicListenerList

Interface for representing a topic. A topic is either a child of a parent topic or in the case of root topics a member of a topic list. Non-root topics have names without a namespace component.

See Also:
TopicList

Method Summary
 void addTopic(Topic topic)
          Add a sub-topic.
 Object getCurrentMessage()
          Get the current notification message if there is any
 QName getName()
          Get the name of the topic.
 Topic getTopic(QName topicName)
          Get the sub-topic with the given topic name
 List getTopicPath()
          Get the topic path.
 TopicExpressionType getTopicReference()
          Get the topic expression for the topic(s) that this topic references.
 boolean isReference()
          Is this a topic reference?
 void notify(Object obj)
          Send out a notification on this topic
 void removeTopic(Topic topic)
          Remove a sub-topic
 void setTopicPath(List topicPath)
          Set the topic path.
 void setTopicReference(TopicExpressionType topicPath)
          Set the topic expression that resolves to a set of topics that this topic references.
 Iterator topicIterator()
          Iterator for the set of child topics
 
Methods inherited from interface org.globus.wsrf.TopicListenerList
addTopicListener, removeTopicListener, topicListenerIterator
 

Method Detail

addTopic

public void addTopic(Topic topic)
              throws Exception
Add a sub-topic.
Parameters:
topic - The sub-topic to add
Throws:
Exception -  

removeTopic

public void removeTopic(Topic topic)
Remove a sub-topic
Parameters:
topic - The sub-topic to remove

getTopic

public Topic getTopic(QName topicName)
Get the sub-topic with the given topic name
Parameters:
topicName - The topic name of the sub topic
Returns:
The sub-topic

setTopicReference

public void setTopicReference(TopicExpressionType topicPath)
Set the topic expression that resolves to a set of topics that this topic references. Only used for reference topics.
Parameters:
topicPath - The topic expression to set.

getTopicReference

public TopicExpressionType getTopicReference()
Get the topic expression for the topic(s) that this topic references.
Returns:
The topic expression that this topic reference or null if this topic is not a reference.

setTopicPath

public void setTopicPath(List topicPath)
Set the topic path. The topic path is represented as a ordered list of topic names
Parameters:
topicPath - The topic path to associate with this topic

getTopicPath

public List getTopicPath()
Get the topic path. The topic path is represented as a ordered list of topic names
Returns:
The topic path of this topic

getName

public QName getName()
Get the name of the topic. Only root topics should actually be qualified names, other topic should be non-qualified
Returns:
The name of the topic

getCurrentMessage

public Object getCurrentMessage()
Get the current notification message if there is any
Returns:
A object containing the current message, may be null

notify

public void notify(Object obj)
            throws Exception
Send out a notification on this topic
Parameters:
obj - Object representation of the message to send
Throws:
Exception -  

isReference

public boolean isReference()
Is this a topic reference?
Returns:
true if this topic is a reference to another topic false if not

topicIterator

public Iterator topicIterator()
Iterator for the set of child topics
Returns:
The iterator


Copyright © 1999-2003 University of Chicago and The University of Southern California. All rights reserved.