summaryrefslogtreecommitdiff
path: root/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2011-10-14 22:29:03 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2011-10-14 22:29:03 +0000
commit390b6b48b9808a1862b48b3e324451b95f465ed4 (patch)
tree8190d53d1c3d3022690be7a0b39dd848331a74e0 /java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
parentc77eff7738c4bd8424fd2205788a3f34ace13df5 (diff)
downloadqpid-python-390b6b48b9808a1862b48b3e324451b95f465ed4.tar.gz
QPID-3401 Checking the proposed changes into a branch to preserve history & continue working until such time it's accepted into trunk.address-refactor
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/address-refactor@1183532 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src/main/java/org/apache/qpid/client/AMQTopic.java')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQTopic.java63
1 files changed, 4 insertions, 59 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java b/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
index 780dbcafc2..54736b08f6 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQTopic.java
@@ -33,16 +33,7 @@ import org.apache.qpid.url.BindingURL;
public class AMQTopic extends AMQDestination implements Topic
{
- public AMQTopic(String address) throws URISyntaxException
- {
- super(address);
- }
-
- public AMQTopic(Address address) throws Exception
- {
- super(address);
- }
-
+
/**
* Constructor for use in creating a topic using a BindingURL.
*
@@ -102,37 +93,8 @@ public class AMQTopic extends AMQDestination implements Topic
if (topic instanceof AMQDestination && topic instanceof javax.jms.Topic)
{
AMQDestination qpidTopic = (AMQDestination)topic;
- if (qpidTopic.getDestSyntax() == DestSyntax.ADDR)
- {
- try
- {
- AMQTopic t = new AMQTopic(qpidTopic.getAddress());
- AMQShortString queueName = getDurableTopicQueueName(subscriptionName, connection);
- // link is never null if dest was created using an address string.
- t.getLink().setName(queueName.asString());
- t.getSourceNode().setAutoDelete(false);
- t.getSourceNode().setDurable(true);
-
- // The legacy fields are also populated just in case.
- t.setQueueName(queueName);
- t.setAutoDelete(false);
- t.setDurable(true);
- return t;
- }
- catch(Exception e)
- {
- JMSException ex = new JMSException("Error creating durable topic");
- ex.initCause(e);
- ex.setLinkedException(e);
- throw ex;
- }
- }
- else
- {
return new AMQTopic(qpidTopic.getExchangeName(), qpidTopic.getRoutingKey(), false,
- getDurableTopicQueueName(subscriptionName, connection),
- true);
- }
+ getDurableTopicQueueName(subscriptionName, connection),true);
}
else
{
@@ -151,10 +113,6 @@ public class AMQTopic extends AMQDestination implements Topic
{
return getRoutingKey().asString();
}
- else if (getSubject() != null)
- {
- return getSubject();
- }
else
{
return null;
@@ -164,14 +122,7 @@ public class AMQTopic extends AMQDestination implements Topic
@Override
public AMQShortString getExchangeName()
{
- if (super.getExchangeName() == null && super.getAddressName() != null)
- {
- return new AMQShortString(super.getAddressName());
- }
- else
- {
- return _exchangeName;
- }
+ return _exchangeName;
}
public AMQShortString getRoutingKey()
@@ -180,15 +131,9 @@ public class AMQTopic extends AMQDestination implements Topic
{
return super.getRoutingKey();
}
- else if (getSubject() != null)
- {
- return new AMQShortString(getSubject());
- }
else
{
- setRoutingKey(new AMQShortString(""));
- setSubject("");
- return super.getRoutingKey();
+ return null;
}
}