org.apache.qpid.client
Class AMQTopic
java.lang.Object
org.apache.qpid.client.AMQDestination
org.apache.qpid.client.AMQTopic
- All Implemented Interfaces:
- javax.jms.Destination, javax.jms.Topic, javax.naming.Referenceable
public class AMQTopic
- extends AMQDestination
- implements javax.jms.Topic
Constructor Summary |
AMQTopic(AMQTopic topic,
java.lang.String clientId,
java.lang.String subscriptionName)
Constructor for use in creating a topic to represent a durable subscription |
AMQTopic(org.apache.qpid.url.BindingURL binding)
Constructor for use in creating a topic using a BindingURL. |
AMQTopic(java.lang.String name)
|
Methods inherited from class org.apache.qpid.client.AMQDestination |
equals, getDestinationName, getExchangeClass, getExchangeName, getQueueName, getReference, hashCode, isAutoDelete, isDurable, isExclusive, isQueue, isTopic, toString, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jms.Topic |
toString |
AMQTopic
public AMQTopic(org.apache.qpid.url.BindingURL binding)
- Constructor for use in creating a topic using a BindingURL.
- Parameters:
binding
- The binding url object.
AMQTopic
public AMQTopic(java.lang.String name)
AMQTopic
public AMQTopic(AMQTopic topic,
java.lang.String clientId,
java.lang.String subscriptionName)
- Constructor for use in creating a topic to represent a durable subscription
- Parameters:
topic
- clientId
- subscriptionName
-
getTopicName
public java.lang.String getTopicName()
throws javax.jms.JMSException
- Specified by:
getTopicName
in interface javax.jms.Topic
- Throws:
javax.jms.JMSException
getEncodedName
public java.lang.String getEncodedName()
- Specified by:
getEncodedName
in class AMQDestination
getRoutingKey
public java.lang.String getRoutingKey()
- Specified by:
getRoutingKey
in class AMQDestination
isNameRequired
public boolean isNameRequired()
- Specified by:
isNameRequired
in class AMQDestination
setQueueName
public void setQueueName(java.lang.String queueName)
- Override since the queue is always private and we must ensure it remains null. If not,
reuse of the topic when registering consumers will make all consumers listen on the same (private) queue rather
than getting their own (private) queue.
This is relatively nasty but it is difficult to come up with a more elegant solution, given
the requirement in the case on AMQQueue and possibly other AMQDestination subclasses to
use the underlying queue name even where it is server generated.
- Overrides:
setQueueName
in class AMQDestination