SonicMQ API

progress.message.jclient
Interface MultiTopic

All Superinterfaces:
java.lang.Cloneable, Destination, MultiDestination, javax.naming.Referenceable, java.io.Serializable, Topic

public interface MultiTopic
extends MultiDestination, Topic, java.lang.Cloneable

Description: This interface defines a MultiDestination type that allows only Topic Destinations for its component Destinations. An attempt to add another Destination type is illegal for a MultiTopic.

A MultiTopic is not thread safe. Programmers should ensure that multiple threads are not operating concurrently on the MultiTopic.

Since:
7.0
Version:
7.0
Author:
Colin MacNaughton
See Also:
MultiDestination, Topic

Method Summary
 void add(Destination dest)
          Implementation of MultiDestination.add(javax.jms.Destination dest).
 java.lang.String getTopicName()
          Returns a String representation of this topic.
 
Methods inherited from interface progress.message.jclient.MultiDestination
clear, contains, equals, iterator, remove
 
Methods inherited from interface javax.naming.Referenceable
getReference
 
Methods inherited from interface javax.jms.Topic
toString
 

Method Detail

getTopicName

java.lang.String getTopicName()

Returns a String representation of this topic. Programmers should not attempt to parse or manipulate this string or rely on its syntax remaining constant in future releases. Instead the topic should be manipulated through the facilities provided by the progress.message.jclient.MultiDestination interface.

This String representation can be used to create a new MultiTopic using progress.message.jclient.Session.createTopic(String topicName)

Working with the String representation of a MultiTopic can be inefficient and should be avoided. This method is provided for comformance with the javax.jms.Topic interface and is intended to be used for debugging purposes.

Specified by:
getTopicName in interface Topic
Returns:
The string representation of this MultiTopic.

add

void add(Destination dest)
         throws JMSException
Implementation of MultiDestination.add(javax.jms.Destination dest).

The following add operations are illegal for a MultiTopic:

The routing prefix or shared subscription group prefix associated with a topic is determined by the first topic added to the MultiTopic. Only after all component topics are removed or the clear() method is called can the routing prefix or shared subscription group name change.

As specified by MultiDestination it is legal to add another MultiTopic so long as all of its components comform to the above rules.

Specified by:
add in interface MultiDestination
Parameters:
dest - The destination to add to this MultiDestination
Throws:
JMSException - if the destination cannot be added.

SonicMQ API

Copyright © 1999-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-March-2012.