activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r367311 [2/2] - in /incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core: ./ Commands/ IO/
Date Mon, 09 Jan 2006 15:01:23 GMT
Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/CommandMarshallerRegistry.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/CommandMarshallerRegistry.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/CommandMarshallerRegistry.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/CommandMarshallerRegistry.cs
Mon Jan  9 07:00:36 2006
@@ -85,10 +85,6 @@
 						return wireFormatInfoMarshaller.ReadCommand(dataIn);
 						
 
-				case TransactionId.ID_TransactionId:
-						return transactionIdMarshaller.ReadCommand(dataIn);
-						
-
 				case Response.ID_Response:
 						return responseMarshaller.ReadCommand(dataIn);
 						
@@ -109,6 +105,10 @@
 						return activeMQTempTopicMarshaller.ReadCommand(dataIn);
 						
 
+				case DiscoveryEvent.ID_DiscoveryEvent:
+						return discoveryEventMarshaller.ReadCommand(dataIn);
+						
+
 				case ConnectionInfo.ID_ConnectionInfo:
 						return connectionInfoMarshaller.ReadCommand(dataIn);
 						
@@ -117,14 +117,6 @@
 						return keepAliveInfoMarshaller.ReadCommand(dataIn);
 						
 
-				case Message.ID_Message:
-						return messageMarshaller.ReadCommand(dataIn);
-						
-
-				case BaseCommand.ID_BaseCommand:
-						return baseCommandMarshaller.ReadCommand(dataIn);
-						
-
 				case XATransactionId.ID_XATransactionId:
 						return xATransactionIdMarshaller.ReadCommand(dataIn);
 						
@@ -137,10 +129,6 @@
 						return flushCommandMarshaller.ReadCommand(dataIn);
 						
 
-				case ActiveMQTempDestination.ID_ActiveMQTempDestination:
-						return activeMQTempDestinationMarshaller.ReadCommand(dataIn);
-						
-
 				case ConsumerId.ID_ConsumerId:
 						return consumerIdMarshaller.ReadCommand(dataIn);
 						
