activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r825158 - /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFilter.cs
Date Wed, 14 Oct 2009 14:54:28 GMT
Author: tabish
Date: Wed Oct 14 14:54:28 2009
New Revision: 825158

URL: http://svn.apache.org/viewvc?rev=825158&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-172

Add handling of TransportInterrupted and TransportResumed to the Filter so that top level
clients can get these events.
* TransportFilter.cs: 

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

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFilter.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFilter.cs?rev=825158&r1=825157&r2=825158&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFilter.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/TransportFilter.cs
Wed Oct 14 14:54:28 2009
@@ -37,6 +37,8 @@
 			this.next = next;
 			this.next.Command = new CommandHandler(OnCommand);
 			this.next.Exception = new ExceptionHandler(OnException);
+            this.next.Interrupted = new InterruptedHandler(OnInterrupted);
+            this.next.Resumed = new ResumedHandler(OnResumed);
 		}
 
 		~TransportFilter()
@@ -54,6 +56,22 @@
 			this.exceptionHandler(sender, command);
 		}
 
+        protected virtual void OnInterrupted(ITransport sender)
+        {
+            if(this.interruptedHandler != null)
+            {
+                this.interruptedHandler(sender);
+            }
+        }
+
+        protected virtual void OnResumed(ITransport sender)
+        {
+            if(this.resumedHandler != null)
+            {
+                this.resumedHandler(sender);
+            }
+        }
+        
 		/// <summary>
 		/// Method Oneway
 		/// </summary>



Mime
View raw message