activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1142328 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp: Commands/ConnectionControl.cs OpenWire/V8/ConnectionControlMarshaller.cs
Date Sat, 02 Jul 2011 22:06:27 GMT
Author: tabish
Date: Sat Jul  2 22:06:26 2011
New Revision: 1142328

URL: http://svn.apache.org/viewvc?rev=1142328&view=rev
Log:
https://issues.apache.org/jira/browse/AMQNET-329

Update v8 commands with latest changes from AMQ trunk.

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ConnectionControl.cs
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/V8/ConnectionControlMarshaller.cs

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ConnectionControl.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ConnectionControl.cs?rev=1142328&r1=1142327&r2=1142328&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ConnectionControl.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/ConnectionControl.cs
Sat Jul  2 22:06:26 2011
@@ -41,6 +41,7 @@ namespace Apache.NMS.ActiveMQ.Commands
         string connectedBrokers;
         string reconnectTo;
         bool rebalanceConnection;
+        byte[] token;
 
         ///
         /// <summery>
@@ -71,7 +72,8 @@ namespace Apache.NMS.ActiveMQ.Commands
                 "Suspend = " + Suspend + ", " + 
                 "ConnectedBrokers = " + ConnectedBrokers + ", " + 
                 "ReconnectTo = " + ReconnectTo + ", " + 
-                "RebalanceConnection = " + RebalanceConnection + " ]";
+                "RebalanceConnection = " + RebalanceConnection + ", " + 
+                "Token = " + System.Text.ASCIIEncoding.ASCII.GetString(Token) + " ]";
         }
 
         public bool Close
@@ -122,6 +124,12 @@ namespace Apache.NMS.ActiveMQ.Commands
             set { this.rebalanceConnection = value; }
         }
 
+        public byte[] Token
+        {
+            get { return token; }
+            set { this.token = value; }
+        }
+
         ///
         /// <summery>
         ///  Return an answer of true to the isConnectionControl() query.

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/V8/ConnectionControlMarshaller.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/V8/ConnectionControlMarshaller.cs?rev=1142328&r1=1142327&r2=1142328&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/V8/ConnectionControlMarshaller.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/OpenWire/V8/ConnectionControlMarshaller.cs
Sat Jul  2 22:06:26 2011
@@ -69,6 +69,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire.V
             info.ConnectedBrokers = TightUnmarshalString(dataIn, bs);
             info.ReconnectTo = TightUnmarshalString(dataIn, bs);
             info.RebalanceConnection = bs.ReadBoolean();
+            info.Token = ReadBytes(dataIn, bs.ReadBoolean());
         }
 
         //
@@ -87,6 +88,8 @@ namespace Apache.NMS.ActiveMQ.OpenWire.V
             rc += TightMarshalString1(info.ConnectedBrokers, bs);
             rc += TightMarshalString1(info.ReconnectTo, bs);
             bs.WriteBoolean(info.RebalanceConnection);
+            bs.WriteBoolean(info.Token!=null);
+            rc += info.Token==null ? 0 : info.Token.Length+4;
 
             return rc + 0;
         }
@@ -107,6 +110,10 @@ namespace Apache.NMS.ActiveMQ.OpenWire.V
             TightMarshalString2(info.ConnectedBrokers, dataOut, bs);
             TightMarshalString2(info.ReconnectTo, dataOut, bs);
             bs.ReadBoolean();
+            if(bs.ReadBoolean()) {
+                dataOut.Write(info.Token.Length);
+                dataOut.Write(info.Token);
+            }
         }
 
         // 
@@ -125,6 +132,7 @@ namespace Apache.NMS.ActiveMQ.OpenWire.V
             info.ConnectedBrokers = LooseUnmarshalString(dataIn);
             info.ReconnectTo = LooseUnmarshalString(dataIn);
             info.RebalanceConnection = dataIn.ReadBoolean();
+            info.Token = ReadBytes(dataIn, dataIn.ReadBoolean());
         }
 
         // 
@@ -144,6 +152,11 @@ namespace Apache.NMS.ActiveMQ.OpenWire.V
             LooseMarshalString(info.ConnectedBrokers, dataOut);
             LooseMarshalString(info.ReconnectTo, dataOut);
             dataOut.Write(info.RebalanceConnection);
+            dataOut.Write(info.Token!=null);
+            if(info.Token!=null) {
+               dataOut.Write(info.Token.Length);
+               dataOut.Write(info.Token);
+            }
         }
     }
 }



Mime
View raw message