activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r887985 - /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Date Mon, 07 Dec 2009 16:27:43 GMT
Author: tabish
Date: Mon Dec  7 16:27:42 2009
New Revision: 887985

URL: http://svn.apache.org/viewvc?rev=887985&view=rev
Log:
* StompWireFormat.cs: 

Update the code to reflect the new Command names and feilds.

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=887985&r1=887984&r2=887985&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Mon Dec  7 16:27:42 2009
@@ -55,9 +55,9 @@
             {
                 WriteConnectionInfo((ConnectionInfo) o, ds);
             }
-            else if (o is ActiveMQMessage)
+            else if (o is Message)
             {
-                WriteMessage((ActiveMQMessage) o, ds);
+                WriteMessage((Message) o, ds);
             }
             else if (o is ConsumerInfo)
             {
@@ -241,15 +241,15 @@
 
         protected virtual Command ReadMessage(string command, IDictionary headers, byte[]
content)
         {
-            ActiveMQMessage message = null;
+            Message message = null;
             if (headers.Contains("content-length"))
             {
-                message = new ActiveMQBytesMessage();
+                message = new BytesMessage();
                 message.Content = content;
             }
             else
             {
-                message = new ActiveMQTextMessage(encoding.GetString(content, 0, content.Length));
+                message = new TextMessage(encoding.GetString(content, 0, content.Length));
             }
 
             // TODO now lets set the various headers
@@ -421,13 +421,13 @@
         protected virtual void WriteTransactionInfo(TransactionInfo command, StompFrameStream
ss)
         {
             TransactionId id = command.TransactionId;
-            if (id is LocalTransactionId)
+            if (id is TransactionId)
             {
                 string type = "BEGIN";
                 TransactionType transactionType = (TransactionType) command.Type;
                 switch (transactionType)
                 {
-                    case TransactionType.CommitOnePhase:
+                    case TransactionType.Commit:
                         command.ResponseRequired = true;
                         type = "COMMIT";
                         break;
@@ -468,7 +468,7 @@
             command.BeforeMarshall(null);
             if (command is TextMessage)
             {
-                ActiveMQTextMessage textMessage = command as ActiveMQTextMessage;
+                TextMessage textMessage = command as TextMessage;
                 ss.Content = encoding.GetBytes(textMessage.Text);
             }
             else



Mime
View raw message