Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 12286 invoked from network); 18 Jul 2008 21:05:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 21:05:25 -0000 Received: (qmail 34975 invoked by uid 500); 18 Jul 2008 21:05:24 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 34882 invoked by uid 500); 18 Jul 2008 21:05:24 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 34409 invoked by uid 99); 18 Jul 2008 21:05:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 14:05:23 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 21:04:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C68AD238896E; Fri, 18 Jul 2008 14:05:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r678037 - /activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ Date: Fri, 18 Jul 2008 21:04:59 -0000 To: commits@activemq.apache.org From: jgomes@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080718210500.C68AD238896E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jgomes Date: Fri Jul 18 14:04:58 2008 New Revision: 678037 URL: http://svn.apache.org/viewvc?rev=678037&view=rev Log: Formatting cleanup. Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IBytesMessage.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IConnection.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMapMessage.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessage.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageConsumer.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageProducer.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IObjectMessage.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IPrimitiveMap.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueue.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ISession.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IStartable.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryQueue.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryTopic.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITextMessage.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITopic.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConstants.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Tracer.cs Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IBytesMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IBytesMessage.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IBytesMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IBytesMessage.cs Fri Jul 18 14:04:58 2008 @@ -20,14 +20,8 @@ /// Represents a binary based message /// public interface IBytesMessage : IMessage - { - - byte[] Content - { - get; - set; - } - } + { + byte[] Content { get; set; } + } } - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IConnection.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IConnection.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IConnection.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IConnection.cs Fri Jul 18 14:04:58 2008 @@ -16,87 +16,84 @@ */ using System; -namespace Apache.NMS { - /// - /// The mode used to acknowledge messages after they are consumed - /// - public enum AcknowledgementMode - { - /** - * With this acknowledgment mode, the session will not - * acknowledge receipt of a message since the broker assumes - * successful receipt of a message after the onMessage handler - * has returned without error. - */ - AutoAcknowledge, - - /** - * With this acknowledgment mode, the session automatically - * acknowledges a client's receipt of a message either when - * the session has successfully returned from a call to receive - * or when the message listener the session has called to - * process the message successfully returns. Acknowlegements - * may be delayed in this mode to increase performance at - * the cost of the message being redelivered this client fails. - */ - DupsOkAcknowledge, - - /** - * With this acknowledgment mode, the client acknowledges a - * consumed message by calling the message's acknowledge method. - */ - ClientAcknowledge, - - /** - * Messages will be consumed when the transaction commits. - */ - Transactional - } - - /// - /// A delegate that can receive transport level exceptions. - /// - public delegate void ExceptionListener(Exception exception); - - - /// - /// Represents a connection with a message broker - /// - public interface IConnection : System.IDisposable, IStartable, IStoppable - { - - /// - /// Creates a new session to work on this connection - /// - ISession CreateSession(); - - /// - /// Creates a new session to work on this connection - /// - ISession CreateSession(AcknowledgementMode acknowledgementMode); - - - /// - /// The default acknowledgement mode - /// - AcknowledgementMode AcknowledgementMode { get; set; } - - /// - /// Sets the unique clienet ID for this connection before Start() or returns the - /// unique client ID after the connection has started - /// - string ClientId { get; set; } - - - /// - /// An asynchronous listener which can be notified if an error occurs - /// - event ExceptionListener ExceptionListener; - - /// - /// Closes the connection. - /// - void Close(); - - } +namespace Apache.NMS +{ + /// + /// The mode used to acknowledge messages after they are consumed + /// + public enum AcknowledgementMode + { + /// + /// With this acknowledgment mode, the session will not + /// acknowledge receipt of a message since the broker assumes + /// successful receipt of a message after the onMessage handler + /// has returned without error. + /// + AutoAcknowledge, + + /// + /// With this acknowledgment mode, the session automatically + /// acknowledges a client's receipt of a message either when + /// the session has successfully returned from a call to receive + /// or when the message listener the session has called to + /// process the message successfully returns. Acknowlegements + /// may be delayed in this mode to increase performance at + /// the cost of the message being redelivered this client fails. + /// + DupsOkAcknowledge, + + /// + /// With this acknowledgment mode, the client acknowledges a + /// consumed message by calling the message's acknowledge method. + /// + ClientAcknowledge, + + /// + /// Messages will be consumed when the transaction commits. + /// + Transactional + } + + /// + /// A delegate that can receive transport level exceptions. + /// + public delegate void ExceptionListener(Exception exception); + + + /// + /// Represents a connection with a message broker + /// + public interface IConnection : IDisposable, IStartable, IStoppable + { + /// + /// Creates a new session to work on this connection + /// + ISession CreateSession(); + + /// + /// Creates a new session to work on this connection + /// + ISession CreateSession(AcknowledgementMode acknowledgementMode); + + /// + /// The default acknowledgement mode + /// + AcknowledgementMode AcknowledgementMode { get; set; } + + /// + /// Sets the unique clienet ID for this connection before Start() or returns the + /// unique client ID after the connection has started + /// + string ClientId { get; set; } + + /// + /// An asynchronous listener which can be notified if an error occurs + /// + event ExceptionListener ExceptionListener; + + /// + /// Closes the connection. + /// + void Close(); + } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMapMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMapMessage.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMapMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMapMessage.cs Fri Jul 18 14:04:58 2008 @@ -22,13 +22,7 @@ /// of primitive types /// public interface IMapMessage : IMessage - { - IPrimitiveMap Body - { - get; - } - } + { + IPrimitiveMap Body { get; } + } } - - - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessage.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessage.cs Fri Jul 18 14:04:58 2008 @@ -18,117 +18,72 @@ namespace Apache.NMS { - /// - /// Represents a message either to be sent to a message broker or received from a message broker - /// - public interface IMessage - { - - /// - /// If using client acknowledgement mode on the session then this method will acknowledge that the - /// message has been processed correctly. - /// - void Acknowledge(); - - /// - /// Provides access to the message properties (headers) - /// - IPrimitiveMap Properties - { - get; - } - - /// - /// The correlation ID used to correlate messages from conversations or long running business processes - /// - string NMSCorrelationID - { - get; - set; - } - - /// - /// The destination of the message - /// - IDestination NMSDestination - { - get; - } - - /// - /// The amount of time that this message is valid for. null If this - /// message does not expire. - /// - TimeSpan NMSTimeToLive - { - get; - set; - } - - /// - /// The message ID which is set by the provider - /// - string NMSMessageId - { - get; - } - - /// - /// Whether or not this message is persistent - /// - bool NMSPersistent - { - get; - set; - } - - /// - /// The Priority on this message - /// - byte NMSPriority - { - get; - set; - } - - /// - /// Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully. - /// - bool NMSRedelivered - { - get; - } - - - /// - /// The destination that the consumer of this message should send replies to - /// - IDestination NMSReplyTo - { - get; - set; - } - - - /// - /// The timestamp of when the message was pubished in UTC time. If the publisher disables setting - /// the timestamp on the message, the time will be set to the start of the UNIX epoc (1970-01-01 00:00:00). - /// - DateTime NMSTimestamp - { - get; - } - - /// - /// The type name of this message - /// - string NMSType - { - get; - set; - } - - } + /// + /// Represents a message either to be sent to a message broker or received from a message broker + /// + public interface IMessage + { + /// + /// If using client acknowledgement mode on the session then this method will acknowledge that the + /// message has been processed correctly. + /// + void Acknowledge(); + + /// + /// Provides access to the message properties (headers) + /// + IPrimitiveMap Properties { get; } + + /// + /// The correlation ID used to correlate messages from conversations or long running business processes + /// + string NMSCorrelationID { get; set; } + + /// + /// The destination of the message + /// + IDestination NMSDestination { get; } + + /// + /// The amount of time that this message is valid for. null If this + /// message does not expire. + /// + TimeSpan NMSTimeToLive { get; set; } + + /// + /// The message ID which is set by the provider + /// + string NMSMessageId { get; } + + /// + /// Whether or not this message is persistent + /// + bool NMSPersistent { get; set; } + + /// + /// The Priority on this message + /// + byte NMSPriority { get; set; } + + /// + /// Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully. + /// + bool NMSRedelivered { get; } + + /// + /// The destination that the consumer of this message should send replies to + /// + IDestination NMSReplyTo { get; set; } + + /// + /// The timestamp of when the message was pubished in UTC time. If the publisher disables setting + /// the timestamp on the message, the time will be set to the start of the UNIX epoc (1970-01-01 00:00:00). + /// + DateTime NMSTimestamp { get; } + + /// + /// The type name of this message + /// + string NMSType { get; set; } + } } - - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageConsumer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageConsumer.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageConsumer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageConsumer.cs Fri Jul 18 14:04:58 2008 @@ -25,38 +25,38 @@ /// A consumer of messages /// public interface IMessageConsumer : System.IDisposable - { - - /// - /// Waits until a message is available and returns it - /// - IMessage Receive(); - - /// - /// If a message is available within the timeout duration it is returned otherwise this method returns null - /// - IMessage Receive(System.TimeSpan timeout); - - /// - /// If a message is available immediately it is returned otherwise this method returns null - /// - IMessage ReceiveNoWait(); - - /// - /// An asynchronous listener which can be used to consume messages asynchronously - /// - event MessageListener Listener; + { + + /// + /// Waits until a message is available and returns it + /// + IMessage Receive(); + + /// + /// If a message is available within the timeout duration it is returned otherwise this method returns null + /// + IMessage Receive(System.TimeSpan timeout); + + /// + /// If a message is available immediately it is returned otherwise this method returns null + /// + IMessage ReceiveNoWait(); + + /// + /// An asynchronous listener which can be used to consume messages asynchronously + /// + event MessageListener Listener; - /// - /// Closes the message consumer. - /// - /// - /// Clients should close message consumers them when they are not needed. - /// This call blocks until a receive or message listener in progress has completed. - /// A blocked message consumer receive call returns null when this message consumer is closed. - /// - void Close(); - } + /// + /// Closes the message consumer. + /// + /// + /// Clients should close message consumers them when they are not needed. + /// This call blocks until a receive or message listener in progress has completed. + /// A blocked message consumer receive call returns null when this message consumer is closed. + /// + void Close(); + } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageProducer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageProducer.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageProducer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IMessageProducer.cs Fri Jul 18 14:04:58 2008 @@ -18,101 +18,78 @@ namespace Apache.NMS { - /// /// An object capable of sending messages to some destination /// public interface IMessageProducer : System.IDisposable { - - /// - /// Sends the message to the default destination for this producer - /// - void Send(IMessage message); - - /// - /// Sends the message to the default destination with the explicit QoS configuration - /// - void Send(IMessage message, bool persistent, byte priority, TimeSpan timeToLive); - - /// - /// Sends the message to the given destination - /// - void Send(IDestination destination, IMessage message); - - /// - /// Sends the message to the given destination with the explicit QoS configuration - /// + /// + /// Sends the message to the default destination for this producer + /// + void Send(IMessage message); + + /// + /// Sends the message to the default destination with the explicit QoS configuration + /// + void Send(IMessage message, bool persistent, byte priority, TimeSpan timeToLive); + + /// + /// Sends the message to the given destination + /// + void Send(IDestination destination, IMessage message); + + /// + /// Sends the message to the given destination with the explicit QoS configuration + /// void Send(IDestination destination, IMessage message, bool persistent, byte priority, TimeSpan timeToLive); - - bool Persistent - { - get; - set; - } - - TimeSpan TimeToLive - { - get; - set; - } - - byte Priority - { - get; - set; - } - - bool DisableMessageID - { - get; - set; - } - - bool DisableMessageTimestamp - { - get; - set; - } - - // Factory methods to create messages - + bool Persistent { get; set; } + + TimeSpan TimeToLive { get; set; } + + byte Priority { get; set; } + + bool DisableMessageID { get; set; } + + bool DisableMessageTimestamp { get; set; } + + #region Factory methods to create messages + /// /// Creates a new message with an empty body /// IMessage CreateMessage(); - + /// /// Creates a new text message with an empty body /// ITextMessage CreateTextMessage(); - + /// /// Creates a new text message with the given body /// ITextMessage CreateTextMessage(string text); - + /// /// Creates a new Map message which contains primitive key and value pairs /// IMapMessage CreateMapMessage(); - + /// /// Creates a new Object message containing the given .NET object as the body /// IObjectMessage CreateObjectMessage(object body); - + /// /// Creates a new binary message /// IBytesMessage CreateBytesMessage(); - + /// /// Creates a new binary message with the given body /// IBytesMessage CreateBytesMessage(byte[] body); - } -} - + #endregion + } +} Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IObjectMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IObjectMessage.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IObjectMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IObjectMessage.cs Fri Jul 18 14:04:58 2008 @@ -20,13 +20,7 @@ /// Represents an Object message which contains a serializable .Net object. /// public interface IObjectMessage : IMessage - { - object Body - { - get; - } - } + { + object Body { get; } + } } - - - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IPrimitiveMap.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IPrimitiveMap.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IPrimitiveMap.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IPrimitiveMap.cs Fri Jul 18 14:04:58 2008 @@ -18,75 +18,57 @@ namespace Apache.NMS { - - /// - /// Represents a Map of primitive types where the keys are all string instances - /// and the values are strings or numbers. - /// - public interface IPrimitiveMap - { - - void Clear(); - - bool Contains(object key); - - void Remove(object key); - - int Count - { - get; - } - - ICollection Keys - { - get; - } - - ICollection Values - { - get; - } - - object this[string key] - { - get; - set; - } - - string GetString(string key); - void SetString(string key, string value); - - bool GetBool(string key); - void SetBool(string key, bool value); - - byte GetByte(string key); - void SetByte(string key, byte value); - - char GetChar(string key); - void SetChar(string key, char value); - - short GetShort(string key); - void SetShort(string key, short value); - - int GetInt(string key); - void SetInt(string key, int value); - - long GetLong(string key); - void SetLong(string key, long value); - - float GetFloat(string key); - void SetFloat(string key, float value); - - double GetDouble(string key); - void SetDouble(string key, double value); - - IList GetList(string key); - void SetList(string key, IList list); - - IDictionary GetDictionary(string key); - void SetDictionary(string key, IDictionary dictionary); - - } -} + /// + /// Represents a Map of primitive types where the keys are all string instances + /// and the values are strings or numbers. + /// + public interface IPrimitiveMap + { + void Clear(); + + bool Contains(object key); + + void Remove(object key); + + int Count { get; } + + ICollection Keys { get; } + + ICollection Values { get; } + + object this[string key] { get; set; } + + string GetString(string key); + void SetString(string key, string value); + + bool GetBool(string key); + void SetBool(string key, bool value); + byte GetByte(string key); + void SetByte(string key, byte value); + char GetChar(string key); + void SetChar(string key, char value); + + short GetShort(string key); + void SetShort(string key, short value); + + int GetInt(string key); + void SetInt(string key, int value); + + long GetLong(string key); + void SetLong(string key, long value); + + float GetFloat(string key); + void SetFloat(string key, float value); + + double GetDouble(string key); + void SetDouble(string key, double value); + + IList GetList(string key); + void SetList(string key, IList list); + + IDictionary GetDictionary(string key); + void SetDictionary(string key, IDictionary dictionary); + } +} Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueue.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueue.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueue.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IQueue.cs Fri Jul 18 14:04:58 2008 @@ -18,15 +18,11 @@ { /// /// Represents a queue in a message broker. A message sent to a queue is delivered - /// to at most one consumer on the queue. + /// to at most one consumer on the queue. /// public interface IQueue : IDestination { - - string QueueName - { - get; - } + string QueueName { get; } } } 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=678037&r1=678036&r2=678037&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 Jul 18 14:04:58 2008 @@ -14,131 +14,131 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -namespace Apache.NMS { - /// - /// Represents a single unit of work on an IConnection. - /// So the ISession can be used to perform transactional receive and sends - /// - public interface ISession : System.IDisposable - { - - /// - /// Creates a producer of messages - /// - IMessageProducer CreateProducer(); - - /// - /// Creates a producer of messages on a given destination - /// - IMessageProducer CreateProducer(IDestination destination); - - /// - /// Creates a consumer of messages on a given destination - /// - IMessageConsumer CreateConsumer(IDestination destination); - - /// - /// Creates a consumer of messages on a given destination with a selector - /// - IMessageConsumer CreateConsumer(IDestination destination, string selector); - - /// - /// Creates a consumer of messages on a given destination with a selector - /// - IMessageConsumer CreateConsumer(IDestination destination, string selector, bool noLocal); - - /// - /// Creates a named durable consumer of messages on a given destination with a selector - /// - IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal); - - /// - /// Returns the queue for the given name - /// - IQueue GetQueue(string name); - - /// - /// Returns the topic for the given name - /// - ITopic GetTopic(string name); - - - /// - /// Creates a temporary queue - /// - ITemporaryQueue CreateTemporaryQueue(); - - /// - /// Creates a temporary topic - /// - ITemporaryTopic CreateTemporaryTopic(); - - - // Factory methods to create messages - - /// - /// Creates a new message with an empty body - /// - IMessage CreateMessage(); - - /// - /// Creates a new text message with an empty body - /// - ITextMessage CreateTextMessage(); - - /// - /// Creates a new text message with the given body - /// - ITextMessage CreateTextMessage(string text); - - /// - /// Creates a new Map message which contains primitive key and value pairs - /// - IMapMessage CreateMapMessage(); - - /// - /// Creates a new Object message containing the given .NET object as the body - /// - IObjectMessage CreateObjectMessage(object body); - - /// - /// Creates a new binary message - /// - IBytesMessage CreateBytesMessage(); - - /// - /// Creates a new binary message with the given body - /// - IBytesMessage CreateBytesMessage(byte[] body); - - /// - /// Closes the session. There is no need to close the producers and consumers - /// of a closed session. - /// - void Close(); - - // Transaction methods - - /// - /// If this is a transactional session then commit all message - /// send and acknowledgements for producers and consumers in this session - /// - void Commit(); - - /// - /// If this is a transactional session then rollback all message - /// send and acknowledgements for producers and consumers in this session - /// - void Rollback(); - - // Attributes - - bool Transacted { - get; - } - - AcknowledgementMode AcknowledgementMode { - get; - } - } +using System; + +namespace Apache.NMS +{ + /// + /// Represents a single unit of work on an IConnection. + /// So the ISession can be used to perform transactional receive and sends + /// + public interface ISession : IDisposable + { + /// + /// Creates a producer of messages + /// + IMessageProducer CreateProducer(); + + /// + /// Creates a producer of messages on a given destination + /// + IMessageProducer CreateProducer(IDestination destination); + + /// + /// Creates a consumer of messages on a given destination + /// + IMessageConsumer CreateConsumer(IDestination destination); + + /// + /// Creates a consumer of messages on a given destination with a selector + /// + IMessageConsumer CreateConsumer(IDestination destination, string selector); + + /// + /// Creates a consumer of messages on a given destination with a selector + /// + IMessageConsumer CreateConsumer(IDestination destination, string selector, bool noLocal); + + /// + /// Creates a named durable consumer of messages on a given destination with a selector + /// + IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal); + + /// + /// Returns the queue for the given name + /// + IQueue GetQueue(string name); + + /// + /// Returns the topic for the given name + /// + ITopic GetTopic(string name); + + /// + /// Creates a temporary queue + /// + ITemporaryQueue CreateTemporaryQueue(); + + /// + /// Creates a temporary topic + /// + ITemporaryTopic CreateTemporaryTopic(); + + // Factory methods to create messages + + /// + /// Creates a new message with an empty body + /// + IMessage CreateMessage(); + + /// + /// Creates a new text message with an empty body + /// + ITextMessage CreateTextMessage(); + + /// + /// Creates a new text message with the given body + /// + ITextMessage CreateTextMessage(string text); + + /// + /// Creates a new Map message which contains primitive key and value pairs + /// + IMapMessage CreateMapMessage(); + + /// + /// Creates a new Object message containing the given .NET object as the body + /// + IObjectMessage CreateObjectMessage(object body); + + /// + /// Creates a new binary message + /// + IBytesMessage CreateBytesMessage(); + + /// + /// Creates a new binary message with the given body + /// + IBytesMessage CreateBytesMessage(byte[] body); + + /// + /// Closes the session. There is no need to close the producers and consumers + /// of a closed session. + /// + void Close(); + + #region Transaction methods + + /// + /// If this is a transactional session then commit all message + /// send and acknowledgements for producers and consumers in this session + /// + void Commit(); + + /// + /// If this is a transactional session then rollback all message + /// send and acknowledgements for producers and consumers in this session + /// + void Rollback(); + + #endregion + + #region Attributes + + bool Transacted { get; } + + AcknowledgementMode AcknowledgementMode { get; } + + #endregion + } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IStartable.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IStartable.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IStartable.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/IStartable.cs Fri Jul 18 14:04:58 2008 @@ -20,8 +20,8 @@ /// A lifecycle for NMS objects to indicate they can be started /// public interface IStartable - { - void Start(); + { + void Start(); bool IsStarted { get; } } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryQueue.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryQueue.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryQueue.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryQueue.cs Fri Jul 18 14:04:58 2008 @@ -18,7 +18,7 @@ { /// /// Represents a temporary queue which exists for the duration - /// of the IConnection which created it. + /// of the IConnection which created it. /// public interface ITemporaryQueue : IDestination { Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryTopic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryTopic.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryTopic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITemporaryTopic.cs Fri Jul 18 14:04:58 2008 @@ -18,7 +18,7 @@ { /// /// Represents a temporary topic which exists for the duration - /// of the IConnection which created it. + /// of the IConnection which created it. /// public interface ITemporaryTopic : IDestination { Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITextMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITextMessage.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITextMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITextMessage.cs Fri Jul 18 14:04:58 2008 @@ -20,14 +20,8 @@ /// Represents a text based message /// public interface ITextMessage : IMessage - { - - string Text - { - get; - set; - } - } + { + string Text { get; set; } + } } - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITopic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITopic.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITopic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/ITopic.cs Fri Jul 18 14:04:58 2008 @@ -18,16 +18,10 @@ { /// /// Represents a topic in a message broker. A message sent to a topic - /// is delivered to all consumers on the topic who are interested in the message. + /// is delivered to all consumers on the topic who are interested in the message. /// public interface ITopic : IDestination { - - string TopicName - { - get; - } + string TopicName { get; } } } - - Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/InvalidDestinationException.cs Fri Jul 18 14:04:58 2008 @@ -24,15 +24,15 @@ public class InvalidDestinationException : NMSException { public InvalidDestinationException(string message) - : base(message) + : base(message) { } - - public InvalidDestinationException(string message, Exception innerException) - : base(message, innerException) - { - } - } + + public InvalidDestinationException(string message, Exception innerException) + : base(message, innerException) + { + } + } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConnectionFactory.cs Fri Jul 18 14:04:58 2008 @@ -22,9 +22,9 @@ namespace Apache.NMS { - public class NMSConnectionFactory : IConnectionFactory + public class NMSConnectionFactory : IConnectionFactory { - protected readonly IConnectionFactory factory; + protected readonly IConnectionFactory factory; /// /// The ConnectionFactory object must define a constructor that takes as a minimum a Uri object. @@ -57,14 +57,14 @@ public static IConnectionFactory CreateConnectionFactory(Uri uriProvider, params object[] constructorParams) { IConnectionFactory connectionFactory = null; - + try - { - Type factoryType = GetTypeForScheme(uriProvider.Scheme); + { + Type factoryType = GetTypeForScheme(uriProvider.Scheme); - // If an implementation was found, try to instantiate it. + // If an implementation was found, try to instantiate it. if(factoryType != null) - { + { #if NETCF connectionFactory = (IConnectionFactory) Activator.CreateInstance(factoryType); #else @@ -74,18 +74,18 @@ } if(null == connectionFactory) - { - throw new NMSConnectionException("No IConnectionFactory implementation found for connection URI: " + uriProvider); - } - } + { + throw new NMSConnectionException("No IConnectionFactory implementation found for connection URI: " + uriProvider); + } + } catch(NMSConnectionException) - { - throw; - } - catch(Exception ex) - { + { + throw; + } + catch(Exception ex) + { throw new NMSConnectionException("Could not create the IConnectionFactory implementation: " + ex.Message, ex); - } + } return connectionFactory; } @@ -95,7 +95,7 @@ /// /// /// - private static Type GetTypeForScheme(string scheme) + private static Type GetTypeForScheme(string scheme) { string assemblyFileName; string factoryClassName; @@ -116,7 +116,7 @@ } return factoryType; - } + } /// /// Lookup the connection factory assembly filename and class name. @@ -124,16 +124,16 @@ /// Load XML config files named: nmsprovider-{scheme}.config /// Following is a sample configuration file named nmsprovider-jms.config. Replace /// the parenthesis with angle brackets for proper XML formatting. - /// + /// /// (?xml version="1.0" encoding="utf-8" ?) /// (configuration) /// (provider assembly="MyCompany.NMS.JMSProvider.dll" classFactory="MyCompany.NMS.JMSProvider.ConnectionFactory"/) /// (/configuration) - /// + /// /// This configuration file would be loaded and parsed when a connection uri with a scheme of 'jms' /// is used for the provider. In this example the connection string might look like: /// jms://localhost:7222 - /// + /// /// /// /// @@ -193,12 +193,12 @@ } /// - /// Creates a new connection - /// - public IConnection CreateConnection() - { - return this.factory.CreateConnection(); - } + /// Creates a new connection + /// + public IConnection CreateConnection() + { + return this.factory.CreateConnection(); + } /// /// Creates a new connection with the given user name and password @@ -206,18 +206,18 @@ /// /// /// - public IConnection CreateConnection(string userName, string password) - { - return this.factory.CreateConnection(userName, password); - } + public IConnection CreateConnection(string userName, string password) + { + return this.factory.CreateConnection(userName, password); + } /// - /// The actual IConnectionFactory implementation that is being used. This implemenation - /// depends on the scheme of the URI used when constructed. - /// - public IConnectionFactory ConnectionFactory - { - get { return factory; } - } + /// The actual IConnectionFactory implementation that is being used. This implemenation + /// depends on the scheme of the URI used when constructed. + /// + public IConnectionFactory ConnectionFactory + { + get { return factory; } + } } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConstants.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConstants.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConstants.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSConstants.cs Fri Jul 18 14:04:58 2008 @@ -22,11 +22,11 @@ /// Defines a number of constants /// public class NMSConstants - { + { public const byte defaultPriority = 5; public const bool defaultPersistence = true; public static readonly TimeSpan defaultTimeToLive = TimeSpan.Zero; - } + } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSException.cs Fri Jul 18 14:04:58 2008 @@ -23,17 +23,14 @@ /// public class NMSException : System.Exception { - - public NMSException(string message) - : base(message) + public NMSException(string message) + : base(message) { } - - public NMSException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} - + public NMSException(string message, Exception innerException) + : base(message, innerException) + { + } + } +} Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/NMSSecurityException.cs Fri Jul 18 14:04:58 2008 @@ -21,8 +21,8 @@ /// public class NMSSecurityException : NMSException { - public NMSSecurityException(string message) - : base(message) + public NMSSecurityException(string message) + : base(message) { } } Modified: activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Tracer.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Tracer.cs?rev=678037&r1=678036&r2=678037&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Tracer.cs (original) +++ activemq/activemq-dotnet/Apache.NMS/trunk/src/main/csharp/Tracer.cs Fri Jul 18 14:04:58 2008 @@ -136,4 +136,4 @@ } } } -} \ No newline at end of file +}