@@ -225,201 +213,234 @@
 
 				public static void WriteCommand(Command command, BinaryWriter dataOut) 
 				{
-				    int commandID = command.CommandType;
+				    byte commandID = command.GetCommandType();
 						dataOut.Write(commandID);
 						switch (commandID) 
 						{
 
 				case MessageId.ID_MessageId:
-						return messageIdMarshaller.ReadCommand(dataIn);
+						messageIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case BrokerInfo.ID_BrokerInfo:
-						return brokerInfoMarshaller.ReadCommand(dataIn);
+						brokerInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQTempQueue.ID_ActiveMQTempQueue:
-						return activeMQTempQueueMarshaller.ReadCommand(dataIn);
+						activeMQTempQueueMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case LocalTransactionId.ID_LocalTransactionId:
-						return localTransactionIdMarshaller.ReadCommand(dataIn);
+						localTransactionIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo:
-						return removeSubscriptionInfoMarshaller.ReadCommand(dataIn);
+						removeSubscriptionInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case IntegerResponse.ID_IntegerResponse:
-						return integerResponseMarshaller.ReadCommand(dataIn);
+						integerResponseMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQQueue.ID_ActiveMQQueue:
-						return activeMQQueueMarshaller.ReadCommand(dataIn);
+						activeMQQueueMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case DestinationInfo.ID_DestinationInfo:
-						return destinationInfoMarshaller.ReadCommand(dataIn);
+						destinationInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQBytesMessage.ID_ActiveMQBytesMessage:
-						return activeMQBytesMessageMarshaller.ReadCommand(dataIn);
+						activeMQBytesMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ShutdownInfo.ID_ShutdownInfo:
-						return shutdownInfoMarshaller.ReadCommand(dataIn);
+						shutdownInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case DataResponse.ID_DataResponse:
-						return dataResponseMarshaller.ReadCommand(dataIn);
+						dataResponseMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case SessionId.ID_SessionId:
-						return sessionIdMarshaller.ReadCommand(dataIn);
+						sessionIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case DataArrayResponse.ID_DataArrayResponse:
-						return dataArrayResponseMarshaller.ReadCommand(dataIn);
+						dataArrayResponseMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case JournalQueueAck.ID_JournalQueueAck:
-						return journalQueueAckMarshaller.ReadCommand(dataIn);
+						journalQueueAckMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case WireFormatInfo.ID_WireFormatInfo:
-						return wireFormatInfoMarshaller.ReadCommand(dataIn);
-						
-
-				case TransactionId.ID_TransactionId:
-						return transactionIdMarshaller.ReadCommand(dataIn);
+						wireFormatInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case Response.ID_Response:
-						return responseMarshaller.ReadCommand(dataIn);
+						responseMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQObjectMessage.ID_ActiveMQObjectMessage:
-						return activeMQObjectMessageMarshaller.ReadCommand(dataIn);
+						activeMQObjectMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ConsumerInfo.ID_ConsumerInfo:
-						return consumerInfoMarshaller.ReadCommand(dataIn);
+						consumerInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ConnectionId.ID_ConnectionId:
-						return connectionIdMarshaller.ReadCommand(dataIn);
+						connectionIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQTempTopic.ID_ActiveMQTempTopic:
-						return activeMQTempTopicMarshaller.ReadCommand(dataIn);
+						activeMQTempTopicMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
-				case ConnectionInfo.ID_ConnectionInfo:
-						return connectionInfoMarshaller.ReadCommand(dataIn);
-						
-
-				case KeepAliveInfo.ID_KeepAliveInfo:
-						return keepAliveInfoMarshaller.ReadCommand(dataIn);
+				case DiscoveryEvent.ID_DiscoveryEvent:
+						discoveryEventMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
-				case Message.ID_Message:
-						return messageMarshaller.ReadCommand(dataIn);
+				case ConnectionInfo.ID_ConnectionInfo:
+						connectionInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
-				case BaseCommand.ID_BaseCommand:
-						return baseCommandMarshaller.ReadCommand(dataIn);
+				case KeepAliveInfo.ID_KeepAliveInfo:
+						keepAliveInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case XATransactionId.ID_XATransactionId:
-						return xATransactionIdMarshaller.ReadCommand(dataIn);
+						xATransactionIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case JournalTrace.ID_JournalTrace:
-						return journalTraceMarshaller.ReadCommand(dataIn);
+						journalTraceMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case FlushCommand.ID_FlushCommand:
-						return flushCommandMarshaller.ReadCommand(dataIn);
-						
-
-				case ActiveMQTempDestination.ID_ActiveMQTempDestination:
-						return activeMQTempDestinationMarshaller.ReadCommand(dataIn);
+						flushCommandMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ConsumerId.ID_ConsumerId:
-						return consumerIdMarshaller.ReadCommand(dataIn);
+						consumerIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case JournalTopicAck.ID_JournalTopicAck:
-						return journalTopicAckMarshaller.ReadCommand(dataIn);
+						journalTopicAckMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQTextMessage.ID_ActiveMQTextMessage:
-						return activeMQTextMessageMarshaller.ReadCommand(dataIn);
+						activeMQTextMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case BrokerId.ID_BrokerId:
-						return brokerIdMarshaller.ReadCommand(dataIn);
+						brokerIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case MessageDispatch.ID_MessageDispatch:
-						return messageDispatchMarshaller.ReadCommand(dataIn);
+						messageDispatchMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ProducerInfo.ID_ProducerInfo:
-						return producerInfoMarshaller.ReadCommand(dataIn);
+						producerInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case SubscriptionInfo.ID_SubscriptionInfo:
-						return subscriptionInfoMarshaller.ReadCommand(dataIn);
+						subscriptionInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQMapMessage.ID_ActiveMQMapMessage:
-						return activeMQMapMessageMarshaller.ReadCommand(dataIn);
+						activeMQMapMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case SessionInfo.ID_SessionInfo:
-						return sessionInfoMarshaller.ReadCommand(dataIn);
+						sessionInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQMessage.ID_ActiveMQMessage:
-						return activeMQMessageMarshaller.ReadCommand(dataIn);
+						activeMQMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case TransactionInfo.ID_TransactionInfo:
-						return transactionInfoMarshaller.ReadCommand(dataIn);
+						transactionInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQStreamMessage.ID_ActiveMQStreamMessage:
-						return activeMQStreamMessageMarshaller.ReadCommand(dataIn);
+						activeMQStreamMessageMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case MessageAck.ID_MessageAck:
-						return messageAckMarshaller.ReadCommand(dataIn);
+						messageAckMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ProducerId.ID_ProducerId:
-						return producerIdMarshaller.ReadCommand(dataIn);
+						producerIdMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ActiveMQTopic.ID_ActiveMQTopic:
-						return activeMQTopicMarshaller.ReadCommand(dataIn);
+						activeMQTopicMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case JournalTransaction.ID_JournalTransaction:
-						return journalTransactionMarshaller.ReadCommand(dataIn);
+						journalTransactionMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case RemoveInfo.ID_RemoveInfo:
-						return removeInfoMarshaller.ReadCommand(dataIn);
+						removeInfoMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ControlCommand.ID_ControlCommand:
-						return controlCommandMarshaller.ReadCommand(dataIn);
+						controlCommandMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 
 				case ExceptionResponse.ID_ExceptionResponse:
-						return exceptionResponseMarshaller.ReadCommand(dataIn);
+						exceptionResponseMarshaller.WriteCommand(command, dataOut);
+						break;
 						
 						
 								default:
@@ -611,18 +632,6 @@
 
 
 	            
-	      private static TransactionIdMarshaller transactionIdMarshaller = new TransactionIdMarshaller();
-	      
-        public static TransactionIdMarshaller TransactionIdMarshaller
-        {
-            get
-            {
-                return transactionIdMarshaller;
-            }
-        }
-
-
-	            
 	      private static ResponseMarshaller responseMarshaller = new ResponseMarshaller();
 	      
         public static ResponseMarshaller ResponseMarshaller
@@ -683,49 +692,37 @@
 
 
 	            
-	      private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller();
-	      
-        public static ConnectionInfoMarshaller ConnectionInfoMarshaller
-        {
-            get
-            {
-                return connectionInfoMarshaller;
-            }
-        }
-
-
-	            
-	      private static KeepAliveInfoMarshaller keepAliveInfoMarshaller = new KeepAliveInfoMarshaller();
+	      private static DiscoveryEventMarshaller discoveryEventMarshaller = new DiscoveryEventMarshaller();
 	      
-        public static KeepAliveInfoMarshaller KeepAliveInfoMarshaller
+        public static DiscoveryEventMarshaller DiscoveryEventMarshaller
         {
             get
             {
-                return keepAliveInfoMarshaller;
+                return discoveryEventMarshaller;
             }
         }
 
 
 	            
-	      private static MessageMarshaller messageMarshaller = new MessageMarshaller();
+	      private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller();
 	      
-        public static MessageMarshaller MessageMarshaller
+        public static ConnectionInfoMarshaller ConnectionInfoMarshaller
         {
             get
             {
-                return messageMarshaller;
+                return connectionInfoMarshaller;
             }
         }
 
 
 	            
-	      private static BaseCommandMarshaller baseCommandMarshaller = new BaseCommandMarshaller();
+	      private static KeepAliveInfoMarshaller keepAliveInfoMarshaller = new KeepAliveInfoMarshaller();
 	      
-        public static BaseCommandMarshaller BaseCommandMarshaller
+        public static KeepAliveInfoMarshaller KeepAliveInfoMarshaller
         {
             get
             {
-                return baseCommandMarshaller;
+                return keepAliveInfoMarshaller;
             }
         }
 
@@ -762,18 +759,6 @@
             get
             {
                 return flushCommandMarshaller;
-            }
-        }
-
-
-	            
-	      private static ActiveMQTempDestinationMarshaller activeMQTempDestinationMarshaller
= new ActiveMQTempDestinationMarshaller();
-	      
-        public static ActiveMQTempDestinationMarshaller ActiveMQTempDestinationMarshaller
-        {
-            get
-            {
-                return activeMQTempDestinationMarshaller;
             }
         }
 

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/DataResponseMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/DataResponseMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/DataResponseMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/DataResponseMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -29,7 +29,7 @@
             base.BuildCommand(command, dataIn);
 
             DataResponse info = (DataResponse) command;
-            info.Data = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
+            info.Data = CommandMarshallerRegistry.ReadCommand(dataIn);
 
         }
 
