/* * 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 { /// /// A Factory of IConnection objects /// public interface IConnectionFactory { /// /// Creates a new connection /// IConnection CreateConnection(); /// /// Creates a new connection with the given user name and password /// IConnection CreateConnection(string userName, string password); /// /// Get/or set the broker Uri. /// Uri BrokerUri { get; set; } /// /// Get/or set the redelivery policy that new IConnection objects are /// assigned upon creation. /// IRedeliveryPolicy RedeliveryPolicy { get; set; } /// /// A Delegate that is called each time a Message is dispatched to allow the client to do /// any necessary transformations on the received message before it is delivered. The /// ConnectionFactory sets the provided delegate instance on each Connection instance that /// is created from this factory, each connection in turn passes the delegate along to each /// Session it creates which then passes that along to the Consumers it creates. /// ConsumerTransformerDelegate ConsumerTransformer { get; set; } /// /// A delegate that is called each time a Message is sent from this Producer which allows /// the application to perform any needed transformations on the Message before it is sent. /// The ConnectionFactory sets the provided delegate instance on each Connection instance that /// is created from this factory, each connection in turn passes the delegate along to each /// Session it creates which then passes that along to the Producers it creates. /// ProducerTransformerDelegate ProducerTransformer { get; set; } } }