activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1214825 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs
Date Thu, 15 Dec 2011 16:03:19 GMT
Author: tabish
Date: Thu Dec 15 16:03:19 2011
New Revision: 1214825

URL: http://svn.apache.org/viewvc?rev=1214825&view=rev
Log:
Add an additional utility method for temp dests

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs?rev=1214825&r1=1214824&r2=1214825&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Util/AdvisorySupport.cs
Thu Dec 15 16:03:19 2011
@@ -280,6 +280,28 @@ namespace Apache.NMS.ActiveMQ
             return IsDestinationAdvisoryTopic(ActiveMQDestination.Transform(destination));
         }
 
+        public static bool IsTempDestinationAdvisoryTopic(ActiveMQDestination destination)
+        {
+            if (destination.IsComposite)
+            {
+                ActiveMQDestination[] compositeDestinations = destination.GetCompositeDestinations();
+                bool containsNonTempDests = false;
+                for (int i = 0; i < compositeDestinations.Length; i++)
+                {
+                    if (!IsTempDestinationAdvisoryTopic(compositeDestinations[i]))
+                    {
+                        containsNonTempDests = true;
+                    }
+                }
+                return !containsNonTempDests;
+            }
+            else
+            {
+                return destination.Equals(TEMP_QUEUE_ADVISORY_TOPIC) ||
+                       destination.Equals(TEMP_TOPIC_ADVISORY_TOPIC);
+            }
+        }
+
         public static bool IsDestinationAdvisoryTopic(ActiveMQDestination destination)
         {
             if (destination.IsComposite)



Mime
View raw message