@@ -37,7 +37,7 @@
             base.WriteCommand(command, dataOut);
 
             DataResponse info = (DataResponse) command;
-            CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.Data, dataOut);
+            CommandMarshallerRegistry.WriteCommand((Command) info.Data, dataOut);
 
         }
     }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/ExceptionResponseMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/ExceptionResponseMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/ExceptionResponseMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/ExceptionResponseMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -29,7 +29,7 @@
             base.BuildCommand(command, dataIn);
 
             ExceptionResponse info = (ExceptionResponse) command;
-            info.Exception = (Throwable) CommandMarshallerRegistry.ThrowableMarshaller.ReadCommand(dataIn);
+            info.Exception = ReadBytes(dataIn);
 
         }
 
@@ -37,7 +37,7 @@
             base.WriteCommand(command, dataOut);
 
             ExceptionResponse info = (ExceptionResponse) command;
-            CommandMarshallerRegistry.ThrowableMarshaller.WriteCommand(info.Exception, dataOut);
+            WriteBytes(info.Exception, dataOut);
 
         }
     }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTopicAckMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTopicAckMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTopicAckMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTopicAckMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -34,7 +34,7 @@
             info.MessageSequenceId = dataIn.ReadInt64();
             info.SubscritionName = dataIn.ReadString();
             info.ClientId = dataIn.ReadString();
