activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r802939 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport: Failover/FailoverTransport.cs ITransport.cs Tcp/TcpTransport.cs TransportFilter.cs
Date Mon, 10 Aug 2009 22:01:36 GMT
Author: tabish
Date: Mon Aug 10 22:01:35 2009
New Revision: 802939

URL: http://svn.apache.org/viewvc?rev=802939&view=rev
Log:
* ITransport.cs:
* TransportFilter.cs:
* Tcp/TcpTransport.cs:
* Failover/FailoverTransport.cs: 

Adding in delegates for Transport interrupted and resumed notifications

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ITransport.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs
    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/Failover/FailoverTransport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs?rev=802939&r1=802938&r2=802939&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Failover/FailoverTransport.cs
Mon Aug 10 22:01:35 2009
@@ -46,6 +46,8 @@
 		private List<Uri> uris = new List<Uri>();
 		private CommandHandler _commandHandler;
 		private ExceptionHandler _exceptionHandler;
+		private InterruptedHandler interruptedHandler;
+		private ResumedHandler resumedHandler;
 
 		private Mutex reconnectMutex = new Mutex();
 		private Mutex backupMutex = new Mutex();
@@ -255,6 +257,8 @@
 				{
 					reconnectMutex.ReleaseMutex();
 				}
+                
+                this.Interrupted( transport );
 			}
 		}
 
@@ -797,6 +801,7 @@
 									ConnectedTransport = t;
 									connectFailures = 0;
 									connected = true;
+                                    this.Resumed( t );
 									Tracer.InfoFormat("Successfully reconnected to backup {0}", uri.ToString());
 									return false;
 								}
@@ -832,6 +837,7 @@
 									restoreTransport(t);
 								}
 
+                                this.Resumed( t );
 								Tracer.Debug("Connection established");
 								ReconnectDelay = InitialReconnectDelay;
 								ConnectedTransportURI = uri;
@@ -1004,6 +1010,18 @@
 			set { _exceptionHandler = value; }
 		}
 
+		public InterruptedHandler Interrupted
+		{
+			get { return interruptedHandler; }
+			set { this.interruptedHandler = value; }
+		}
+		
+		public ResumedHandler Resumed
+		{
+			get { return resumedHandler; }
+			set { this.resumedHandler = value; }
+		}
+		
 		public bool IsStarted
 		{
 			get { return started; }

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ITransport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ITransport.cs?rev=802939&r1=802938&r2=802939&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ITransport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/ITransport.cs
Mon Aug 10 22:01:35 2009
@@ -22,6 +22,8 @@
 {
 	public delegate void CommandHandler(ITransport sender, Command command);
 	public delegate void ExceptionHandler(ITransport sender, Exception command);
+	public delegate void InterruptedHandler(ITransport sender);
+	public delegate void ResumedHandler(ITransport sender);
 
 	/// <summary>
 	/// Represents the logical networking transport layer.
@@ -53,6 +55,18 @@
 			set;
 		}
 
+		InterruptedHandler Interrupted
+		{
+			get;
+			set;
+		}		
+
+		ResumedHandler Resumed
+		{
+			get;
+			set;
+		}		
+		
 		bool IsDisposed
 		{
 			get;

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs?rev=802939&r1=802938&r2=802939&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Transport/Tcp/TcpTransport.cs
Mon Aug 10 22:01:35 2009
@@ -44,6 +44,8 @@
 
 		private CommandHandler commandHandler;
 		private ExceptionHandler exceptionHandler;
+		private InterruptedHandler interruptedHandler;
+		private ResumedHandler resumedHandler;
 		private TimeSpan MAX_THREAD_WAIT = TimeSpan.FromMilliseconds(30000);
 
 		public TcpTransport(Socket socket, IWireFormat wireformat)
@@ -358,6 +360,18 @@
 			set { this.exceptionHandler = value; }
 		}
 
+		public InterruptedHandler Interrupted
+		{
+			get { return interruptedHandler; }
+			set { this.interruptedHandler = value; }
+		}
+		
+		public ResumedHandler Resumed
+		{
+			get { return resumedHandler; }
+			set { this.resumedHandler = value; }
+		}
+
 		public IWireFormat Wireformat
 		{
 			get { return wireformat; }

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=802939&r1=802938&r2=802939&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
Mon Aug 10 22:01:35 2009
@@ -28,6 +28,8 @@
 		protected readonly ITransport next;
 		protected CommandHandler commandHandler;
 		protected ExceptionHandler exceptionHandler;
+		protected InterruptedHandler interruptedHandler;
+		protected ResumedHandler resumedHandler;
 		private bool disposed = false;
 
 		public TransportFilter(ITransport next)
@@ -165,6 +167,18 @@
 			set { this.exceptionHandler = value; }
 		}
 
+		public InterruptedHandler Interrupted
+		{
+			get { return interruptedHandler; }
+			set { this.interruptedHandler = value; }
+		}
+		
+		public ResumedHandler Resumed
+		{
+			get { return resumedHandler; }
+			set { this.resumedHandler = value; }
+		}
+		
 		public virtual void Stop()
 		{
 		}



Mime
View raw message