Havret commented on a change in pull request #12: NMS 2.0 WIP
URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371982327
 
 

 ##########
 File path: src/nms-api/INMSContext.cs
 ##########
 @@ -0,0 +1,274 @@
+/*
+ * 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;
+
+namespace Apache.NMS
+{
+
+       /// <summary>
+       /// A INMSContext is the main interface in the simplified NMS API
+       /// introduced for NMS 2.0. This combines in a single object the 
functionality of
+       /// two separate objects from the NMS 1.x API: an IConnection and an 
ISession.
+       ///
+       /// This is comparable to JMS 2.0 API that extended JMS 1.x API
+       /// </summary>
+       public interface INMSContext : IDisposable, IStartable, IStoppable
+       {
+
+               INMSContext CreateContext(AcknowledgementMode 
acknowledgementMode);
+               
+               /// <summary>
+               /// Creates a producer of messages
+               /// </summary>
+               INMSProducer CreateProducer();
+               
+               
+               /// <summary>
+               /// Creates a consumer of messages on a given destination
+               /// </summary>
+               INMSConsumer CreateConsumer(IDestination destination);
+
+               /// <summary>
+               /// Creates a consumer of messages on a given destination with 
a selector
+               /// </summary>
+               INMSConsumer CreateConsumer(IDestination destination, string 
selector);
+
+               /// <summary>
+               /// Creates a consumer of messages on a given destination with 
a selector
+               /// </summary>
+               INMSConsumer CreateConsumer(IDestination destination, string 
selector, bool noLocal);
+
+               INMSConsumer CreateDurableConsumer(ITopic destination, string 
name);
+
+               INMSConsumer CreateDurableConsumer(ITopic destination, string 
name, string selector);
+
+        /// <summary>
+        /// Creates a named durable consumer of messages on a given 
destination with a selector
+        /// </summary>
+        INMSConsumer CreateDurableConsumer(ITopic destination, string name, 
string selector, bool noLocal);
+
+        INMSConsumer CreateSharedConsumer(ITopic destination, string name);
+
+        INMSConsumer CreateSharedConsumer(ITopic destination, string name, 
string selector);
+
+        INMSConsumer CreateSharedDurableConsumer(ITopic destination, string 
name);
+
+        INMSConsumer CreateSharedDurableConsumer(ITopic destination, string 
name, string selector);
+
+
+
+        void Unsubscribe(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>
+               IQueue GetQueue(string name);
+
+               /// <summary>
+               /// Returns the topic for the given name
+               /// </summary>
+               ITopic GetTopic(string name);
+
+               /// <summary>
+               /// Creates a temporary queue
+               /// </summary>
+               ITemporaryQueue CreateTemporaryQueue();
+
+               /// <summary>
+               /// Creates a temporary topic
+               /// </summary>
+               ITemporaryTopic CreateTemporaryTopic();
+
+               /// <summary>
+               /// Delete a destination (Queue, Topic, Temp Queue, Temp Topic).
+               /// </summary>
+               void DeleteDestination(IDestination destination);
 
 Review comment:
   I don't see this method in JMSContext. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to