activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgo...@apache.org
Subject svn commit: r989833 - in /activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp: EMSConvert.cs Message.cs ObjectMessage.cs
Date Thu, 26 Aug 2010 17:38:20 GMT
Author: jgomes
Date: Thu Aug 26 17:38:20 2010
New Revision: 989833

URL: http://svn.apache.org/viewvc?rev=989833&view=rev
Log:
Implement new interfaces for EMS provider.
Fixes [AMQNET-276]. (See https://issues.apache.org/activemq/browse/AMQNET-276)

Modified:
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/EMSConvert.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Message.cs
    activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ObjectMessage.cs

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/EMSConvert.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/EMSConvert.cs?rev=989833&r1=989832&r2=989833&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/EMSConvert.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/EMSConvert.cs Thu Aug 26
17:38:20 2010
@@ -112,8 +112,18 @@ namespace Apache.NMS.EMS
 			}
 
 			return null;
-		}
-
+		}
+
+		public static TIBCO.EMS.Destination ToEMSDestination(Apache.NMS.IDestination nmsDestination)
+		{
+			if(nmsDestination is Apache.NMS.EMS.Destination)
+			{
+				return ((Apache.NMS.EMS.Destination) nmsDestination).tibcoDestination;
+			}
+
+			return null;
+		}
+
 		public static Apache.NMS.IMessage ToNMSMessage(TIBCO.EMS.Message tibcoMessage)
 		{
 			if(tibcoMessage is TIBCO.EMS.TextMessage)

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Message.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Message.cs?rev=989833&r1=989832&r2=989833&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Message.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/Message.cs Thu Aug 26 17:38:20
2010
@@ -126,6 +126,17 @@ namespace Apache.NMS.EMS
 		public Apache.NMS.IDestination NMSDestination
 		{
 			get { return EMSConvert.ToNMSDestination(this.tibcoMessage.Destination); }
+			set
+			{
+				try
+				{
+					this.tibcoMessage.Destination = EMSConvert.ToEMSDestination(value);
+				}
+				catch(Exception ex)
+				{
+					ExceptionUtil.WrapAndThrowNMSException(ex);
+				}
+			}
 		}
 
 		protected TimeSpan timeToLive;
@@ -146,6 +157,7 @@ namespace Apache.NMS.EMS
 		public string NMSMessageId
 		{
 			get { return this.tibcoMessage.MessageID; }
+			set { this.tibcoMessage.MessageID = value; }
 		}
 
 		/// <summary>
@@ -192,6 +204,7 @@ namespace Apache.NMS.EMS
 		public bool NMSRedelivered
 		{
 			get { return this.tibcoMessage.Redelivered; }
+			set { this.tibcoMessage.Redelivered = value; }
 		}
 
 		/// <summary>
@@ -204,14 +217,7 @@ namespace Apache.NMS.EMS
 			{
 				try
 				{
-					if(null == value)
-					{
-						this.tibcoMessage.ReplyTo = null;
-					}
-					else
-					{
-						this.tibcoMessage.ReplyTo = ((Apache.NMS.EMS.Destination) value).tibcoDestination;
-					}
+					this.tibcoMessage.ReplyTo = EMSConvert.ToEMSDestination(value);
 				}
 				catch(Exception ex)
 				{
@@ -227,6 +233,7 @@ namespace Apache.NMS.EMS
 		public DateTime NMSTimestamp
 		{
 			get { return DateUtils.ToDateTime(this.tibcoMessage.Timestamp); }
+			set { this.tibcoMessage.Timestamp = DateUtils.ToJavaTime(value); }
 		}
 
 		/// <summary>

Modified: activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ObjectMessage.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ObjectMessage.cs?rev=989833&r1=989832&r2=989833&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ObjectMessage.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.EMS/trunk/src/main/csharp/ObjectMessage.cs Thu Aug
26 17:38:20 2010
@@ -35,6 +35,7 @@ namespace Apache.NMS.EMS
 		public object Body
 		{
 			get { return this.tibcoObjectMessage.TheObject; }
+			set { this.tibcoObjectMessage.TheObject = value; }
 		}
 
 		#endregion



Mime
View raw message