activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r828861 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
Date Thu, 22 Oct 2009 21:37:34 GMT
Author: tabish
Date: Thu Oct 22 21:37:33 2009
New Revision: 828861

URL: http://svn.apache.org/viewvc?rev=828861&view=rev
Log:
Update to add an attempt at the IsExpired method needed in Message

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

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs?rev=828861&r1=828860&r2=828861&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
Thu Oct 22 21:37:33 2009
@@ -19,6 +19,7 @@
 using System.Collections;
 
 using Apache.NMS.ActiveMQ.State;
+using Apache.NMS.Util;
 
 namespace Apache.NMS.ActiveMQ.Commands
 {
@@ -165,6 +166,11 @@
             this.ReadOnlyBody = true;
         }
 
+        public bool IsExpired()
+        {
+            return this.expiration == 0 ? false : DateTime.UtcNow > DateUtils.ToDateTimeUtc(this.expiration);
+        }
+
         public ProducerId ProducerId
         {
             get { return producerId; }



Mime
View raw message