activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r821163 - in /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp: IQueueBrowser.cs ISession.cs
Date Fri, 02 Oct 2009 20:41:33 GMT
Author: tabish
Date: Fri Oct  2 20:41:32 2009
New Revision: 821163

URL: http://svn.apache.org/viewvc?rev=821163&view=rev
Log:
AMQNET-97  Add interface and methods for supporting QueueBrowsers

* ISession.cs:
* IQueueBrowser.cs: 

Added:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs   (with props)
Modified:
    activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs

Added: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs?rev=821163&view=auto
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs (added)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs Fri Oct  2
20:41:32 2009
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Collections;
+
+namespace Apache.NMS
+{
+    /// <summary>
+    /// A client uses a QueueBrowser object to look at messages on a queue without removing
them.
+    /// 
+    /// The Enumeration method returns a java.util.Enumeration that is used to scan the queue's
+    /// messages. It may be an enumeration of the entire content of a queue, or it may contain

+    /// only the messages matching a message selector.
+    /// 
+    /// Messages may be arriving and expiring while the scan is done. The NMS API does not

+    /// require the content of an enumeration to be a static snapshot of queue content. Whether

+    /// these changes are visible or not depends on the NMS provider.
+    /// </summary>
+    public interface IQueueBrowser : IEnumerable
+    {
+        /// <summary>
+        /// Closes the QueueBrowser.
+        /// </summary>
+        /// <exception cref="Apache.NMS.NMSException">
+        /// If NMS Provider fails to close the Browser for some reason.
+        /// </exception>
+        void Close();
+        
+        /// <value>
+        /// Gets this queue browser's message selector expression.  If no Message 
+        /// selector was specified than this method returns null.
+        /// </value>
+        /// <exception cref="Apache.NMS.NMSException">
+        /// If NMS Provider fails to get the Message Selector for some reason.
+        /// </exception>
+        string MessageSelector { get; }
+        
+        /// <value>
+        /// Gets the queue associated with this queue browser.
+        /// </value>
+        /// <exception cref="Apache.NMS.NMSException">
+        /// If NMS Provider fails to retrieve the IQueue associated with the Browser
+        /// doe to some internal error.
+        /// </exception>
+        IQueue Qeuue { get; }
+
+    }
+}

Propchange: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueueBrowser.cs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs?rev=821163&r1=821162&r2=821163&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs Fri Oct  2 20:41:32
2009
@@ -60,6 +60,38 @@
 		/// <param name="name">Name of the durable consumer</param>
 		void DeleteDurableConsumer(string name);
 
+        /// <summary>
+        /// Creates a QueueBrowser object to peek at the messages on the specified queue.
+        /// </summary>
+        /// <param name="queue">
+        /// A <see cref="IQueue"/>
+        /// </param>
+        /// <returns>
+        /// A <see cref="IQueueBrowser"/>
+        /// </returns>
+        /// <exception cref="System.NotSupportedException">
+        /// If the Prodiver does not support creation of Queue Browsers.
+        /// </exception>
+        IQueueBrowser CreateBrowser(IQueue queue);
+        
+        /// <summary>
+        /// Creates a QueueBrowser object to peek at the messages on the specified queue

+        /// using a message selector.
+        /// </summary>
+        /// <param name="queue">
+        /// A <see cref="IQueue"/>
+        /// </param>
+        /// <param name="selector">
+        /// A <see cref="System.String"/>
+        /// </param>
+        /// <returns>
+        /// A <see cref="IQueueBrowser"/>
+        /// </returns>
+        /// <exception cref="System.NotSupportedException">
+        /// If the Prodiver does not support creation of Queue Browsers.
+        /// </exception>
+        IQueueBrowser CreateBrowser(IQueue queue, string selector);
+        
 		/// <summary>
 		/// Returns the queue for the given name
 		/// </summary>



Mime
View raw message