activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r365941 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
Date Wed, 04 Jan 2006 16:49:52 GMT
Author: chirino
Date: Wed Jan  4 08:49:43 2006
New Revision: 365941

URL: http://svn.apache.org/viewcvs?rev=365941&view=rev
Log:
use "Topic." rather than "topic://" as the separator when making advisories.  This makes it
easier for folks to use * notation.


Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java?rev=365941&r1=365940&r2=365941&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/advisory/AdvisorySupport.java
Wed Jan  4 08:49:43 2006
@@ -28,7 +28,11 @@
     public static final ActiveMQTopic TEMP_QUEUE_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX+"TempQueue");
     public static final ActiveMQTopic TEMP_TOPIC_ADVISORY_TOPIC = new ActiveMQTopic(ADVISORY_TOPIC_PREFIX+"TempTopic");
     public static final String PRODUCER_ADVISORY_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX+"Producer.";
+    public static final String QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX = PRODUCER_ADVISORY_TOPIC_PREFIX+"Queue.";
+    public static final String TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX = PRODUCER_ADVISORY_TOPIC_PREFIX+"Topic.";
     public static final String CONSUMER_ADVISORY_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX+"Consumer.";
+    public static final String QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX = CONSUMER_ADVISORY_TOPIC_PREFIX+"Queue.";
+    public static final String TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX = CONSUMER_ADVISORY_TOPIC_PREFIX+"Topic.";
     public static final String EXPIRED_TOPIC_MESSAGES_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX+"Expired.Topic.";
     public static final String EXPIRED_QUEUE_MESSAGES_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX+"Expired.Queue.";
     public static final String NO_TOPIC_CONSUMERS_TOPIC_PREFIX = ADVISORY_TOPIC_PREFIX+"NoConsumer.Topic.";
@@ -41,13 +45,17 @@
     }
 
     public static ActiveMQTopic getConsumerAdvisoryTopic(ActiveMQDestination destination)
{
-        String name = CONSUMER_ADVISORY_TOPIC_PREFIX+destination.getQualifiedName();
-        return new ActiveMQTopic(name);
+        if( destination.isQueue() ) 
+            return new ActiveMQTopic(QUEUE_CONSUMER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());
+        else 
+            return new ActiveMQTopic(TOPIC_CONSUMER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());
     }
     
     public static ActiveMQTopic getProducerAdvisoryTopic(ActiveMQDestination destination)
{
-        String name = PRODUCER_ADVISORY_TOPIC_PREFIX+destination.getQualifiedName();
-        return new ActiveMQTopic(name);
+        if( destination.isQueue() ) 
+            return new ActiveMQTopic(QUEUE_PRODUCER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());
+        else 
+            return new ActiveMQTopic(TOPIC_PRODUCER_ADVISORY_TOPIC_PREFIX+destination.getPhysicalName());
     }
     
     public static ActiveMQTopic getExpiredTopicMessageAdvisoryTopic(ActiveMQDestination destination)
{



Mime
View raw message