-            info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
 
         }
 
@@ -47,7 +47,7 @@
             dataOut.Write(info.MessageSequenceId);
             dataOut.Write(info.SubscritionName);
             dataOut.Write(info.ClientId);
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
 
         }
     }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTransactionMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTransactionMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTransactionMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/JournalTransactionMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -29,7 +29,7 @@
             base.BuildCommand(command, dataIn);
 
             JournalTransaction info = (JournalTransaction) command;
-            info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.Type = dataIn.ReadByte();
             info.WasPrepared = dataIn.ReadBoolean();
 
@@ -39,7 +39,7 @@
             base.WriteCommand(command, dataOut);
 
             JournalTransaction info = (JournalTransaction) command;
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
             dataOut.Write(info.Type);
             dataOut.Write(info.WasPrepared);
 

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageAckMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageAckMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageAckMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageAckMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -30,7 +30,7 @@
 
             MessageAck info = (MessageAck) command;
             info.Destination = ReadDestination(dataIn);
-            info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
             info.AckType = dataIn.ReadByte();
             info.FirstMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
@@ -44,7 +44,7 @@
 
             MessageAck info = (MessageAck) command;
             WriteDestination(info.Destination, dataOut);
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
             CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId,
dataOut);
             dataOut.Write(info.AckType);
             CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId,
dataOut);

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageDispatchMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageDispatchMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageDispatchMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageDispatchMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -31,7 +31,7 @@
             MessageDispatch info = (MessageDispatch) command;
             info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
             info.Destination = ReadDestination(dataIn);
-            info.Message = (Message) CommandMarshallerRegistry.MessageMarshaller.ReadCommand(dataIn);
+            info.Message = (Message) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.RedeliveryCounter = dataIn.ReadInt32();
 
         }
@@ -42,7 +42,7 @@
             MessageDispatch info = (MessageDispatch) command;
             CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId,
dataOut);
             WriteDestination(info.Destination, dataOut);
-            CommandMarshallerRegistry.MessageMarshaller.WriteCommand(info.Message, dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.Message, dataOut);
             dataOut.Write(info.RedeliveryCounter);
 
         }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageMarshaller.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/MessageMarshaller.cs Mon
Jan  9 07:00:36 2006
@@ -17,24 +17,20 @@
 
 namespace OpenWire.Core.IO
 {
-    public class MessageMarshaller : AbstractCommandMarshaller
+    public abstract class MessageMarshaller : AbstractCommandMarshaller
     {
 
 
-        public override Command CreateCommand() {
-            return new Message();
-        }
-
         public override void BuildCommand(Command command, BinaryReader dataIn) {
             base.BuildCommand(command, dataIn);
 
             Message info = (Message) command;
             info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
             info.Destination = ReadDestination(dataIn);
-            info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.OriginalDestination = ReadDestination(dataIn);
             info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
-            info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.GroupID = dataIn.ReadString();
             info.GroupSequence = dataIn.ReadInt32();
             info.CorrelationId = dataIn.ReadString();
@@ -44,9 +40,9 @@
             info.ReplyTo = ReadDestination(dataIn);
             info.Timestamp = dataIn.ReadInt64();
             info.Type = dataIn.ReadString();
-            info.Content = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
-            info.MarshalledProperties = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
-            info.DataStructure = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
+            info.Content = ReadBytes(dataIn);
+            info.MarshalledProperties = ReadBytes(dataIn);
+            info.DataStructure = CommandMarshallerRegistry.ReadCommand(dataIn);
             info.TargetConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
             info.Compressed = dataIn.ReadBoolean();
             info.RedeliveryCounter = dataIn.ReadInt32();
@@ -63,10 +59,10 @@
             Message info = (Message) command;
             CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId,
dataOut);
             WriteDestination(info.Destination, dataOut);
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
             WriteDestination(info.OriginalDestination, dataOut);
             CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut);
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.OriginalTransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.OriginalTransactionId, dataOut);
             dataOut.Write(info.GroupID);
             dataOut.Write(info.GroupSequence);
             dataOut.Write(info.CorrelationId);
