Havret commented on a change in pull request #12: NMS 2.0 WIP URL: https://github.com/apache/activemq-nms-api/pull/12#discussion_r371981265
########## 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); Review comment: In Jms `name` is more explicit. It's `sharedSubscriptionName` there. ---------------------------------------------------------------- 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
