activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r906265 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Date Wed, 03 Feb 2010 22:10:49 GMT
Author: jgomes
Date: Wed Feb  3 22:10:48 2010
New Revision: 906265

URL: http://svn.apache.org/viewvc?rev=906265&view=rev
Log:
Minor changes to coding style to create a consistent API for checking acknowledgment mode.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=906265&r1=906264&r2=906265&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Wed Feb  3 22:10:48 2010
@@ -491,7 +491,7 @@
 							}
 							catch(Exception e)
 							{
-								if(IsAutoAcknowledgeBatch || IsAutoAcknowledgeEach || this.session.IsIndividualAcknowledge)
+								if(IsAutoAcknowledgeBatch || IsAutoAcknowledgeEach || IsIndividualAcknowledge)
 								{
 									// Redeliver the message
 								}
@@ -704,7 +704,7 @@
 				{
 					AckLater(dispatch, AckType.ConsumedAck);
 				}
-				else if(this.session.IsClientAcknowledge || this.session.IsIndividualAcknowledge)
+				else if(IsClientAcknowledge || IsIndividualAcknowledge)
 				{
 					bool messageAckedByConsumer = false;
 					
@@ -982,11 +982,11 @@
 
 			message.Connection = this.session.Connection;
 
-			if(this.session.IsClientAcknowledge)
+			if(IsClientAcknowledge)
 			{
 				message.Acknowledger += new AcknowledgeHandler(DoClientAcknowledge);
 			}
-			else if(this.session.IsIndividualAcknowledge)
+			else if(IsIndividualAcknowledge)
 			{
 				message.Acknowledger += new AcknowledgeHandler(DoIndividualAcknowledge);
 			}
@@ -1028,6 +1028,16 @@
 			get { return this.session.IsDupsOkAcknowledge && !this.info.Destination.IsQueue;
}
 		}
 
+		private bool IsIndividualAcknowledge
+		{
+			get { return this.session.IsIndividualAcknowledge; }
+		}
+
+		private bool IsClientAcknowledge
+		{
+			get { return this.session.IsClientAcknowledge; }
+		}
+
 		#region Nested ISyncronization Types
 
 		class MessageConsumerSynchronization : ISynchronization



Mime
View raw message