@@ -76,9 +72,9 @@
             WriteDestination(info.ReplyTo, dataOut);
             dataOut.Write(info.Timestamp);
             dataOut.Write(info.Type);
-            CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.Content, dataOut);
-            CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.MarshalledProperties,
dataOut);
-            CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.DataStructure,
dataOut);
+            WriteBytes(info.Content, dataOut);
+            WriteBytes(info.MarshalledProperties, dataOut);
+            CommandMarshallerRegistry.WriteCommand((Command) info.DataStructure, dataOut);
             CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.TargetConsumerId,
dataOut);
             dataOut.Write(info.Compressed);
             dataOut.Write(info.RedeliveryCounter);

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/RemoveInfoMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/RemoveInfoMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/RemoveInfoMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/RemoveInfoMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -29,7 +29,7 @@
             base.BuildCommand(command, dataIn);
 
             RemoveInfo info = (RemoveInfo) command;
-            info.ObjectId = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
+            info.ObjectId = CommandMarshallerRegistry.ReadCommand(dataIn);
 
         }
 
@@ -37,7 +37,7 @@
             base.WriteCommand(command, dataOut);
 
             RemoveInfo info = (RemoveInfo) command;
-            CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.ObjectId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand((Command) info.ObjectId, dataOut);
 
         }
     }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionIdMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionIdMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionIdMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionIdMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -17,13 +17,9 @@
 
 namespace OpenWire.Core.IO
 {
-    public class TransactionIdMarshaller : AbstractCommandMarshaller
+    public abstract class TransactionIdMarshaller : AbstractCommandMarshaller
     {
 
-
-        public override Command CreateCommand() {
-            return new TransactionId();
-        }
 
         public override void BuildCommand(Command command, BinaryReader dataIn) {
             base.BuildCommand(command, dataIn);

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionInfoMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionInfoMarshaller.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionInfoMarshaller.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/IO/TransactionInfoMarshaller.cs
Mon Jan  9 07:00:36 2006
@@ -30,7 +30,7 @@
 
             TransactionInfo info = (TransactionInfo) command;
             info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
-            info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
+            info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
             info.Type = dataIn.ReadByte();
 
         }
@@ -40,7 +40,7 @@
 
             TransactionInfo info = (TransactionInfo) command;
             CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId,
dataOut);
-            CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId,
dataOut);
+            CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
             dataOut.Write(info.Type);
 
         }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Queue.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Queue.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Queue.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Queue.cs Mon Jan  9 07:00:36
2006
@@ -6,20 +6,11 @@
 	/// <summary>
 	/// Summary description for Queue.
 	/// </summary>
-	public class Queue : Destination {
-		public Queue() : base(){}
-		public Queue(String name) : base(name){}
-		
-		public String GetQueueName() {
-			return base.GetPhysicalName();
-		}
-		
-		public override int GetDestinationType() {
-			return ACTIVEMQ_QUEUE;
-		}
+	public interface Queue : Destination {
 
-		public override ActiveMQDestination CreateDestination(String name) {
-			return new ActiveMQQueue(name);
+		String QueueName
+		{
+			get;
 		}
 	}
 }

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/TemporaryTopic.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/TemporaryTopic.cs?rev=367311&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/TemporaryTopic.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/TemporaryTopic.cs Mon Jan 
9 07:00:36 2006
@@ -0,0 +1,12 @@
+using System;
+using OpenWire.Core.Commands;
+
+namespace OpenWire.Core
+{
+	/// <summary>
+	/// Summary description for TemporaryTopic.
+	/// </summary>
+	public interface TemporaryTopic : Destination 
+	{
+	}
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/TemporaryTopic.cs
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Topic.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Topic.cs?rev=367311&r1=367310&r2=367311&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Topic.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Core/Topic.cs Mon Jan  9 07:00:36
2006
@@ -6,25 +6,12 @@
 	/// <summary>
 	/// Summary description for Topic.
 	/// </summary>
-	public class Topic : Destination 
+	public interface Topic : Destination 
 	{
-		public Topic(): base()	{}
-		public Topic(String name):base(name){}
-		
-		public String GetTopicName() 
-		{
-			return super.GetPhysicalName();
-		}
-		public override int GetDestinationType() 
-		{
-			return ACTIVEMQ_TOPIC;
-		}
-
 
-		public override ActiveMQDestination CreateDestination(String name) 
+		String TopicName
 		{
-			return new ActiveMQTopic(name);
+			get;
 		}
-
 	}
 }



Mime
View raw message