From 3d3c4679fdc43b31da1f72b4d2fb12262d867530 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 22 Feb 2006 17:45:12 +0000 Subject: [PATCH] latest code generated code for C# which just about compiles now git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@379827 13f79535-47bb-0310-9956-ffa450edef68 --- .../Commands/ActiveMQBytesMessage.cs | 2 +- .../Commands/ActiveMQMapMessage.cs | 2 +- .../Commands/ActiveMQMessage.cs | 39 +- .../Commands/ActiveMQObjectMessage.cs | 30 +- .../Commands/ActiveMQStreamMessage.cs | 2 +- .../Commands/ActiveMQTempDestination.cs | 53 + .../Commands/ActiveMQTextMessage.cs | 2 +- .../OpenWire.Client/Commands/BaseCommand.cs | 6 +- .../src/OpenWire.Client/Commands/BrokerId.cs | 37 +- .../OpenWire.Client/Commands/BrokerInfo.cs | 44 +- .../Commands/ConnectionError.cs | 37 +- .../OpenWire.Client/Commands/ConnectionId.cs | 37 +- .../Commands/ConnectionInfo.cs | 37 +- .../OpenWire.Client/Commands/ConsumerId.cs | 37 +- .../OpenWire.Client/Commands/ConsumerInfo.cs | 37 +- .../Commands/ControlCommand.cs | 37 +- .../Commands/DataArrayResponse.cs | 37 +- .../OpenWire.Client/Commands/DataResponse.cs | 37 +- .../Commands/DestinationInfo.cs | 37 +- .../Commands/DiscoveryEvent.cs | 37 +- .../Commands/ExceptionResponse.cs | 37 +- .../OpenWire.Client/Commands/FlushCommand.cs | 37 +- .../Commands/IntegerResponse.cs | 37 +- .../Commands/JournalQueueAck.cs | 39 +- .../Commands/JournalTopicAck.cs | 39 +- .../OpenWire.Client/Commands/JournalTrace.cs | 39 +- .../Commands/JournalTransaction.cs | 39 +- .../OpenWire.Client/Commands/KeepAliveInfo.cs | 39 +- .../Commands/LocalTransactionId.cs | 37 +- .../src/OpenWire.Client/Commands/Message.cs | 37 +- .../OpenWire.Client/Commands/MessageAck.cs | 37 +- .../Commands/MessageDispatch.cs | 37 +- .../Commands/MessageDispatchNotification.cs | 81 ++ .../src/OpenWire.Client/Commands/MessageId.cs | 37 +- .../OpenWire.Client/Commands/ProducerId.cs | 37 +- .../OpenWire.Client/Commands/ProducerInfo.cs | 37 +- .../OpenWire.Client/Commands/RemoveInfo.cs | 37 +- .../Commands/RemoveSubscriptionInfo.cs | 37 +- .../src/OpenWire.Client/Commands/Response.cs | 37 +- .../src/OpenWire.Client/Commands/SessionId.cs | 37 +- .../OpenWire.Client/Commands/SessionInfo.cs | 37 +- .../OpenWire.Client/Commands/ShutdownInfo.cs | 37 +- .../Commands/SubscriptionInfo.cs | 37 +- .../OpenWire.Client/Commands/TransactionId.cs | 37 +- .../Commands/TransactionInfo.cs | 37 +- .../Commands/WireFormatInfo.cs | 37 +- .../Commands/XATransactionId.cs | 37 +- .../OpenWire.Client/Core/AbstractCommand.cs | 12 +- .../Core/AbstractCommandMarshaller.cs | 117 -- .../src/OpenWire.Client/Core/BooleanStream.cs | 93 ++ .../src/OpenWire.Client/Core/BrokerError.cs | 6 + .../Core/DataStreamMarshaller.cs | 401 +++++++ .../src/OpenWire.Client/Core/DataStructure.cs | 5 +- .../Core/DataStructureSupport.cs | 23 + .../src/OpenWire.Client/Core/MarshallAware.cs | 23 + .../OpenWire.Client/Core/OpenWireFormat.cs | 133 +++ .../OpenWire.Client/Core/SocketTransport.cs | 5 +- .../IO/ActiveMQBytesMessageMarshaller.cs | 83 +- .../IO/ActiveMQDestinationMarshaller.cs | 77 +- .../IO/ActiveMQMapMessageMarshaller.cs | 83 +- .../IO/ActiveMQMessageMarshaller.cs | 96 +- .../IO/ActiveMQObjectMessageMarshaller.cs | 83 +- .../IO/ActiveMQQueueMarshaller.cs | 83 +- .../IO/ActiveMQStreamMessageMarshaller.cs | 83 +- .../IO/ActiveMQTempDestinationMarshaller.cs | 66 +- .../IO/ActiveMQTempQueueMarshaller.cs | 83 +- .../IO/ActiveMQTempTopicMarshaller.cs | 83 +- .../IO/ActiveMQTextMessageMarshaller.cs | 83 +- .../IO/ActiveMQTopicMarshaller.cs | 83 +- .../IO/BaseCommandMarshaller.cs | 81 +- .../OpenWire.Client/IO/BrokerIdMarshaller.cs | 96 +- .../IO/BrokerInfoMarshaller.cs | 125 +- .../IO/CommandMarshallerRegistry.cs | 1018 ----------------- .../IO/ConnectionErrorMarshaller.cs | 101 +- .../IO/ConnectionIdMarshaller.cs | 96 +- .../IO/ConnectionInfoMarshaller.cs | 127 +- .../IO/ConsumerIdMarshaller.cs | 106 +- .../IO/ConsumerInfoMarshaller.cs | 165 ++- .../IO/ControlCommandMarshaller.cs | 96 +- .../IO/DataArrayResponseMarshaller.cs | 107 +- .../IO/DataResponseMarshaller.cs | 96 +- .../IO/DestinationInfoMarshaller.cs | 126 +- .../IO/DiscoveryEventMarshaller.cs | 101 +- .../IO/ExceptionResponseMarshaller.cs | 96 +- .../IO/FlushCommandMarshaller.cs | 83 +- .../IO/IntegerResponseMarshaller.cs | 95 +- .../IO/JournalQueueAckMarshaller.cs | 101 +- .../IO/JournalTopicAckMarshaller.cs | 121 +- .../IO/JournalTraceMarshaller.cs | 96 +- .../IO/JournalTransactionMarshaller.cs | 105 +- .../IO/KeepAliveInfoMarshaller.cs | 83 +- .../IO/LocalTransactionIdMarshaller.cs | 101 +- .../OpenWire.Client/IO/MarshallerFactory.cs | 91 ++ .../IO/MessageAckMarshaller.cs | 124 +- .../IO/MessageDispatchMarshaller.cs | 110 +- .../MessageDispatchNotificationMarshaller.cs | 96 ++ .../OpenWire.Client/IO/MessageIdMarshaller.cs | 106 +- .../OpenWire.Client/IO/MessageMarshaller.cs | 209 ++-- .../IO/ProducerIdMarshaller.cs | 106 +- .../IO/ProducerInfoMarshaller.cs | 117 +- .../IO/RemoveInfoMarshaller.cs | 96 +- .../IO/RemoveSubscriptionInfoMarshaller.cs | 106 +- .../OpenWire.Client/IO/ResponseMarshaller.cs | 95 +- .../OpenWire.Client/IO/SessionIdMarshaller.cs | 101 +- .../IO/SessionInfoMarshaller.cs | 96 +- .../IO/ShutdownInfoMarshaller.cs | 83 +- .../IO/SubscriptionInfoMarshaller.cs | 111 +- .../IO/TransactionIdMarshaller.cs | 66 +- .../IO/TransactionInfoMarshaller.cs | 105 +- .../IO/WireFormatInfoMarshaller.cs | 103 +- .../IO/XATransactionIdMarshaller.cs | 113 +- 111 files changed, 5780 insertions(+), 3020 deletions(-) create mode 100644 openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTempDestination.cs create mode 100644 openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatchNotification.cs delete mode 100755 openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs create mode 100755 openwire-dotnet/src/OpenWire.Client/Core/BooleanStream.cs create mode 100755 openwire-dotnet/src/OpenWire.Client/Core/DataStreamMarshaller.cs create mode 100755 openwire-dotnet/src/OpenWire.Client/Core/DataStructureSupport.cs create mode 100644 openwire-dotnet/src/OpenWire.Client/Core/MarshallAware.cs create mode 100755 openwire-dotnet/src/OpenWire.Client/Core/OpenWireFormat.cs delete mode 100644 openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs create mode 100644 openwire-dotnet/src/OpenWire.Client/IO/MarshallerFactory.cs create mode 100644 openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchNotificationMarshaller.cs diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs index 5c0e3d82ee..971449abcf 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs @@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ActiveMQBytesMessage; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs index d2bba4bbec..ebbf3d55fa 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs @@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ActiveMQMapMessage; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs index 9ea3427811..5d583dc44e 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs @@ -5,7 +5,7 @@ using OpenWire.Client; using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class ActiveMQMessage : Message, IMessage { + public class ActiveMQMessage : Message, IMessage, MarshallAware { public const byte ID_ActiveMQMessage = 23; public static ActiveMQMessage Transform(IMessage message) { @@ -16,20 +16,37 @@ namespace OpenWire.Client.Commands { // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { - return ID_ActiveMQMessage; + public override byte GetDataStructureType() { + return ID_ActiveMQMessage; } - + + public override bool IsMarshallAware() { + return true; + } + // Properties public IDestination FromDestination { - get { - return Destination; - } - set { - this.Destination = ActiveMQDestination.Transform(value); - } + get { return Destination; } + set { this.Destination = ActiveMQDestination.Transform(value); } } - } + public void BeforeMarshall(OpenWireFormat wireFormat) { + } + + public void AfterMarshall(OpenWireFormat wireFormat) { + } + + public void BeforeUnmarshall(OpenWireFormat wireFormat) { + } + public void AfterUnmarshall(OpenWireFormat wireFormat) { + } + + public void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data) { + } + + public byte[] GetMarshalledForm(OpenWireFormat wireFormat) { + return null; + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs index 33ac913a8d..758e8288d1 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs @@ -1,3 +1,20 @@ +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + using System; using System.Collections; @@ -6,19 +23,26 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ActiveMQObjectMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ActiveMQObjectMessage : ActiveMQMessage { - public const byte ID_ActiveMQObjectMessage = 26; + public const byte ID_ActiveMQObjectMessage = 26; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ActiveMQObjectMessage; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs index 0b92c2968f..a03cd4fdd5 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs @@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ActiveMQStreamMessage; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTempDestination.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTempDestination.cs new file mode 100644 index 0000000000..79df7362fa --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTempDestination.cs @@ -0,0 +1,53 @@ +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + // + // Marshalling code for Open Wire Format for ActiveMQTempDestination + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class ActiveMQTempDestination : ActiveMQDestination + { + public const byte ID_ActiveMQTempDestination = 0; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetDataStructureType() { + return ID_ActiveMQTempDestination; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs index b4d55c8973..8f3551b207 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs @@ -22,7 +22,7 @@ namespace OpenWire.Client.Commands { // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ActiveMQTextMessage; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs index b78720bc96..8a1a19d489 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs @@ -29,21 +29,21 @@ namespace OpenWire.Client.Commands { public override bool Equals(Object that) { if (that is BaseCommand) { BaseCommand thatCommand = (BaseCommand) that; - return this.GetCommandType() == thatCommand.GetCommandType() + return this.GetDataStructureType() == thatCommand.GetDataStructureType() && this.CommandId == thatCommand.CommandId; } return false; } public override String ToString() { - string answer = GetCommandTypeAsString(GetCommandType()); + string answer = GetDataStructureTypeAsString(GetDataStructureType()); if (answer.Length == 0) { answer = base.ToString(); } return answer + ": id = " + CommandId; } - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_BaseCommand; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs index 6ac1079d1d..a906372518 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for BrokerId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for BrokerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class BrokerId : AbstractCommand { - public const byte ID_BrokerId = 124; + public const byte ID_BrokerId = 124; string value; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_BrokerId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs index 2663100538..80b818f0ce 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for BrokerInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,15 +23,23 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for BrokerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class BrokerInfo : BaseCommand { - public const byte ID_BrokerInfo = 2; + public const byte ID_BrokerInfo = 2; BrokerId brokerId; string brokerURL; BrokerInfo[] peerBrokerInfos; string brokerName; - + bool slaveBroker; // TODO generate Equals method @@ -31,7 +47,7 @@ namespace OpenWire.Client.Commands // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_BrokerInfo; } @@ -62,5 +78,11 @@ namespace OpenWire.Client.Commands set { this.brokerName = value; } } + public bool SlaveBroker + { + get { return slaveBroker; } + set { this.slaveBroker = value; } + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs index b1a35c9462..7d97221fb7 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ConnectionError -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,21 +23,28 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ConnectionError + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ConnectionError : BaseCommand { - public const byte ID_ConnectionError = 16; + public const byte ID_ConnectionError = 16; BrokerError exception; ConnectionId connectionId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ConnectionError; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs index 76ee8bd4c3..bdad0257a8 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ConnectionId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ConnectionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ConnectionId : AbstractCommand { - public const byte ID_ConnectionId = 120; + public const byte ID_ConnectionId = 120; string value; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ConnectionId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs index 572e31edae..9bc1affee1 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ConnectionInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ConnectionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ConnectionInfo : BaseCommand { - public const byte ID_ConnectionInfo = 3; + public const byte ID_ConnectionInfo = 3; ConnectionId connectionId; string clientId; @@ -26,13 +42,12 @@ namespace OpenWire.Client.Commands BrokerId[] brokerPath; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ConnectionInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs index 968d6b681a..7f904dc363 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ConsumerId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ConsumerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ConsumerId : AbstractCommand { - public const byte ID_ConsumerId = 122; + public const byte ID_ConsumerId = 122; string connectionId; long sessionId; long value; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ConsumerId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs index 9728eebc0c..e6556a6c7c 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ConsumerInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ConsumerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ConsumerInfo : BaseCommand { - public const byte ID_ConsumerInfo = 5; + public const byte ID_ConsumerInfo = 5; ConsumerId consumerId; bool browser; @@ -34,13 +50,12 @@ namespace OpenWire.Client.Commands bool networkSubscription; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ConsumerInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs index 965bc68fb3..c5b5e4b76d 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ControlCommand -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ControlCommand + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ControlCommand : BaseCommand { - public const byte ID_ControlCommand = 14; + public const byte ID_ControlCommand = 14; string command; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ControlCommand; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs index d7e73ca183..c6b449f771 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for DataArrayResponse -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for DataArrayResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class DataArrayResponse : Response { - public const byte ID_DataArrayResponse = 33; + public const byte ID_DataArrayResponse = 33; DataStructure[] data; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_DataArrayResponse; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs index a14e334b0f..0ffc12e547 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for DataResponse -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for DataResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class DataResponse : Response { - public const byte ID_DataResponse = 32; + public const byte ID_DataResponse = 32; DataStructure data; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_DataResponse; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs index 1a060666e6..cdadfa3458 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for DestinationInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for DestinationInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class DestinationInfo : BaseCommand { - public const byte ID_DestinationInfo = 8; + public const byte ID_DestinationInfo = 8; ConnectionId connectionId; ActiveMQDestination destination; @@ -26,13 +42,12 @@ namespace OpenWire.Client.Commands BrokerId[] brokerPath; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_DestinationInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs index 94e4722697..84a30adf90 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for DiscoveryEvent -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,21 +23,28 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for DiscoveryEvent + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class DiscoveryEvent : AbstractCommand { - public const byte ID_DiscoveryEvent = 40; + public const byte ID_DiscoveryEvent = 40; string serviceName; string brokerName; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_DiscoveryEvent; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs index 91b78d7492..7353df8827 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ExceptionResponse -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ExceptionResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ExceptionResponse : Response { - public const byte ID_ExceptionResponse = 31; + public const byte ID_ExceptionResponse = 31; BrokerError exception; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ExceptionResponse; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs index caf832bb83..e657573460 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for FlushCommand -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,19 +23,26 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for FlushCommand + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class FlushCommand : BaseCommand { - public const byte ID_FlushCommand = 15; + public const byte ID_FlushCommand = 15; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_FlushCommand; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs index 217e0cc563..14eb2731fa 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for IntegerResponse -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for IntegerResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class IntegerResponse : Response { - public const byte ID_IntegerResponse = 34; + public const byte ID_IntegerResponse = 34; int result; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_IntegerResponse; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs index 1b37ea41ff..76b58c33b9 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for JournalQueueAck -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,21 +23,28 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class JournalQueueAck : AbstractCommand + // + // Marshalling code for Open Wire Format for JournalQueueAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalQueueAck : DataStructureSupport { - public const byte ID_JournalQueueAck = 52; + public const byte ID_JournalQueueAck = 52; ActiveMQDestination destination; MessageAck messageAck; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_JournalQueueAck; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs index 38f78b9391..2d0db2a97d 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for JournalTopicAck -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class JournalTopicAck : AbstractCommand + // + // Marshalling code for Open Wire Format for JournalTopicAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTopicAck : DataStructureSupport { - public const byte ID_JournalTopicAck = 50; + public const byte ID_JournalTopicAck = 50; ActiveMQDestination destination; MessageId messageId; @@ -27,13 +43,12 @@ namespace OpenWire.Client.Commands TransactionId transactionId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_JournalTopicAck; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs index b78edd5544..9ee52a4bd6 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for JournalTrace -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class JournalTrace : AbstractCommand + // + // Marshalling code for Open Wire Format for JournalTrace + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTrace : DataStructureSupport { - public const byte ID_JournalTrace = 53; + public const byte ID_JournalTrace = 53; string message; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_JournalTrace; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs index 44c257a11a..8402602ba5 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for JournalTransaction -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class JournalTransaction : AbstractCommand + // + // Marshalling code for Open Wire Format for JournalTransaction + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTransaction : DataStructureSupport { - public const byte ID_JournalTransaction = 54; + public const byte ID_JournalTransaction = 54; TransactionId transactionId; byte type; bool wasPrepared; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_JournalTransaction; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs index 77d00d772b..7043334779 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for KeepAliveInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,19 +23,26 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { - public class KeepAliveInfo : AbstractCommand + // + // Marshalling code for Open Wire Format for KeepAliveInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class KeepAliveInfo : DataStructureSupport { - public const byte ID_KeepAliveInfo = 10; + public const byte ID_KeepAliveInfo = 10; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_KeepAliveInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs index e8f835c961..f8b64100d2 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for LocalTransactionId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,21 +23,28 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for LocalTransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class LocalTransactionId : TransactionId { - public const byte ID_LocalTransactionId = 111; + public const byte ID_LocalTransactionId = 111; long value; ConnectionId connectionId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_LocalTransactionId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs b/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs index b4fb5fd544..694de7d6d4 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for Message -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for Message + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class Message : BaseCommand { - public const byte ID_Message = 0; + public const byte ID_Message = 0; ProducerId producerId; ActiveMQDestination destination; @@ -46,13 +62,12 @@ namespace OpenWire.Client.Commands bool recievedByDFBridge; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_Message; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs index 8b97533c84..f54395bc79 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for MessageAck -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for MessageAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class MessageAck : BaseCommand { - public const byte ID_MessageAck = 22; + public const byte ID_MessageAck = 22; ActiveMQDestination destination; TransactionId transactionId; @@ -28,13 +44,12 @@ namespace OpenWire.Client.Commands int messageCount; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_MessageAck; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs index 584d95e8eb..4a7c92b20b 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for MessageDispatch -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for MessageDispatch + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class MessageDispatch : BaseCommand { - public const byte ID_MessageDispatch = 21; + public const byte ID_MessageDispatch = 21; ConsumerId consumerId; ActiveMQDestination destination; @@ -25,13 +41,12 @@ namespace OpenWire.Client.Commands int redeliveryCounter; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_MessageDispatch; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatchNotification.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatchNotification.cs new file mode 100644 index 0000000000..23bed19894 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatchNotification.cs @@ -0,0 +1,81 @@ +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + // + // Marshalling code for Open Wire Format for MessageDispatchNotification + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class MessageDispatchNotification : BaseCommand + { + public const byte ID_MessageDispatchNotification = 90; + + ConsumerId consumerId; + ActiveMQDestination destination; + long deliverySequenceId; + MessageId messageId; + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetDataStructureType() { + return ID_MessageDispatchNotification; + } + + + // Properties + + public ConsumerId ConsumerId + { + get { return consumerId; } + set { this.consumerId = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public long DeliverySequenceId + { + get { return deliverySequenceId; } + set { this.deliverySequenceId = value; } + } + + public MessageId MessageId + { + get { return messageId; } + set { this.messageId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs index 037b082d59..9d97bb33c3 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for MessageId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for MessageId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class MessageId : AbstractCommand { - public const byte ID_MessageId = 110; + public const byte ID_MessageId = 110; ProducerId producerId; long producerSequenceId; long brokerSequenceId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_MessageId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs index 283a097afa..1dd76b6cbd 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ProducerId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ProducerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ProducerId : AbstractCommand { - public const byte ID_ProducerId = 123; + public const byte ID_ProducerId = 123; string connectionId; long value; long sessionId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ProducerId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs index ea745cbb42..fc1bcac7a3 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ProducerInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ProducerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ProducerInfo : BaseCommand { - public const byte ID_ProducerInfo = 6; + public const byte ID_ProducerInfo = 6; ProducerId producerId; ActiveMQDestination destination; BrokerId[] brokerPath; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ProducerInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs index 214088172d..0d9028eac7 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for RemoveInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for RemoveInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class RemoveInfo : BaseCommand { - public const byte ID_RemoveInfo = 12; + public const byte ID_RemoveInfo = 12; DataStructure objectId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_RemoveInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs index 63bcdf8314..a03cde77d0 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for RemoveSubscriptionInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for RemoveSubscriptionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class RemoveSubscriptionInfo : BaseCommand { - public const byte ID_RemoveSubscriptionInfo = 0; + public const byte ID_RemoveSubscriptionInfo = 0; ConnectionId connectionId; string subcriptionName; string clientId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_RemoveSubscriptionInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs b/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs index a6f7dca4e7..fd38df7ca0 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for Response -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for Response + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class Response : BaseCommand { - public const byte ID_Response = 30; + public const byte ID_Response = 30; short correlationId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_Response; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs index 2dcbd3671e..582433cf09 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for SessionId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,21 +23,28 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for SessionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class SessionId : AbstractCommand { - public const byte ID_SessionId = 121; + public const byte ID_SessionId = 121; string connectionId; long value; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_SessionId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs index 4b6c5ef78d..46833b3c0a 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for SessionInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,20 +23,27 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for SessionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class SessionInfo : BaseCommand { - public const byte ID_SessionInfo = 4; + public const byte ID_SessionInfo = 4; SessionId sessionId; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_SessionInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs index fbfc32f3af..b617a634a0 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for ShutdownInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,19 +23,26 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for ShutdownInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class ShutdownInfo : BaseCommand { - public const byte ID_ShutdownInfo = 11; + public const byte ID_ShutdownInfo = 11; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_ShutdownInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs index cfe41485a2..68af5c5444 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for SubscriptionInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,9 +23,17 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for SubscriptionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class SubscriptionInfo : AbstractCommand { - public const byte ID_SubscriptionInfo = 55; + public const byte ID_SubscriptionInfo = 55; string clientId; ActiveMQDestination destination; @@ -25,13 +41,12 @@ namespace OpenWire.Client.Commands string subcriptionName; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_SubscriptionInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs index 491012cf89..e7e11d8deb 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for TransactionId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,19 +23,26 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for TransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class TransactionId : AbstractCommand { - public const byte ID_TransactionId = 0; + public const byte ID_TransactionId = 0; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_TransactionId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs index 0e79b5836c..832aeedfd0 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for TransactionInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for TransactionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class TransactionInfo : BaseCommand { - public const byte ID_TransactionInfo = 7; + public const byte ID_TransactionInfo = 7; ConnectionId connectionId; TransactionId transactionId; byte type; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_TransactionInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs index 0de4df4d89..3afbc798eb 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for WireFormatInfo -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for WireFormatInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class WireFormatInfo : AbstractCommand { - public const byte ID_WireFormatInfo = 1; + public const byte ID_WireFormatInfo = 1; byte[] magic; int version; int options; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_WireFormatInfo; } diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs index 6d919fda2c..680606324a 100644 --- a/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs +++ b/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs @@ -1,11 +1,19 @@ -// -// Marshalling code for Open Wire Format for XATransactionId -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// +/* +* Copyright 2006 The Apache Software Foundation or its licensors, as +* applicable. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using System; using System.Collections; @@ -15,22 +23,29 @@ using OpenWire.Client.Core; namespace OpenWire.Client.Commands { + // + // Marshalling code for Open Wire Format for XATransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // public class XATransactionId : TransactionId { - public const byte ID_XATransactionId = 112; + public const byte ID_XATransactionId = 112; int formatId; byte[] globalTransactionId; byte[] branchQualifier; - // TODO generate Equals method // TODO generate GetHashCode method // TODO generate ToString method - public override byte GetCommandType() { + public override byte GetDataStructureType() { return ID_XATransactionId; } diff --git a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs index 2a0adb0542..578c307005 100755 --- a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs +++ b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs @@ -12,11 +12,15 @@ namespace OpenWire.Client.Core { protected AbstractCommand() { } - public virtual byte GetCommandType() { + public virtual byte GetDataStructureType() { return 0; - } - - public static String GetCommandTypeAsString(int type) { + } + + public virtual bool IsMarshallAware() { + return false; + } + + public static String GetDataStructureTypeAsString(int type) { String packetTypeStr = ""; switch (type) { case ActiveMQMessage.ID_ActiveMQMessage : diff --git a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs deleted file mode 100755 index ee8de2272e..0000000000 --- a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.IO; - -using OpenWire.Client.Commands; -using OpenWire.Client.Core; -using OpenWire.Client.IO; - -namespace OpenWire.Client.Core { - /// - /// A base class with useful implementation inheritence methods - /// for creating marshallers of the OpenWire protocol - /// - public abstract class AbstractCommandMarshaller { - - public abstract Command CreateCommand(); - - public virtual Command ReadCommand(BinaryReader dataIn) { - Command command = CreateCommand(); - BuildCommand(command, dataIn); - return command; - } - - public virtual void BuildCommand(Command command, BinaryReader dataIn) { - // empty body to allow generated code to call base method - } - - public virtual void WriteCommand(Command command, BinaryWriter dataOut) { - // empty body to allow generated code to call base method - } - - protected virtual BrokerError ReadBrokerError(BinaryReader dataIn) { - BrokerError answer = new BrokerError(); - answer.ExceptionClass = dataIn.ReadString(); - answer.StackTrace = dataIn.ReadString(); - return answer; - } - - protected virtual void WriteBrokerError(BrokerError command, BinaryWriter dataOut) { - dataOut.Write(command.ExceptionClass); - dataOut.Write(command.StackTrace); - } - - protected virtual ActiveMQDestination ReadDestination(BinaryReader dataIn) { - return (ActiveMQDestination) CommandMarshallerRegistry.ReadCommand(dataIn); - } - - protected virtual void WriteDestination(ActiveMQDestination command, BinaryWriter dataOut) { - CommandMarshallerRegistry.WriteCommand(command, dataOut); - } - - protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn) { - int size = dataIn.ReadInt32(); - BrokerId[] answer = new BrokerId[size]; - for (int i = 0; i < size; i++) { - answer[i] = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn); - } - return answer; - } - - protected virtual void WriteBrokerIds(BrokerId[] commands, BinaryWriter dataOut) { - int size = commands.Length; - dataOut.Write(size); - for (int i = 0; i < size; i++) { - CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(commands[i], dataOut); - } - } - - - protected virtual BrokerInfo[] ReadBrokerInfos(BinaryReader dataIn) { - int size = dataIn.ReadInt32(); - BrokerInfo[] answer = new BrokerInfo[size]; - for (int i = 0; i < size; i++) { - answer[i] = (BrokerInfo) CommandMarshallerRegistry - .BrokerInfoMarshaller - .ReadCommand(dataIn); - } - return answer; - } - - protected virtual void WriteBrokerInfos(BrokerInfo[] commands, BinaryWriter dataOut) { - int size = commands.Length; - dataOut.Write(size); - for (int i = 0; i < size; i++) { - CommandMarshallerRegistry.BrokerInfoMarshaller.WriteCommand(commands[i], dataOut); - } - } - - - protected virtual DataStructure[] ReadDataStructures(BinaryReader dataIn) { - int size = dataIn.ReadInt32(); - DataStructure[] answer = new DataStructure[size]; - for (int i = 0; i < size; i++) { - answer[i] = (DataStructure) CommandMarshallerRegistry.ReadCommand(dataIn); - } - return answer; - } - - protected virtual void WriteDataStructures(DataStructure[] commands, BinaryWriter dataOut) { - int size = commands.Length; - dataOut.Write(size); - for (int i = 0; i < size; i++) { - CommandMarshallerRegistry.WriteCommand((Command) commands[i], dataOut); - } - } - - - protected virtual byte[] ReadBytes(BinaryReader dataIn) { - int size = dataIn.ReadInt32(); - return dataIn.ReadBytes(size); - } - - protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut) { - dataOut.Write(command.Length); - dataOut.Write(command); - } - } -} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/BooleanStream.cs b/openwire-dotnet/src/OpenWire.Client/Core/BooleanStream.cs new file mode 100755 index 0000000000..e5c13a0c42 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/BooleanStream.cs @@ -0,0 +1,93 @@ +using System; +using System.IO; + +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.Core { + /// + /// Represents a stream of boolean flags + /// + public class BooleanStream { + byte[] data = new byte[48]; + short arrayLimit; + short arrayPos; + byte bytePos; + + public bool ReadBoolean() { + byte b = data[arrayPos]; + bool rc = ((b >> bytePos) & 0x01) != 0; + bytePos++; + if (bytePos >= 8) { + bytePos = 0; + arrayPos++; + } + return rc; + } + + public void WriteBoolean(bool value) { + if (bytePos == 0) { + arrayLimit++; + if (arrayLimit >= data.Length) { + // re-grow the array. + byte[] d = new byte[data.Length * 2]; + for (int i = 0; i < data.Length; i++) { + d[i] = data[i]; + } + data = d; + } + } + if (value) { + data[arrayPos] |= (byte) (0x01 << bytePos); + } + bytePos++; + if (bytePos >= 8) { + bytePos = 0; + arrayPos++; + } + } + + public void Marshal(BinaryWriter dataOut) { + if (arrayLimit < 64) { + dataOut.Write((byte) arrayLimit); + } else if (arrayLimit < 256) { // max value of unsigned byte + dataOut.Write((byte) 0xC0); + dataOut.Write((byte) arrayLimit); + } else { + dataOut.Write((byte) 0xE0); + dataOut.Write((short) arrayLimit); + } + + dataOut.Write(data, 0, arrayLimit); + Clear(); + } + + public void Unmarshal(BinaryReader dataIn) { + arrayLimit = dataIn.ReadByte(); + if ((arrayLimit & 0xE0) != 0) { + arrayLimit = dataIn.ReadInt16(); + } else if ((arrayLimit & 0xC0) != 0) { + arrayLimit = (short) (dataIn.ReadByte() & 0xFF); + } + if (data.Length < arrayLimit) { + data = new byte[arrayLimit]; + } + dataIn.Read(data, 0, arrayLimit); + Clear(); + } + + public void Clear() { + arrayPos = 0; + bytePos = 0; + } + + public int MarshalledSize() { + if (arrayLimit < 64) { + return 1 + arrayLimit; + } else { + return 2 + arrayLimit; + } + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/BrokerError.cs b/openwire-dotnet/src/OpenWire.Client/Core/BrokerError.cs index 5917950218..57d45a7cd5 100755 --- a/openwire-dotnet/src/OpenWire.Client/Core/BrokerError.cs +++ b/openwire-dotnet/src/OpenWire.Client/Core/BrokerError.cs @@ -6,9 +6,15 @@ namespace OpenWire.Client.Core { /// Represents an exception on the broker /// public class BrokerError : AbstractCommand { + private string message; private string exceptionClass; private string stackTrace; + public string Message { + get { return message; } + set { message = value; } + } + public string ExceptionClass { get { return exceptionClass; } set { exceptionClass = value; } diff --git a/openwire-dotnet/src/OpenWire.Client/Core/DataStreamMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/Core/DataStreamMarshaller.cs new file mode 100755 index 0000000000..a3fca25083 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/DataStreamMarshaller.cs @@ -0,0 +1,401 @@ +using System; +using System.IO; + +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.Core { + /// + /// A base class with useful implementation inheritence methods + /// for creating marshallers of the OpenWire protocol + /// + public abstract class DataStreamMarshaller { + + public abstract DataStructure CreateObject(); + public abstract byte GetDataStructureType(); + + public virtual int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + return 0; + } + public virtual void Marshal2( + OpenWireFormat wireFormat, + Object o, + BinaryWriter dataOut, + BooleanStream bs) { + } + + public virtual void Unmarshal( + OpenWireFormat wireFormat, + Object o, + BinaryReader dataIn, + BooleanStream bs) { + } + + public virtual int Marshal1Long(OpenWireFormat wireFormat, long o, BooleanStream bs) { + if (o == 0L) { + bs.WriteBoolean(false); + bs.WriteBoolean(false); + return 0; + } else { + ulong ul = (ulong) o; + if ((ul & 0xFFFFFFFFFFFF0000ul) == 0L) { + bs.WriteBoolean(false); + bs.WriteBoolean(true); + return 2; + } else if ((ul & 0xFFFFFFFF00000000ul) == 0L) { + bs.WriteBoolean(true); + bs.WriteBoolean(false); + return 4; + } else { + bs.WriteBoolean(true); + bs.WriteBoolean(true); + return 8; + } + } + } + + public virtual void Marshal2Long( + OpenWireFormat wireFormat, + long o, + BinaryWriter dataOut, + BooleanStream bs) { + if (bs.ReadBoolean()) { + if (bs.ReadBoolean()) { + dataOut.Write(o); + } else { + dataOut.Write((int) o); + } + } else { + if (bs.ReadBoolean()) { + dataOut.Write((short) o); + } + } + } + public virtual long UnmarshalLong(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs) { + if (bs.ReadBoolean()) { + if (bs.ReadBoolean()) { + return dataIn.ReadInt64(); + } else { + return dataIn.ReadInt32(); + } + } else { + if (bs.ReadBoolean()) { + return dataIn.ReadInt16(); + } else { + return 0; + } + } + } + + protected virtual DataStructure UnmarshalNestedObject( + OpenWireFormat wireFormat, + BinaryReader dataIn, + BooleanStream bs) { + return wireFormat.UnmarshalNestedObject(dataIn, bs); + } + + protected virtual int Marshal1NestedObject( + OpenWireFormat wireFormat, + DataStructure o, + BooleanStream bs) { + return wireFormat.Marshal1NestedObject(o, bs); + } + + protected virtual void Marshal2NestedObject( + OpenWireFormat wireFormat, + DataStructure o, + BinaryWriter dataOut, + BooleanStream bs) { + wireFormat.Marshal2NestedObject(o, dataOut, bs); + } + + protected virtual DataStructure UnmarshalCachedObject( + OpenWireFormat wireFormat, + BinaryReader dataIn, + BooleanStream bs) { + /* + if (wireFormat.isCacheEnabled()) { + if (bs.ReadBoolean()) { + short index = dataIn.ReadInt16(); + DataStructure value = wireFormat.UnmarshalNestedObject(dataIn, bs); + wireFormat.setInUnmarshallCache(index, value); + return value; + } else { + short index = dataIn.ReadInt16(); + return wireFormat.getFromUnmarshallCache(index); + } + } else { + return wireFormat.UnmarshalNestedObject(dataIn, bs); + } + */ + return wireFormat.UnmarshalNestedObject(dataIn, bs); + } + + protected virtual int Marshal1CachedObject( + OpenWireFormat wireFormat, + DataStructure o, + BooleanStream bs) { + /* + if (wireFormat.isCacheEnabled()) { + Short index = wireFormat.getMarshallCacheIndex(o); + bs.WriteBoolean(index == null); + if (index == null) { + int rc = wireFormat.Marshal1NestedObject(o, bs); + wireFormat.addToMarshallCache(o); + return 2 + rc; + } else { + return 2; + } + } else { + return wireFormat.Marshal1NestedObject(o, bs); + } + */ + return wireFormat.Marshal1NestedObject(o, bs); + } + + protected virtual void Marshal2CachedObject( + OpenWireFormat wireFormat, + DataStructure o, + BinaryWriter dataOut, + BooleanStream bs) { + /* + if (wireFormat.isCacheEnabled()) { + Short index = wireFormat.getMarshallCacheIndex(o); + if (bs.ReadBoolean()) { + dataOut.Write((short)index.shortValue()); + wireFormat.Marshal2NestedObject(o, dataOut, bs); + } else { + dataOut.Write((short)index.shortValue()); + } + } else { + wireFormat.Marshal2NestedObject(o, dataOut, bs); + } + */ + wireFormat.Marshal2NestedObject(o, dataOut, bs); + } + + + + protected virtual String ReadString(BinaryReader dataIn, BooleanStream bs) { + if (bs.ReadBoolean()) { + if (bs.ReadBoolean()) { + int size = dataIn.ReadInt16(); + byte[] data = new byte[size]; + dataIn.Read(data, 0, size); + char[] text = new char[size]; + for (int i = 0; i < size; i++) { + text[i] = (char) data[i]; + } + return new String(text); + } else { + return dataIn.ReadString(); + } + } else { + return null; + } + } + + protected virtual int WriteString(String value, BooleanStream bs) { + bs.WriteBoolean(value != null); + if (value != null) { + int strlen = value.Length; + int utflen = 0; + int c = 0; + bool isOnlyAscii = true; + char[] charr = value.ToCharArray(); + for (int i = 0; i < strlen; i++) { + c = charr[i]; + if ((c >= 0x0001) && (c <= 0x007F)) { + utflen++; + } else if (c > 0x07FF) { + utflen += 3; + isOnlyAscii = false; + } else { + isOnlyAscii = false; + utflen += 2; + } + } + + if (utflen >= Int16.MaxValue) + throw new IOException("Encountered a String value that is too long to encode."); + + bs.WriteBoolean(isOnlyAscii); + return utflen + 2; + } else { + return 0; + } + } + + protected virtual void WriteString(String value, BinaryWriter dataOut, BooleanStream bs) { + if (bs.ReadBoolean()) { + // If we verified it only holds ascii values + if (bs.ReadBoolean()) { + dataOut.Write((short) value.Length); + dataOut.Write(value); + } else { + dataOut.Write(value); + } + } + } + + protected virtual int MarshalObjectArray( + OpenWireFormat wireFormat, + DataStructure[] objects, + BooleanStream bs) { + if (objects != null) { + int rc = 0; + bs.WriteBoolean(true); + rc += 2; + for (int i = 0; i < objects.Length; i++) { + rc += Marshal1NestedObject(wireFormat, objects[i], bs); + } + return rc; + } else { + bs.WriteBoolean(false); + return 0; + } + } + + protected virtual void MarshalObjectArray( + OpenWireFormat wireFormat, + DataStructure[] objects, + BinaryWriter dataOut, + BooleanStream bs) { + if (bs.ReadBoolean()) { + dataOut.Write((short) objects.Length); + for (int i = 0; i < objects.Length; i++) { + Marshal2NestedObject(wireFormat, objects[i], dataOut, bs); + } + } + } + + protected virtual byte[] ReadBytes(BinaryReader dataIn, bool flag) { + if (flag) { + int size = dataIn.ReadInt32(); + return dataIn.ReadBytes(size); + } else { + return null; + } + } + + protected virtual byte[] ReadBytes(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + return dataIn.ReadBytes(size); + } + + protected virtual byte[] ReadBytes(BinaryReader dataIn, int size) { + return dataIn.ReadBytes(size); + } + + protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut) { + dataOut.Write(command.Length); + dataOut.Write(command); + } + + protected virtual BrokerError UnmarshalBrokerError( + OpenWireFormat wireFormat, + BinaryReader dataIn, + BooleanStream bs) { + if (bs.ReadBoolean()) { + String clazz = ReadString(dataIn, bs); + String message = ReadString(dataIn, bs); + + BrokerError answer = new BrokerError(); + answer.ExceptionClass = clazz; + answer.Message = message; + return answer; + } else { + return null; + } + } + + protected int MarshalBrokerError(OpenWireFormat wireFormat, BrokerError o, BooleanStream bs) { + if (o == null) { + bs.WriteBoolean(false); + return 0; + } else { + int rc = 0; + bs.WriteBoolean(true); + rc += WriteString(o.ExceptionClass, bs); + rc += WriteString(o.Message, bs); + return rc; + } + } + + protected void MarshalBrokerError( + OpenWireFormat wireFormat, + BrokerError o, + BinaryWriter dataOut, + BooleanStream bs) { + if (bs.ReadBoolean()) { + WriteString(o.ExceptionClass, dataOut, bs); + WriteString(o.Message, dataOut, bs); + } + } + /* + protected virtual ActiveMQDestination ReadDestination(BinaryReader dataIn) { + return (ActiveMQDestination) CommandMarshallerRegistry.ReadCommand(dataIn); + } + + protected virtual void WriteDestination(ActiveMQDestination command, BinaryWriter dataOut) { + CommandMarshallerRegistry.WriteCommand(command, dataOut); + } + + protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + BrokerId[] answer = new BrokerId[size]; + for (int i = 0; i < size; i++) { + answer[i] = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteBrokerIds(BrokerId[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(commands[i], dataOut); + } + } + + + protected virtual BrokerInfo[] ReadBrokerInfos(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + BrokerInfo[] answer = new BrokerInfo[size]; + for (int i = 0; i < size; i++) { + answer[i] = (BrokerInfo) CommandMarshallerRegistry + .BrokerInfoMarshaller + .ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteBrokerInfos(BrokerInfo[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.BrokerInfoMarshaller.WriteCommand(commands[i], dataOut); + } + } + + + protected virtual DataStructure[] ReadDataStructures(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + DataStructure[] answer = new DataStructure[size]; + for (int i = 0; i < size; i++) { + answer[i] = (DataStructure) CommandMarshallerRegistry.ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteDataStructures(DataStructure[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.WriteCommand((Command) commands[i], dataOut); + } + } + */ + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs b/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs index 6d90b9a48e..891f224f9a 100755 --- a/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs +++ b/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs @@ -7,6 +7,7 @@ namespace OpenWire.Client.Core { /// public interface DataStructure { - byte GetCommandType(); - } + byte GetDataStructureType(); + bool IsMarshallAware(); + } } diff --git a/openwire-dotnet/src/OpenWire.Client/Core/DataStructureSupport.cs b/openwire-dotnet/src/OpenWire.Client/Core/DataStructureSupport.cs new file mode 100755 index 0000000000..13894be80d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/DataStructureSupport.cs @@ -0,0 +1,23 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// Summary description for DataStructureSupport. + /// + public abstract class DataStructureSupport : DataStructure { + + protected DataStructureSupport() { + } + + public virtual byte GetDataStructureType() { + return 0; + } + + public virtual bool IsMarshallAware() { + return false; + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/MarshallAware.cs b/openwire-dotnet/src/OpenWire.Client/Core/MarshallAware.cs new file mode 100644 index 0000000000..b52e23ef5e --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/MarshallAware.cs @@ -0,0 +1,23 @@ +using System; +using System.IO; + +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.Core { + /// + /// Represents a marshallable entity + /// + public interface MarshallAware { + + void BeforeMarshall(OpenWireFormat wireFormat); + void AfterMarshall(OpenWireFormat wireFormat); + + void BeforeUnmarshall(OpenWireFormat wireFormat); + void AfterUnmarshall(OpenWireFormat wireFormat); + + void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data); + byte[] GetMarshalledForm(OpenWireFormat wireFormat); + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/OpenWireFormat.cs b/openwire-dotnet/src/OpenWire.Client/Core/OpenWireFormat.cs new file mode 100755 index 0000000000..1f42d165f2 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/OpenWireFormat.cs @@ -0,0 +1,133 @@ +using System; +using System.IO; + +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.Core { + /// + /// Represents the wire format + /// + public class OpenWireFormat { + private DataStreamMarshaller[] dataMarshallers; + private const byte NULL_TYPE = 0; + + + public void addMarshaller(DataStreamMarshaller marshaller) + { + dataMarshallers[marshaller.GetDataStructureType()] = marshaller; + } + + public void Marshal(Object o, BinaryWriter ds) { + int size = 1; + if (o != null) { + DataStructure c = (DataStructure) o; + byte type = c.GetDataStructureType(); + DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF]; + if (dsm == null) + throw new IOException("Unknown data type: " + type); + + BooleanStream bs = new BooleanStream(); + size += dsm.Marshal1(this, c, bs); + size += bs.MarshalledSize(); + + ds.Write(size); + ds.Write(type); + bs.Marshal(ds); + dsm.Marshal2(this, c, ds, bs); + } else { + ds.Write(size); + ds.Write(NULL_TYPE); + } + } + + public Object Unmarshal(BinaryReader dis) { + byte dataType = dis.ReadByte(); + if (dataType != NULL_TYPE) { + DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[dataType & 0xFF]; + if (dsm == null) + throw new IOException("Unknown data type: " + dataType); + Object data = dsm.CreateObject(); + BooleanStream bs = new BooleanStream(); + bs.Unmarshal(dis); + dsm.Unmarshal(this, data, dis, bs); + return data; + } else { + return null; + } + } + + public int Marshal1NestedObject(DataStructure o, BooleanStream bs) { + bs.WriteBoolean(o != null); + if (o == null) + return 0; + + if (o.IsMarshallAware()) { + MarshallAware ma = (MarshallAware) o; + byte[] sequence = ma.GetMarshalledForm(this); + bs.WriteBoolean(sequence != null); + if (sequence != null) { + return 1 + sequence.Length; + } + } + + byte type = o.GetDataStructureType(); + DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF]; + if (dsm == null) + throw new IOException("Unknown data type: " + type); + return 1 + dsm.Marshal1(this, o, bs); + } + + public void Marshal2NestedObject(DataStructure o, BinaryWriter ds, BooleanStream bs) { + if (!bs.ReadBoolean()) + return ; + + byte type = o.GetDataStructureType(); + ds.Write(type); + + if (o.IsMarshallAware() && bs.ReadBoolean()) { + MarshallAware ma = (MarshallAware) o; + byte[] sequence = ma.GetMarshalledForm(this); + ds.Write(sequence, 0, sequence.Length); + } else { + + DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF]; + if (dsm == null) + throw new IOException("Unknown data type: " + type); + dsm.Marshal2(this, o, ds, bs); + } + } + + public DataStructure UnmarshalNestedObject(BinaryReader dis, BooleanStream bs) { + if (bs.ReadBoolean()) { + + byte dataType = dis.ReadByte(); + DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[dataType & 0xFF]; + if (dsm == null) + throw new IOException("Unknown data type: " + dataType); + DataStructure data = dsm.CreateObject(); + + if (data.IsMarshallAware() && bs.ReadBoolean()) { + + dis.ReadInt32(); + dis.ReadByte(); + + BooleanStream bs2 = new BooleanStream(); + bs2.Unmarshal(dis); + dsm.Unmarshal(this, data, dis, bs2); + + // TODO: extract the sequence from the dis and associate it. + // MarshallAware ma = (MarshallAware)data + // ma.setCachedMarshalledForm(this, sequence); + } else { + dsm.Unmarshal(this, data, dis, bs); + } + + return data; + } else { + return null; + } + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/SocketTransport.cs b/openwire-dotnet/src/OpenWire.Client/Core/SocketTransport.cs index 99a73a986e..86a56e27d9 100755 --- a/openwire-dotnet/src/OpenWire.Client/Core/SocketTransport.cs +++ b/openwire-dotnet/src/OpenWire.Client/Core/SocketTransport.cs @@ -29,6 +29,7 @@ namespace OpenWire.Client.Core { public event CommandHandler Command; public event ExceptionHandler Exception; + private OpenWireFormat wireformat = new OpenWireFormat(); public SocketTransport(string host, int port) { Console.WriteLine("Opening socket to: " + host + " on port: " + port); @@ -78,7 +79,7 @@ namespace OpenWire.Client.Core { while (!closed) { BaseCommand command = null; try { - command = (BaseCommand) CommandMarshallerRegistry.ReadCommand(socketReader); + command = (BaseCommand) wireformat.Unmarshal(socketReader); } catch (ObjectDisposedException e) { // stream closed break; @@ -113,7 +114,7 @@ namespace OpenWire.Client.Core { protected void Send(Command command) { lock (transmissionLock) { - CommandMarshallerRegistry.WriteCommand(command, socketWriter); + wireformat.Marshal(command, socketWriter); socketWriter.Flush(); } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs index ad2fac13b8..300b6f39f8 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQBytesMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQBytesMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQBytesMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQBytesMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQBytesMessage.ID_ActiveMQBytesMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQBytesMessage info = (ActiveMQBytesMessage)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs index 0e2425f72d..43c6284b45 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQDestination -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,24 +26,51 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public abstract class ActiveMQDestinationMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQDestination + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class ActiveMQDestinationMarshaller : DataStreamMarshaller + { + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { + base.Unmarshal(wireFormat, o, dataIn, bs); + ActiveMQDestination info = (ActiveMQDestination)o; + info.PhysicalName = ReadString(dataIn, bs); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ActiveMQDestination info = (ActiveMQDestination) command; - info.PhysicalName = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ActiveMQDestination info = (ActiveMQDestination) command; - dataOut.Write(info.PhysicalName); - - } } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQDestination info = (ActiveMQDestination)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.PhysicalName, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ActiveMQDestination info = (ActiveMQDestination)o; + WriteString(info.PhysicalName, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs index 9af66d2f80..346fc35d39 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQMapMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQMapMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQMapMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQMapMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQMapMessage.ID_ActiveMQMapMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQMapMessage info = (ActiveMQMapMessage)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs index a80e05841a..798031ffe9 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,68 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQMessageMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQMessageMarshaller : MessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQMessage.ID_ActiveMQMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ActiveMQMessage info = (ActiveMQMessage)o; + + info.BeforeUnmarshall(wireFormat); + + + info.AfterUnmarshall(wireFormat); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQMessage info = (ActiveMQMessage)o; + + info.BeforeMarshall(wireFormat); + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ActiveMQMessage info = (ActiveMQMessage)o; + + info.AfterMarshall(wireFormat); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs index 18b293189f..c53baa27ec 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQObjectMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQObjectMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQObjectMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQObjectMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQObjectMessage.ID_ActiveMQObjectMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQObjectMessage info = (ActiveMQObjectMessage)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs index 02fe08106a..8384671310 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQQueue -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQQueueMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQQueue + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQQueueMarshaller : ActiveMQDestinationMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQQueue(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQQueue(); } + + public override byte GetDataStructureType() + { + return ActiveMQQueue.ID_ActiveMQQueue; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQQueue info = (ActiveMQQueue)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs index 58d0607ce6..41e10316fa 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQStreamMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQStreamMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQStreamMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQStreamMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQStreamMessage.ID_ActiveMQStreamMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQStreamMessage info = (ActiveMQStreamMessage)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs index ab5c27a828..8c044b9f7a 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQTempDestination -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,18 +26,44 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public abstract class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQTempDestination + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class ActiveMQTempDestinationMarshaller : ActiveMQDestinationMarshaller + { + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { + base.Unmarshal(wireFormat, o, dataIn, bs); - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQTempDestination info = (ActiveMQTempDestination)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs index 192e5b661f..cc2efb0d64 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQTempQueue -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQTempQueueMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQTempQueue + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQTempQueueMarshaller : ActiveMQTempDestinationMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQTempQueue(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQTempQueue(); } + + public override byte GetDataStructureType() + { + return ActiveMQTempQueue.ID_ActiveMQTempQueue; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQTempQueue info = (ActiveMQTempQueue)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs index d3d97d53e2..b04643bd05 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQTempTopic -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQTempTopicMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQTempTopic + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQTempTopicMarshaller : ActiveMQTempDestinationMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQTempTopic(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQTempTopic(); } + + public override byte GetDataStructureType() + { + return ActiveMQTempTopic.ID_ActiveMQTempTopic; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQTempTopic info = (ActiveMQTempTopic)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs index 7da1129cfa..d7877390f6 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQTextMessage -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQTextMessage + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQTextMessage(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQTextMessage(); } + + public override byte GetDataStructureType() + { + return ActiveMQTextMessage.ID_ActiveMQTextMessage; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQTextMessage info = (ActiveMQTextMessage)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs index c658e57775..811c427bb7 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ActiveMQTopic -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ActiveMQTopicMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ActiveMQTopic + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ActiveMQTopicMarshaller : ActiveMQDestinationMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ActiveMQTopic(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ActiveMQTopic(); } + + public override byte GetDataStructureType() + { + return ActiveMQTopic.ID_ActiveMQTopic; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ActiveMQTopic info = (ActiveMQTopic)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs index 4156c0ac31..0de4085394 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for BaseCommand -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,26 +26,53 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public abstract class BaseCommandMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for BaseCommand + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class BaseCommandMarshaller : DataStreamMarshaller + { + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { + base.Unmarshal(wireFormat, o, dataIn, bs); + BaseCommand info = (BaseCommand)o; + info.CommandId = dataIn.ReadInt16(); + info.ResponseRequired = bs.ReadBoolean(); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - BaseCommand info = (BaseCommand) command; - info.CommandId = dataIn.ReadInt16(); - info.ResponseRequired = dataIn.ReadBoolean(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - BaseCommand info = (BaseCommand) command; - dataOut.Write(info.CommandId); - dataOut.Write(info.ResponseRequired); - - } } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + BaseCommand info = (BaseCommand)o; + + int rc = base.Marshal1(wireFormat, info, bs); + bs.WriteBoolean(info.ResponseRequired); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + BaseCommand info = (BaseCommand)o; + dataOut.Write((short)info.CommandId); + bs.ReadBoolean(); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs index 2a86de694a..52050e4026 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for BrokerId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class BrokerIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for BrokerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class BrokerIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new BrokerId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - BrokerId info = (BrokerId) command; - info.Value = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - BrokerId info = (BrokerId) command; - dataOut.Write(info.Value); - - } + return new BrokerId(); } + + public override byte GetDataStructureType() + { + return BrokerId.ID_BrokerId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + BrokerId info = (BrokerId)o; + info.Value = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + BrokerId info = (BrokerId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.Value, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + BrokerId info = (BrokerId)o; + WriteString(info.Value, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs index 2dac8baa34..fe771f35a2 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for BrokerInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,34 +26,85 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class BrokerInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for BrokerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class BrokerInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new BrokerInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - BrokerInfo info = (BrokerInfo) command; - info.BrokerId = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn); - info.BrokerURL = dataIn.ReadString(); - info.PeerBrokerInfos = ReadBrokerInfos(dataIn); - info.BrokerName = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - BrokerInfo info = (BrokerInfo) command; - CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(info.BrokerId, dataOut); - dataOut.Write(info.BrokerURL); - WriteBrokerInfos(info.PeerBrokerInfos, dataOut); - dataOut.Write(info.BrokerName); - - } + return new BrokerInfo(); } + + public override byte GetDataStructureType() + { + return BrokerInfo.ID_BrokerInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + BrokerInfo info = (BrokerInfo)o; + info.BrokerId = (BrokerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.BrokerURL = ReadString(dataIn, bs); + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerInfo[] value = new BrokerInfo[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerInfo) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.PeerBrokerInfos = value; + } + else { + info.PeerBrokerInfos = null; + } + info.BrokerName = ReadString(dataIn, bs); + info.SlaveBroker = bs.ReadBoolean(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + BrokerInfo info = (BrokerInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.BrokerId, bs); + rc += WriteString(info.BrokerURL, bs); + rc += MarshalObjectArray(wireFormat, info.PeerBrokerInfos, bs); + rc += WriteString(info.BrokerName, bs); + bs.WriteBoolean(info.SlaveBroker); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + BrokerInfo info = (BrokerInfo)o; + Marshal2CachedObject(wireFormat, info.BrokerId, dataOut, bs); + WriteString(info.BrokerURL, dataOut, bs); + MarshalObjectArray(wireFormat, info.PeerBrokerInfos, dataOut, bs); + WriteString(info.BrokerName, dataOut, bs); + bs.ReadBoolean(); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs b/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs deleted file mode 100644 index 57ca6dc699..0000000000 --- a/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs +++ /dev/null @@ -1,1018 +0,0 @@ -// -// Marshalling code for Open Wire Format for ExceptionResponse -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// - -using System; -using System.Collections; -using System.IO; - -using OpenWire.Client; -using OpenWire.Client.Commands; -using OpenWire.Client.Core; -using OpenWire.Client.IO; - -namespace OpenWire.Client.IO -{ - public class CommandMarshallerRegistry - { - public static Command ReadCommand(BinaryReader dataIn) - { - byte commandID = dataIn.ReadByte(); - switch (commandID) - { - - case MessageId.ID_MessageId: - return messageIdMarshaller.ReadCommand(dataIn); - - - case BrokerInfo.ID_BrokerInfo: - return brokerInfoMarshaller.ReadCommand(dataIn); - - - case ActiveMQTempQueue.ID_ActiveMQTempQueue: - return activeMQTempQueueMarshaller.ReadCommand(dataIn); - - - case LocalTransactionId.ID_LocalTransactionId: - return localTransactionIdMarshaller.ReadCommand(dataIn); - - - case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo: - return removeSubscriptionInfoMarshaller.ReadCommand(dataIn); - - - case IntegerResponse.ID_IntegerResponse: - return integerResponseMarshaller.ReadCommand(dataIn); - - - case ActiveMQQueue.ID_ActiveMQQueue: - return activeMQQueueMarshaller.ReadCommand(dataIn); - - - case DestinationInfo.ID_DestinationInfo: - return destinationInfoMarshaller.ReadCommand(dataIn); - - - case ActiveMQBytesMessage.ID_ActiveMQBytesMessage: - return activeMQBytesMessageMarshaller.ReadCommand(dataIn); - - - case ShutdownInfo.ID_ShutdownInfo: - return shutdownInfoMarshaller.ReadCommand(dataIn); - - - case DataResponse.ID_DataResponse: - return dataResponseMarshaller.ReadCommand(dataIn); - - - case SessionId.ID_SessionId: - return sessionIdMarshaller.ReadCommand(dataIn); - - - case DataArrayResponse.ID_DataArrayResponse: - return dataArrayResponseMarshaller.ReadCommand(dataIn); - - - case JournalQueueAck.ID_JournalQueueAck: - return journalQueueAckMarshaller.ReadCommand(dataIn); - - - case WireFormatInfo.ID_WireFormatInfo: - return wireFormatInfoMarshaller.ReadCommand(dataIn); - - - case Response.ID_Response: - return responseMarshaller.ReadCommand(dataIn); - - - case ConnectionError.ID_ConnectionError: - return connectionErrorMarshaller.ReadCommand(dataIn); - - - case ActiveMQObjectMessage.ID_ActiveMQObjectMessage: - return activeMQObjectMessageMarshaller.ReadCommand(dataIn); - - - case ConsumerInfo.ID_ConsumerInfo: - return consumerInfoMarshaller.ReadCommand(dataIn); - - - case ConnectionId.ID_ConnectionId: - return connectionIdMarshaller.ReadCommand(dataIn); - - - case ActiveMQTempTopic.ID_ActiveMQTempTopic: - return activeMQTempTopicMarshaller.ReadCommand(dataIn); - - - case DiscoveryEvent.ID_DiscoveryEvent: - return discoveryEventMarshaller.ReadCommand(dataIn); - - - case ConnectionInfo.ID_ConnectionInfo: - return connectionInfoMarshaller.ReadCommand(dataIn); - - - case KeepAliveInfo.ID_KeepAliveInfo: - return keepAliveInfoMarshaller.ReadCommand(dataIn); - - - case XATransactionId.ID_XATransactionId: - return xATransactionIdMarshaller.ReadCommand(dataIn); - - - case JournalTrace.ID_JournalTrace: - return journalTraceMarshaller.ReadCommand(dataIn); - - - case FlushCommand.ID_FlushCommand: - return flushCommandMarshaller.ReadCommand(dataIn); - - - case ConsumerId.ID_ConsumerId: - return consumerIdMarshaller.ReadCommand(dataIn); - - - case JournalTopicAck.ID_JournalTopicAck: - return journalTopicAckMarshaller.ReadCommand(dataIn); - - - case ActiveMQTextMessage.ID_ActiveMQTextMessage: - return activeMQTextMessageMarshaller.ReadCommand(dataIn); - - - case BrokerId.ID_BrokerId: - return brokerIdMarshaller.ReadCommand(dataIn); - - - case MessageDispatch.ID_MessageDispatch: - return messageDispatchMarshaller.ReadCommand(dataIn); - - - case ProducerInfo.ID_ProducerInfo: - return producerInfoMarshaller.ReadCommand(dataIn); - - - case SubscriptionInfo.ID_SubscriptionInfo: - return subscriptionInfoMarshaller.ReadCommand(dataIn); - - - case ActiveMQMapMessage.ID_ActiveMQMapMessage: - return activeMQMapMessageMarshaller.ReadCommand(dataIn); - - - case SessionInfo.ID_SessionInfo: - return sessionInfoMarshaller.ReadCommand(dataIn); - - - case ActiveMQMessage.ID_ActiveMQMessage: - return activeMQMessageMarshaller.ReadCommand(dataIn); - - - case TransactionInfo.ID_TransactionInfo: - return transactionInfoMarshaller.ReadCommand(dataIn); - - - case ActiveMQStreamMessage.ID_ActiveMQStreamMessage: - return activeMQStreamMessageMarshaller.ReadCommand(dataIn); - - - case MessageAck.ID_MessageAck: - return messageAckMarshaller.ReadCommand(dataIn); - - - case ProducerId.ID_ProducerId: - return producerIdMarshaller.ReadCommand(dataIn); - - - case ActiveMQTopic.ID_ActiveMQTopic: - return activeMQTopicMarshaller.ReadCommand(dataIn); - - - case JournalTransaction.ID_JournalTransaction: - return journalTransactionMarshaller.ReadCommand(dataIn); - - - case RemoveInfo.ID_RemoveInfo: - return removeInfoMarshaller.ReadCommand(dataIn); - - - case ControlCommand.ID_ControlCommand: - return controlCommandMarshaller.ReadCommand(dataIn); - - - case ExceptionResponse.ID_ExceptionResponse: - return exceptionResponseMarshaller.ReadCommand(dataIn); - - - default: - throw new Exception("Unknown command type: " + commandID); - } - } - - - public static void WriteCommand(Command command, BinaryWriter dataOut) - { - byte commandID = command.GetCommandType(); - dataOut.Write(commandID); - switch (commandID) - { - - case MessageId.ID_MessageId: - messageIdMarshaller.WriteCommand(command, dataOut); - break; - - - case BrokerInfo.ID_BrokerInfo: - brokerInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQTempQueue.ID_ActiveMQTempQueue: - activeMQTempQueueMarshaller.WriteCommand(command, dataOut); - break; - - - case LocalTransactionId.ID_LocalTransactionId: - localTransactionIdMarshaller.WriteCommand(command, dataOut); - break; - - - case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo: - removeSubscriptionInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case IntegerResponse.ID_IntegerResponse: - integerResponseMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQQueue.ID_ActiveMQQueue: - activeMQQueueMarshaller.WriteCommand(command, dataOut); - break; - - - case DestinationInfo.ID_DestinationInfo: - destinationInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQBytesMessage.ID_ActiveMQBytesMessage: - activeMQBytesMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case ShutdownInfo.ID_ShutdownInfo: - shutdownInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case DataResponse.ID_DataResponse: - dataResponseMarshaller.WriteCommand(command, dataOut); - break; - - - case SessionId.ID_SessionId: - sessionIdMarshaller.WriteCommand(command, dataOut); - break; - - - case DataArrayResponse.ID_DataArrayResponse: - dataArrayResponseMarshaller.WriteCommand(command, dataOut); - break; - - - case JournalQueueAck.ID_JournalQueueAck: - journalQueueAckMarshaller.WriteCommand(command, dataOut); - break; - - - case WireFormatInfo.ID_WireFormatInfo: - wireFormatInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case Response.ID_Response: - responseMarshaller.WriteCommand(command, dataOut); - break; - - - case ConnectionError.ID_ConnectionError: - connectionErrorMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQObjectMessage.ID_ActiveMQObjectMessage: - activeMQObjectMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case ConsumerInfo.ID_ConsumerInfo: - consumerInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ConnectionId.ID_ConnectionId: - connectionIdMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQTempTopic.ID_ActiveMQTempTopic: - activeMQTempTopicMarshaller.WriteCommand(command, dataOut); - break; - - - case DiscoveryEvent.ID_DiscoveryEvent: - discoveryEventMarshaller.WriteCommand(command, dataOut); - break; - - - case ConnectionInfo.ID_ConnectionInfo: - connectionInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case KeepAliveInfo.ID_KeepAliveInfo: - keepAliveInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case XATransactionId.ID_XATransactionId: - xATransactionIdMarshaller.WriteCommand(command, dataOut); - break; - - - case JournalTrace.ID_JournalTrace: - journalTraceMarshaller.WriteCommand(command, dataOut); - break; - - - case FlushCommand.ID_FlushCommand: - flushCommandMarshaller.WriteCommand(command, dataOut); - break; - - - case ConsumerId.ID_ConsumerId: - consumerIdMarshaller.WriteCommand(command, dataOut); - break; - - - case JournalTopicAck.ID_JournalTopicAck: - journalTopicAckMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQTextMessage.ID_ActiveMQTextMessage: - activeMQTextMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case BrokerId.ID_BrokerId: - brokerIdMarshaller.WriteCommand(command, dataOut); - break; - - - case MessageDispatch.ID_MessageDispatch: - messageDispatchMarshaller.WriteCommand(command, dataOut); - break; - - - case ProducerInfo.ID_ProducerInfo: - producerInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case SubscriptionInfo.ID_SubscriptionInfo: - subscriptionInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQMapMessage.ID_ActiveMQMapMessage: - activeMQMapMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case SessionInfo.ID_SessionInfo: - sessionInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQMessage.ID_ActiveMQMessage: - activeMQMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case TransactionInfo.ID_TransactionInfo: - transactionInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQStreamMessage.ID_ActiveMQStreamMessage: - activeMQStreamMessageMarshaller.WriteCommand(command, dataOut); - break; - - - case MessageAck.ID_MessageAck: - messageAckMarshaller.WriteCommand(command, dataOut); - break; - - - case ProducerId.ID_ProducerId: - producerIdMarshaller.WriteCommand(command, dataOut); - break; - - - case ActiveMQTopic.ID_ActiveMQTopic: - activeMQTopicMarshaller.WriteCommand(command, dataOut); - break; - - - case JournalTransaction.ID_JournalTransaction: - journalTransactionMarshaller.WriteCommand(command, dataOut); - break; - - - case RemoveInfo.ID_RemoveInfo: - removeInfoMarshaller.WriteCommand(command, dataOut); - break; - - - case ControlCommand.ID_ControlCommand: - controlCommandMarshaller.WriteCommand(command, dataOut); - break; - - - case ExceptionResponse.ID_ExceptionResponse: - exceptionResponseMarshaller.WriteCommand(command, dataOut); - break; - - - default: - throw new Exception("Unknown command type: " + commandID); - } - } - - - // Properties - - - private static MessageIdMarshaller messageIdMarshaller = new MessageIdMarshaller(); - - public static MessageIdMarshaller MessageIdMarshaller - { - get - { - return messageIdMarshaller; - } - } - - - - private static BrokerInfoMarshaller brokerInfoMarshaller = new BrokerInfoMarshaller(); - - public static BrokerInfoMarshaller BrokerInfoMarshaller - { - get - { - return brokerInfoMarshaller; - } - } - - - - private static ActiveMQTempQueueMarshaller activeMQTempQueueMarshaller = new ActiveMQTempQueueMarshaller(); - - public static ActiveMQTempQueueMarshaller ActiveMQTempQueueMarshaller - { - get - { - return activeMQTempQueueMarshaller; - } - } - - - - private static LocalTransactionIdMarshaller localTransactionIdMarshaller = new LocalTransactionIdMarshaller(); - - public static LocalTransactionIdMarshaller LocalTransactionIdMarshaller - { - get - { - return localTransactionIdMarshaller; - } - } - - - - private static RemoveSubscriptionInfoMarshaller removeSubscriptionInfoMarshaller = new RemoveSubscriptionInfoMarshaller(); - - public static RemoveSubscriptionInfoMarshaller RemoveSubscriptionInfoMarshaller - { - get - { - return removeSubscriptionInfoMarshaller; - } - } - - - - private static IntegerResponseMarshaller integerResponseMarshaller = new IntegerResponseMarshaller(); - - public static IntegerResponseMarshaller IntegerResponseMarshaller - { - get - { - return integerResponseMarshaller; - } - } - - - - private static ActiveMQQueueMarshaller activeMQQueueMarshaller = new ActiveMQQueueMarshaller(); - - public static ActiveMQQueueMarshaller ActiveMQQueueMarshaller - { - get - { - return activeMQQueueMarshaller; - } - } - - - - private static DestinationInfoMarshaller destinationInfoMarshaller = new DestinationInfoMarshaller(); - - public static DestinationInfoMarshaller DestinationInfoMarshaller - { - get - { - return destinationInfoMarshaller; - } - } - - - - private static ActiveMQBytesMessageMarshaller activeMQBytesMessageMarshaller = new ActiveMQBytesMessageMarshaller(); - - public static ActiveMQBytesMessageMarshaller ActiveMQBytesMessageMarshaller - { - get - { - return activeMQBytesMessageMarshaller; - } - } - - - - private static ShutdownInfoMarshaller shutdownInfoMarshaller = new ShutdownInfoMarshaller(); - - public static ShutdownInfoMarshaller ShutdownInfoMarshaller - { - get - { - return shutdownInfoMarshaller; - } - } - - - - private static DataResponseMarshaller dataResponseMarshaller = new DataResponseMarshaller(); - - public static DataResponseMarshaller DataResponseMarshaller - { - get - { - return dataResponseMarshaller; - } - } - - - - private static SessionIdMarshaller sessionIdMarshaller = new SessionIdMarshaller(); - - public static SessionIdMarshaller SessionIdMarshaller - { - get - { - return sessionIdMarshaller; - } - } - - - - private static DataArrayResponseMarshaller dataArrayResponseMarshaller = new DataArrayResponseMarshaller(); - - public static DataArrayResponseMarshaller DataArrayResponseMarshaller - { - get - { - return dataArrayResponseMarshaller; - } - } - - - - private static JournalQueueAckMarshaller journalQueueAckMarshaller = new JournalQueueAckMarshaller(); - - public static JournalQueueAckMarshaller JournalQueueAckMarshaller - { - get - { - return journalQueueAckMarshaller; - } - } - - - - private static WireFormatInfoMarshaller wireFormatInfoMarshaller = new WireFormatInfoMarshaller(); - - public static WireFormatInfoMarshaller WireFormatInfoMarshaller - { - get - { - return wireFormatInfoMarshaller; - } - } - - - - private static ResponseMarshaller responseMarshaller = new ResponseMarshaller(); - - public static ResponseMarshaller ResponseMarshaller - { - get - { - return responseMarshaller; - } - } - - - - private static ConnectionErrorMarshaller connectionErrorMarshaller = new ConnectionErrorMarshaller(); - - public static ConnectionErrorMarshaller ConnectionErrorMarshaller - { - get - { - return connectionErrorMarshaller; - } - } - - - - private static ActiveMQObjectMessageMarshaller activeMQObjectMessageMarshaller = new ActiveMQObjectMessageMarshaller(); - - public static ActiveMQObjectMessageMarshaller ActiveMQObjectMessageMarshaller - { - get - { - return activeMQObjectMessageMarshaller; - } - } - - - - private static ConsumerInfoMarshaller consumerInfoMarshaller = new ConsumerInfoMarshaller(); - - public static ConsumerInfoMarshaller ConsumerInfoMarshaller - { - get - { - return consumerInfoMarshaller; - } - } - - - - private static ConnectionIdMarshaller connectionIdMarshaller = new ConnectionIdMarshaller(); - - public static ConnectionIdMarshaller ConnectionIdMarshaller - { - get - { - return connectionIdMarshaller; - } - } - - - - private static ActiveMQTempTopicMarshaller activeMQTempTopicMarshaller = new ActiveMQTempTopicMarshaller(); - - public static ActiveMQTempTopicMarshaller ActiveMQTempTopicMarshaller - { - get - { - return activeMQTempTopicMarshaller; - } - } - - - - private static DiscoveryEventMarshaller discoveryEventMarshaller = new DiscoveryEventMarshaller(); - - public static DiscoveryEventMarshaller DiscoveryEventMarshaller - { - get - { - return discoveryEventMarshaller; - } - } - - - - private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller(); - - public static ConnectionInfoMarshaller ConnectionInfoMarshaller - { - get - { - return connectionInfoMarshaller; - } - } - - - - private static KeepAliveInfoMarshaller keepAliveInfoMarshaller = new KeepAliveInfoMarshaller(); - - public static KeepAliveInfoMarshaller KeepAliveInfoMarshaller - { - get - { - return keepAliveInfoMarshaller; - } - } - - - - private static XATransactionIdMarshaller xATransactionIdMarshaller = new XATransactionIdMarshaller(); - - public static XATransactionIdMarshaller XATransactionIdMarshaller - { - get - { - return xATransactionIdMarshaller; - } - } - - - - private static JournalTraceMarshaller journalTraceMarshaller = new JournalTraceMarshaller(); - - public static JournalTraceMarshaller JournalTraceMarshaller - { - get - { - return journalTraceMarshaller; - } - } - - - - private static FlushCommandMarshaller flushCommandMarshaller = new FlushCommandMarshaller(); - - public static FlushCommandMarshaller FlushCommandMarshaller - { - get - { - return flushCommandMarshaller; - } - } - - - - private static ConsumerIdMarshaller consumerIdMarshaller = new ConsumerIdMarshaller(); - - public static ConsumerIdMarshaller ConsumerIdMarshaller - { - get - { - return consumerIdMarshaller; - } - } - - - - private static JournalTopicAckMarshaller journalTopicAckMarshaller = new JournalTopicAckMarshaller(); - - public static JournalTopicAckMarshaller JournalTopicAckMarshaller - { - get - { - return journalTopicAckMarshaller; - } - } - - - - private static ActiveMQTextMessageMarshaller activeMQTextMessageMarshaller = new ActiveMQTextMessageMarshaller(); - - public static ActiveMQTextMessageMarshaller ActiveMQTextMessageMarshaller - { - get - { - return activeMQTextMessageMarshaller; - } - } - - - - private static BrokerIdMarshaller brokerIdMarshaller = new BrokerIdMarshaller(); - - public static BrokerIdMarshaller BrokerIdMarshaller - { - get - { - return brokerIdMarshaller; - } - } - - - - private static MessageDispatchMarshaller messageDispatchMarshaller = new MessageDispatchMarshaller(); - - public static MessageDispatchMarshaller MessageDispatchMarshaller - { - get - { - return messageDispatchMarshaller; - } - } - - - - private static ProducerInfoMarshaller producerInfoMarshaller = new ProducerInfoMarshaller(); - - public static ProducerInfoMarshaller ProducerInfoMarshaller - { - get - { - return producerInfoMarshaller; - } - } - - - - private static SubscriptionInfoMarshaller subscriptionInfoMarshaller = new SubscriptionInfoMarshaller(); - - public static SubscriptionInfoMarshaller SubscriptionInfoMarshaller - { - get - { - return subscriptionInfoMarshaller; - } - } - - - - private static ActiveMQMapMessageMarshaller activeMQMapMessageMarshaller = new ActiveMQMapMessageMarshaller(); - - public static ActiveMQMapMessageMarshaller ActiveMQMapMessageMarshaller - { - get - { - return activeMQMapMessageMarshaller; - } - } - - - - private static SessionInfoMarshaller sessionInfoMarshaller = new SessionInfoMarshaller(); - - public static SessionInfoMarshaller SessionInfoMarshaller - { - get - { - return sessionInfoMarshaller; - } - } - - - - private static ActiveMQMessageMarshaller activeMQMessageMarshaller = new ActiveMQMessageMarshaller(); - - public static ActiveMQMessageMarshaller ActiveMQMessageMarshaller - { - get - { - return activeMQMessageMarshaller; - } - } - - - - private static TransactionInfoMarshaller transactionInfoMarshaller = new TransactionInfoMarshaller(); - - public static TransactionInfoMarshaller TransactionInfoMarshaller - { - get - { - return transactionInfoMarshaller; - } - } - - - - private static ActiveMQStreamMessageMarshaller activeMQStreamMessageMarshaller = new ActiveMQStreamMessageMarshaller(); - - public static ActiveMQStreamMessageMarshaller ActiveMQStreamMessageMarshaller - { - get - { - return activeMQStreamMessageMarshaller; - } - } - - - - private static MessageAckMarshaller messageAckMarshaller = new MessageAckMarshaller(); - - public static MessageAckMarshaller MessageAckMarshaller - { - get - { - return messageAckMarshaller; - } - } - - - - private static ProducerIdMarshaller producerIdMarshaller = new ProducerIdMarshaller(); - - public static ProducerIdMarshaller ProducerIdMarshaller - { - get - { - return producerIdMarshaller; - } - } - - - - private static ActiveMQTopicMarshaller activeMQTopicMarshaller = new ActiveMQTopicMarshaller(); - - public static ActiveMQTopicMarshaller ActiveMQTopicMarshaller - { - get - { - return activeMQTopicMarshaller; - } - } - - - - private static JournalTransactionMarshaller journalTransactionMarshaller = new JournalTransactionMarshaller(); - - public static JournalTransactionMarshaller JournalTransactionMarshaller - { - get - { - return journalTransactionMarshaller; - } - } - - - - private static RemoveInfoMarshaller removeInfoMarshaller = new RemoveInfoMarshaller(); - - public static RemoveInfoMarshaller RemoveInfoMarshaller - { - get - { - return removeInfoMarshaller; - } - } - - - - private static ControlCommandMarshaller controlCommandMarshaller = new ControlCommandMarshaller(); - - public static ControlCommandMarshaller ControlCommandMarshaller - { - get - { - return controlCommandMarshaller; - } - } - - - - private static ExceptionResponseMarshaller exceptionResponseMarshaller = new ExceptionResponseMarshaller(); - - public static ExceptionResponseMarshaller ExceptionResponseMarshaller - { - get - { - return exceptionResponseMarshaller; - } - } - - - - } -} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs index 8ef48a50e9..b5ff0256b7 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ConnectionError -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,30 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ConnectionErrorMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ConnectionError + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ConnectionErrorMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ConnectionError(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ConnectionError info = (ConnectionError) command; - info.Exception = ReadBrokerError(dataIn); - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ConnectionError info = (ConnectionError) command; - WriteBrokerError(info.Exception, dataOut); - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - - } + return new ConnectionError(); } + + public override byte GetDataStructureType() + { + return ConnectionError.ID_ConnectionError; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ConnectionError info = (ConnectionError)o; + info.Exception = UnmarshalBrokerError(wireFormat, dataIn, bs); + info.ConnectionId = (ConnectionId) UnmarshalNestedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ConnectionError info = (ConnectionError)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += MarshalBrokerError(wireFormat, info.Exception, bs); + rc += Marshal1NestedObject(wireFormat, info.ConnectionId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ConnectionError info = (ConnectionError)o; + MarshalBrokerError(wireFormat, info.Exception, dataOut, bs); + Marshal2NestedObject(wireFormat, info.ConnectionId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs index 2156f60c02..7d8d369cb1 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ConnectionId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ConnectionIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ConnectionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ConnectionIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ConnectionId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ConnectionId info = (ConnectionId) command; - info.Value = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ConnectionId info = (ConnectionId) command; - dataOut.Write(info.Value); - - } + return new ConnectionId(); } + + public override byte GetDataStructureType() + { + return ConnectionId.ID_ConnectionId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ConnectionId info = (ConnectionId)o; + info.Value = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ConnectionId info = (ConnectionId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.Value, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ConnectionId info = (ConnectionId)o; + WriteString(info.Value, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs index 3820118f54..af66c54ddd 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ConnectionInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,36 +26,85 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ConnectionInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ConnectionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ConnectionInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ConnectionInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ConnectionInfo info = (ConnectionInfo) command; - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - info.ClientId = dataIn.ReadString(); - info.Password = dataIn.ReadString(); - info.UserName = dataIn.ReadString(); - info.BrokerPath = ReadBrokerIds(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ConnectionInfo info = (ConnectionInfo) command; - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - dataOut.Write(info.ClientId); - dataOut.Write(info.Password); - dataOut.Write(info.UserName); - WriteBrokerIds(info.BrokerPath, dataOut); - - } + return new ConnectionInfo(); } + + public override byte GetDataStructureType() + { + return ConnectionInfo.ID_ConnectionInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ConnectionInfo info = (ConnectionInfo)o; + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.ClientId = ReadString(dataIn, bs); + info.Password = ReadString(dataIn, bs); + info.UserName = ReadString(dataIn, bs); + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerId[] value = new BrokerId[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.BrokerPath = value; + } + else { + info.BrokerPath = null; + } + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ConnectionInfo info = (ConnectionInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs); + rc += WriteString(info.ClientId, bs); + rc += WriteString(info.Password, bs); + rc += WriteString(info.UserName, bs); + rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ConnectionInfo info = (ConnectionInfo)o; + Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs); + WriteString(info.ClientId, dataOut, bs); + WriteString(info.Password, dataOut, bs); + WriteString(info.UserName, dataOut, bs); + MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs index c81d96f47f..720a668718 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ConsumerId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,68 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ConsumerIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ConsumerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ConsumerIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ConsumerId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ConsumerId info = (ConsumerId) command; - info.ConnectionId = dataIn.ReadString(); - info.SessionId = dataIn.ReadInt64(); - info.Value = dataIn.ReadInt64(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ConsumerId info = (ConsumerId) command; - dataOut.Write(info.ConnectionId); - dataOut.Write(info.SessionId); - dataOut.Write(info.Value); - - } + return new ConsumerId(); } + + public override byte GetDataStructureType() + { + return ConsumerId.ID_ConsumerId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ConsumerId info = (ConsumerId)o; + info.ConnectionId = ReadString(dataIn, bs); + info.SessionId = UnmarshalLong(wireFormat, dataIn, bs); + info.Value = UnmarshalLong(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ConsumerId info = (ConsumerId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.ConnectionId, bs); + rc += Marshal1Long(wireFormat, info.SessionId, bs); + rc += Marshal1Long(wireFormat, info.Value, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ConsumerId info = (ConsumerId)o; + WriteString(info.ConnectionId, dataOut, bs); + Marshal2Long(wireFormat, info.SessionId, dataOut, bs); + Marshal2Long(wireFormat, info.Value, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs index 158930e0de..324a18a240 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ConsumerInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,52 +26,107 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ConsumerInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ConsumerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ConsumerInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ConsumerInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ConsumerInfo info = (ConsumerInfo) command; - info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); - info.Browser = dataIn.ReadBoolean(); - info.Destination = ReadDestination(dataIn); - info.PrefetchSize = dataIn.ReadInt32(); - info.DispatchAsync = dataIn.ReadBoolean(); - info.Selector = dataIn.ReadString(); - info.SubcriptionName = dataIn.ReadString(); - info.NoLocal = dataIn.ReadBoolean(); - info.Exclusive = dataIn.ReadBoolean(); - info.Retroactive = dataIn.ReadBoolean(); - info.Priority = dataIn.ReadByte(); - info.BrokerPath = ReadBrokerIds(dataIn); - info.NetworkSubscription = dataIn.ReadBoolean(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ConsumerInfo info = (ConsumerInfo) command; - CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); - dataOut.Write(info.Browser); - WriteDestination(info.Destination, dataOut); - dataOut.Write(info.PrefetchSize); - dataOut.Write(info.DispatchAsync); - dataOut.Write(info.Selector); - dataOut.Write(info.SubcriptionName); - dataOut.Write(info.NoLocal); - dataOut.Write(info.Exclusive); - dataOut.Write(info.Retroactive); - dataOut.Write(info.Priority); - WriteBrokerIds(info.BrokerPath, dataOut); - dataOut.Write(info.NetworkSubscription); - - } + return new ConsumerInfo(); } + + public override byte GetDataStructureType() + { + return ConsumerInfo.ID_ConsumerInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ConsumerInfo info = (ConsumerInfo)o; + info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Browser = bs.ReadBoolean(); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.PrefetchSize = dataIn.ReadInt32(); + info.DispatchAsync = bs.ReadBoolean(); + info.Selector = ReadString(dataIn, bs); + info.SubcriptionName = ReadString(dataIn, bs); + info.NoLocal = bs.ReadBoolean(); + info.Exclusive = bs.ReadBoolean(); + info.Retroactive = bs.ReadBoolean(); + info.Priority = dataIn.ReadByte(); + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerId[] value = new BrokerId[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.BrokerPath = value; + } + else { + info.BrokerPath = null; + } + info.NetworkSubscription = bs.ReadBoolean(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ConsumerInfo info = (ConsumerInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs); + bs.WriteBoolean(info.Browser); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + bs.WriteBoolean(info.DispatchAsync); + rc += WriteString(info.Selector, bs); + rc += WriteString(info.SubcriptionName, bs); + bs.WriteBoolean(info.NoLocal); + bs.WriteBoolean(info.Exclusive); + bs.WriteBoolean(info.Retroactive); + rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs); + bs.WriteBoolean(info.NetworkSubscription); + + return rc + 2; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ConsumerInfo info = (ConsumerInfo)o; + Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs); + bs.ReadBoolean(); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + dataOut.Write((int) info.PrefetchSize); + bs.ReadBoolean(); + WriteString(info.Selector, dataOut, bs); + WriteString(info.SubcriptionName, dataOut, bs); + bs.ReadBoolean(); + bs.ReadBoolean(); + bs.ReadBoolean(); + dataOut.Write((byte) info.Priority); + MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs); + bs.ReadBoolean(); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs index c9ae1d5fbe..9231618f2a 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ControlCommand -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ControlCommandMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ControlCommand + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ControlCommandMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ControlCommand(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ControlCommand info = (ControlCommand) command; - info.Command = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ControlCommand info = (ControlCommand) command; - dataOut.Write(info.Command); - - } + return new ControlCommand(); } + + public override byte GetDataStructureType() + { + return ControlCommand.ID_ControlCommand; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ControlCommand info = (ControlCommand)o; + info.Command = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ControlCommand info = (ControlCommand)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.Command, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ControlCommand info = (ControlCommand)o; + WriteString(info.Command, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs index 452199953a..2f9c94423a 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for DataArrayResponse -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,73 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class DataArrayResponseMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for DataArrayResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class DataArrayResponseMarshaller : ResponseMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new DataArrayResponse(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - DataArrayResponse info = (DataArrayResponse) command; - info.Data = ReadDataStructures(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - DataArrayResponse info = (DataArrayResponse) command; - WriteDataStructures(info.Data, dataOut); - - } + return new DataArrayResponse(); } + + public override byte GetDataStructureType() + { + return DataArrayResponse.ID_DataArrayResponse; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + DataArrayResponse info = (DataArrayResponse)o; + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + DataStructure[] value = new DataStructure[size]; + for( int i=0; i < size; i++ ) { + value[i] = (DataStructure) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.Data = value; + } + else { + info.Data = null; + } + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + DataArrayResponse info = (DataArrayResponse)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += MarshalObjectArray(wireFormat, info.Data, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + DataArrayResponse info = (DataArrayResponse)o; + MarshalObjectArray(wireFormat, info.Data, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs index 70946a5454..36a8d189c0 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for DataResponse -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class DataResponseMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for DataResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class DataResponseMarshaller : ResponseMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new DataResponse(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - DataResponse info = (DataResponse) command; - info.Data = CommandMarshallerRegistry.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - DataResponse info = (DataResponse) command; - CommandMarshallerRegistry.WriteCommand((Command) info.Data, dataOut); - - } + return new DataResponse(); } + + public override byte GetDataStructureType() + { + return DataResponse.ID_DataResponse; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + DataResponse info = (DataResponse)o; + info.Data = (DataStructure) UnmarshalNestedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + DataResponse info = (DataResponse)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1NestedObject(wireFormat, info.Data, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + DataResponse info = (DataResponse)o; + Marshal2NestedObject(wireFormat, info.Data, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs index 268e387557..69234a8fc7 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for DestinationInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,36 +26,84 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class DestinationInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for DestinationInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class DestinationInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new DestinationInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - DestinationInfo info = (DestinationInfo) command; - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - info.Destination = ReadDestination(dataIn); - info.OperationType = dataIn.ReadByte(); - info.Timeout = dataIn.ReadInt64(); - info.BrokerPath = ReadBrokerIds(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - DestinationInfo info = (DestinationInfo) command; - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - WriteDestination(info.Destination, dataOut); - dataOut.Write(info.OperationType); - dataOut.Write(info.Timeout); - WriteBrokerIds(info.BrokerPath, dataOut); - - } + return new DestinationInfo(); } + + public override byte GetDataStructureType() + { + return DestinationInfo.ID_DestinationInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + DestinationInfo info = (DestinationInfo)o; + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.OperationType = dataIn.ReadByte(); + info.Timeout = UnmarshalLong(wireFormat, dataIn, bs); + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerId[] value = new BrokerId[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.BrokerPath = value; + } + else { + info.BrokerPath = null; + } + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + DestinationInfo info = (DestinationInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += Marshal1Long(wireFormat, info.Timeout, bs); + rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + DestinationInfo info = (DestinationInfo)o; + Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + dataOut.Write((byte) info.OperationType); + Marshal2Long(wireFormat, info.Timeout, dataOut, bs); + MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs index 4780f504bf..f77755aea6 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for DiscoveryEvent -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,30 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class DiscoveryEventMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for DiscoveryEvent + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class DiscoveryEventMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new DiscoveryEvent(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - DiscoveryEvent info = (DiscoveryEvent) command; - info.ServiceName = dataIn.ReadString(); - info.BrokerName = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - DiscoveryEvent info = (DiscoveryEvent) command; - dataOut.Write(info.ServiceName); - dataOut.Write(info.BrokerName); - - } + return new DiscoveryEvent(); } + + public override byte GetDataStructureType() + { + return DiscoveryEvent.ID_DiscoveryEvent; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + DiscoveryEvent info = (DiscoveryEvent)o; + info.ServiceName = ReadString(dataIn, bs); + info.BrokerName = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + DiscoveryEvent info = (DiscoveryEvent)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.ServiceName, bs); + rc += WriteString(info.BrokerName, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + DiscoveryEvent info = (DiscoveryEvent)o; + WriteString(info.ServiceName, dataOut, bs); + WriteString(info.BrokerName, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs index 0090d8b1c5..6478af3b77 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ExceptionResponse -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ExceptionResponseMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ExceptionResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ExceptionResponseMarshaller : ResponseMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ExceptionResponse(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ExceptionResponse info = (ExceptionResponse) command; - info.Exception = ReadBrokerError(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ExceptionResponse info = (ExceptionResponse) command; - WriteBrokerError(info.Exception, dataOut); - - } + return new ExceptionResponse(); } + + public override byte GetDataStructureType() + { + return ExceptionResponse.ID_ExceptionResponse; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ExceptionResponse info = (ExceptionResponse)o; + info.Exception = UnmarshalBrokerError(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ExceptionResponse info = (ExceptionResponse)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += MarshalBrokerError(wireFormat, info.Exception, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ExceptionResponse info = (ExceptionResponse)o; + MarshalBrokerError(wireFormat, info.Exception, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs index 86e8279dcc..0c9e5803f9 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for FlushCommand -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class FlushCommandMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for FlushCommand + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class FlushCommandMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new FlushCommand(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new FlushCommand(); } + + public override byte GetDataStructureType() + { + return FlushCommand.ID_FlushCommand; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + FlushCommand info = (FlushCommand)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs index d1ce19886d..84581a70c8 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for IntegerResponse -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,61 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class IntegerResponseMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for IntegerResponse + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class IntegerResponseMarshaller : ResponseMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new IntegerResponse(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - IntegerResponse info = (IntegerResponse) command; - info.Result = dataIn.ReadInt32(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - IntegerResponse info = (IntegerResponse) command; - dataOut.Write(info.Result); - - } + return new IntegerResponse(); } + + public override byte GetDataStructureType() + { + return IntegerResponse.ID_IntegerResponse; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + IntegerResponse info = (IntegerResponse)o; + info.Result = dataIn.ReadInt32(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + IntegerResponse info = (IntegerResponse)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + IntegerResponse info = (IntegerResponse)o; + dataOut.Write((int) info.Result); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs index 0c0715bf9c..3afedd9b68 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for JournalQueueAck -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,30 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class JournalQueueAckMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for JournalQueueAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalQueueAckMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new JournalQueueAck(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - JournalQueueAck info = (JournalQueueAck) command; - info.Destination = ReadDestination(dataIn); - info.MessageAck = (MessageAck) CommandMarshallerRegistry.MessageAckMarshaller.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - JournalQueueAck info = (JournalQueueAck) command; - WriteDestination(info.Destination, dataOut); - CommandMarshallerRegistry.MessageAckMarshaller.WriteCommand(info.MessageAck, dataOut); - - } + return new JournalQueueAck(); } + + public override byte GetDataStructureType() + { + return JournalQueueAck.ID_JournalQueueAck; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + JournalQueueAck info = (JournalQueueAck)o; + info.Destination = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.MessageAck = (MessageAck) UnmarshalNestedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + JournalQueueAck info = (JournalQueueAck)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1NestedObject(wireFormat, info.Destination, bs); + rc += Marshal1NestedObject(wireFormat, info.MessageAck, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + JournalQueueAck info = (JournalQueueAck)o; + Marshal2NestedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2NestedObject(wireFormat, info.MessageAck, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs index aabdd5a823..513b60aea0 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for JournalTopicAck -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,38 +26,77 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class JournalTopicAckMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for JournalTopicAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTopicAckMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new JournalTopicAck(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - JournalTopicAck info = (JournalTopicAck) command; - info.Destination = ReadDestination(dataIn); - info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); - info.MessageSequenceId = dataIn.ReadInt64(); - info.SubscritionName = dataIn.ReadString(); - info.ClientId = dataIn.ReadString(); - info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - JournalTopicAck info = (JournalTopicAck) command; - WriteDestination(info.Destination, dataOut); - CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut); - dataOut.Write(info.MessageSequenceId); - dataOut.Write(info.SubscritionName); - dataOut.Write(info.ClientId); - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - - } + return new JournalTopicAck(); } + + public override byte GetDataStructureType() + { + return JournalTopicAck.ID_JournalTopicAck; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + JournalTopicAck info = (JournalTopicAck)o; + info.Destination = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.MessageSequenceId = UnmarshalLong(wireFormat, dataIn, bs); + info.SubscritionName = ReadString(dataIn, bs); + info.ClientId = ReadString(dataIn, bs); + info.TransactionId = (TransactionId) UnmarshalNestedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + JournalTopicAck info = (JournalTopicAck)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1NestedObject(wireFormat, info.Destination, bs); + rc += Marshal1NestedObject(wireFormat, info.MessageId, bs); + rc += Marshal1Long(wireFormat, info.MessageSequenceId, bs); + rc += WriteString(info.SubscritionName, bs); + rc += WriteString(info.ClientId, bs); + rc += Marshal1NestedObject(wireFormat, info.TransactionId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + JournalTopicAck info = (JournalTopicAck)o; + Marshal2NestedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs); + Marshal2Long(wireFormat, info.MessageSequenceId, dataOut, bs); + WriteString(info.SubscritionName, dataOut, bs); + WriteString(info.ClientId, dataOut, bs); + Marshal2NestedObject(wireFormat, info.TransactionId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs index c60a9c7dd9..f81bf3c525 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for JournalTrace -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class JournalTraceMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for JournalTrace + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTraceMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new JournalTrace(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - JournalTrace info = (JournalTrace) command; - info.Message = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - JournalTrace info = (JournalTrace) command; - dataOut.Write(info.Message); - - } + return new JournalTrace(); } + + public override byte GetDataStructureType() + { + return JournalTrace.ID_JournalTrace; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + JournalTrace info = (JournalTrace)o; + info.Message = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + JournalTrace info = (JournalTrace)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.Message, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + JournalTrace info = (JournalTrace)o; + WriteString(info.Message, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs index 42b843817c..88f37fb685 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for JournalTransaction -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,67 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class JournalTransactionMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for JournalTransaction + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class JournalTransactionMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new JournalTransaction(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - JournalTransaction info = (JournalTransaction) command; - info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); - info.Type = dataIn.ReadByte(); - info.WasPrepared = dataIn.ReadBoolean(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - JournalTransaction info = (JournalTransaction) command; - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - dataOut.Write(info.Type); - dataOut.Write(info.WasPrepared); - - } + return new JournalTransaction(); } + + public override byte GetDataStructureType() + { + return JournalTransaction.ID_JournalTransaction; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + JournalTransaction info = (JournalTransaction)o; + info.TransactionId = (TransactionId) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.Type = dataIn.ReadByte(); + info.WasPrepared = bs.ReadBoolean(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + JournalTransaction info = (JournalTransaction)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1NestedObject(wireFormat, info.TransactionId, bs); + bs.WriteBoolean(info.WasPrepared); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + JournalTransaction info = (JournalTransaction)o; + Marshal2NestedObject(wireFormat, info.TransactionId, dataOut, bs); + dataOut.Write((byte) info.Type); + bs.ReadBoolean(); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs index 618d83cc6a..31240c33bf 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for KeepAliveInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class KeepAliveInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for KeepAliveInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class KeepAliveInfoMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new KeepAliveInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new KeepAliveInfo(); } + + public override byte GetDataStructureType() + { + return KeepAliveInfo.ID_KeepAliveInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + KeepAliveInfo info = (KeepAliveInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs index 7f563d2779..6c170949a8 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for LocalTransactionId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,30 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class LocalTransactionIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for LocalTransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class LocalTransactionIdMarshaller : TransactionIdMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new LocalTransactionId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - LocalTransactionId info = (LocalTransactionId) command; - info.Value = dataIn.ReadInt64(); - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - LocalTransactionId info = (LocalTransactionId) command; - dataOut.Write(info.Value); - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - - } + return new LocalTransactionId(); } + + public override byte GetDataStructureType() + { + return LocalTransactionId.ID_LocalTransactionId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + LocalTransactionId info = (LocalTransactionId)o; + info.Value = UnmarshalLong(wireFormat, dataIn, bs); + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + LocalTransactionId info = (LocalTransactionId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1Long(wireFormat, info.Value, bs); + rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + LocalTransactionId info = (LocalTransactionId)o; + Marshal2Long(wireFormat, info.Value, dataOut, bs); + Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MarshallerFactory.cs b/openwire-dotnet/src/OpenWire.Client/IO/MarshallerFactory.cs new file mode 100644 index 0000000000..17423627e2 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MarshallerFactory.cs @@ -0,0 +1,91 @@ +// +// +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Marshalling code for Open Wire Format for ExceptionResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class MarshallerFactory + { + public void configure(OpenWireFormat format) + { + + format.addMarshaller(new MessageIdMarshaller()); + format.addMarshaller(new BrokerInfoMarshaller()); + format.addMarshaller(new ActiveMQTempQueueMarshaller()); + format.addMarshaller(new LocalTransactionIdMarshaller()); + format.addMarshaller(new RemoveSubscriptionInfoMarshaller()); + format.addMarshaller(new IntegerResponseMarshaller()); + format.addMarshaller(new ActiveMQQueueMarshaller()); + format.addMarshaller(new DestinationInfoMarshaller()); + format.addMarshaller(new ActiveMQBytesMessageMarshaller()); + format.addMarshaller(new ShutdownInfoMarshaller()); + format.addMarshaller(new DataResponseMarshaller()); + format.addMarshaller(new SessionIdMarshaller()); + format.addMarshaller(new DataArrayResponseMarshaller()); + format.addMarshaller(new JournalQueueAckMarshaller()); + format.addMarshaller(new WireFormatInfoMarshaller()); + format.addMarshaller(new ResponseMarshaller()); + format.addMarshaller(new ConnectionErrorMarshaller()); + format.addMarshaller(new ActiveMQObjectMessageMarshaller()); + format.addMarshaller(new ConsumerInfoMarshaller()); + format.addMarshaller(new ActiveMQTempTopicMarshaller()); + format.addMarshaller(new ConnectionIdMarshaller()); + format.addMarshaller(new DiscoveryEventMarshaller()); + format.addMarshaller(new ConnectionInfoMarshaller()); + format.addMarshaller(new KeepAliveInfoMarshaller()); + format.addMarshaller(new XATransactionIdMarshaller()); + format.addMarshaller(new JournalTraceMarshaller()); + format.addMarshaller(new FlushCommandMarshaller()); + format.addMarshaller(new ConsumerIdMarshaller()); + format.addMarshaller(new JournalTopicAckMarshaller()); + format.addMarshaller(new ActiveMQTextMessageMarshaller()); + format.addMarshaller(new BrokerIdMarshaller()); + format.addMarshaller(new MessageDispatchMarshaller()); + format.addMarshaller(new ProducerInfoMarshaller()); + format.addMarshaller(new SubscriptionInfoMarshaller()); + format.addMarshaller(new ActiveMQMapMessageMarshaller()); + format.addMarshaller(new MessageDispatchNotificationMarshaller()); + format.addMarshaller(new SessionInfoMarshaller()); + format.addMarshaller(new ActiveMQMessageMarshaller()); + format.addMarshaller(new TransactionInfoMarshaller()); + format.addMarshaller(new ActiveMQStreamMessageMarshaller()); + format.addMarshaller(new MessageAckMarshaller()); + format.addMarshaller(new ProducerIdMarshaller()); + format.addMarshaller(new ActiveMQTopicMarshaller()); + format.addMarshaller(new JournalTransactionMarshaller()); + format.addMarshaller(new RemoveInfoMarshaller()); + format.addMarshaller(new ControlCommandMarshaller()); + format.addMarshaller(new ExceptionResponseMarshaller()); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs index eb19e6e932..860a5d3320 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for MessageAck -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,40 +26,78 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class MessageAckMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for MessageAck + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class MessageAckMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new MessageAck(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - MessageAck info = (MessageAck) command; - info.Destination = ReadDestination(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); - info.LastMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); - info.MessageCount = dataIn.ReadInt32(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - MessageAck info = (MessageAck) command; - WriteDestination(info.Destination, dataOut); - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); - dataOut.Write(info.AckType); - CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId, dataOut); - CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.LastMessageId, dataOut); - dataOut.Write(info.MessageCount); - - } + return new MessageAck(); } + + public override byte GetDataStructureType() + { + return MessageAck.ID_MessageAck; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + MessageAck info = (MessageAck)o; + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.AckType = dataIn.ReadByte(); + info.FirstMessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.LastMessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.MessageCount = dataIn.ReadInt32(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + MessageAck info = (MessageAck)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += Marshal1CachedObject(wireFormat, info.TransactionId, bs); + rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs); + rc += Marshal1NestedObject(wireFormat, info.FirstMessageId, bs); + rc += Marshal1NestedObject(wireFormat, info.LastMessageId, bs); + + return rc + 2; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + MessageAck info = (MessageAck)o; + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2CachedObject(wireFormat, info.TransactionId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs); + dataOut.Write((byte) info.AckType); + Marshal2NestedObject(wireFormat, info.FirstMessageId, dataOut, bs); + Marshal2NestedObject(wireFormat, info.LastMessageId, dataOut, bs); + dataOut.Write((int) info.MessageCount); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs index 23e1592424..22c9dc6921 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for MessageDispatch -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,34 +26,70 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class MessageDispatchMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for MessageDispatch + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class MessageDispatchMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new MessageDispatch(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - MessageDispatch info = (MessageDispatch) command; - info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); - info.Destination = ReadDestination(dataIn); - info.Message = (Message) CommandMarshallerRegistry.ReadCommand(dataIn); - info.RedeliveryCounter = dataIn.ReadInt32(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - MessageDispatch info = (MessageDispatch) command; - CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); - WriteDestination(info.Destination, dataOut); - CommandMarshallerRegistry.WriteCommand(info.Message, dataOut); - dataOut.Write(info.RedeliveryCounter); - - } + return new MessageDispatch(); } + + public override byte GetDataStructureType() + { + return MessageDispatch.ID_MessageDispatch; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + MessageDispatch info = (MessageDispatch)o; + info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Message = (Message) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.RedeliveryCounter = dataIn.ReadInt32(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + MessageDispatch info = (MessageDispatch)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += Marshal1NestedObject(wireFormat, info.Message, bs); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + MessageDispatch info = (MessageDispatch)o; + Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2NestedObject(wireFormat, info.Message, dataOut, bs); + dataOut.Write((int) info.RedeliveryCounter); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchNotificationMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchNotificationMarshaller.cs new file mode 100644 index 0000000000..f4d5ecb1d0 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchNotificationMarshaller.cs @@ -0,0 +1,96 @@ +// +// +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + // + // Marshalling code for Open Wire Format for MessageDispatchNotification + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class MessageDispatchNotificationMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() + { + return new MessageDispatchNotification(); + } + + public override byte GetDataStructureType() + { + return MessageDispatchNotification.ID_MessageDispatchNotification; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + MessageDispatchNotification info = (MessageDispatchNotification)o; + info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.DeliverySequenceId = UnmarshalLong(wireFormat, dataIn, bs); + info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + MessageDispatchNotification info = (MessageDispatchNotification)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += Marshal1Long(wireFormat, info.DeliverySequenceId, bs); + rc += Marshal1NestedObject(wireFormat, info.MessageId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + MessageDispatchNotification info = (MessageDispatchNotification)o; + Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2Long(wireFormat, info.DeliverySequenceId, dataOut, bs); + Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs index de1aa7fc8f..8829779977 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for MessageId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,68 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class MessageIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for MessageId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class MessageIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new MessageId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - MessageId info = (MessageId) command; - info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn); - info.ProducerSequenceId = dataIn.ReadInt64(); - info.BrokerSequenceId = dataIn.ReadInt64(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - MessageId info = (MessageId) command; - CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); - dataOut.Write(info.ProducerSequenceId); - dataOut.Write(info.BrokerSequenceId); - - } + return new MessageId(); } + + public override byte GetDataStructureType() + { + return MessageId.ID_MessageId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + MessageId info = (MessageId)o; + info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.ProducerSequenceId = UnmarshalLong(wireFormat, dataIn, bs); + info.BrokerSequenceId = UnmarshalLong(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + MessageId info = (MessageId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs); + rc += Marshal1Long(wireFormat, info.ProducerSequenceId, bs); + rc += Marshal1Long(wireFormat, info.BrokerSequenceId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + MessageId info = (MessageId)o; + Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs); + Marshal2Long(wireFormat, info.ProducerSequenceId, dataOut, bs); + Marshal2Long(wireFormat, info.BrokerSequenceId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs index 678ba78ee4..6fba723892 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for Message -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,72 +26,139 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public abstract class MessageMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for Message + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class MessageMarshaller : BaseCommandMarshaller + { + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { + base.Unmarshal(wireFormat, o, dataIn, bs); + Message info = (Message)o; + info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.OriginalDestination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.OriginalTransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.GroupID = ReadString(dataIn, bs); + info.GroupSequence = dataIn.ReadInt32(); + info.CorrelationId = ReadString(dataIn, bs); + info.Persistent = bs.ReadBoolean(); + info.Expiration = UnmarshalLong(wireFormat, dataIn, bs); + info.Priority = dataIn.ReadByte(); + info.ReplyTo = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.Timestamp = UnmarshalLong(wireFormat, dataIn, bs); + info.Type = ReadString(dataIn, bs); + info.Content = ReadBytes(dataIn, bs.ReadBoolean()); + info.MarshalledProperties = ReadBytes(dataIn, bs.ReadBoolean()); + info.DataStructure = (DataStructure) UnmarshalNestedObject(wireFormat, dataIn, bs); + info.TargetConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Compressed = bs.ReadBoolean(); + info.RedeliveryCounter = dataIn.ReadInt32(); - 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.ReadCommand(dataIn); - info.OriginalDestination = ReadDestination(dataIn); - info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); - info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); - info.GroupID = dataIn.ReadString(); - info.GroupSequence = dataIn.ReadInt32(); - info.CorrelationId = dataIn.ReadString(); - info.Persistent = dataIn.ReadBoolean(); - info.Expiration = dataIn.ReadInt64(); - info.Priority = dataIn.ReadByte(); - info.ReplyTo = ReadDestination(dataIn); - info.Timestamp = dataIn.ReadInt64(); - info.Type = dataIn.ReadString(); - 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(); - info.BrokerPath = ReadBrokerIds(dataIn); - info.Arrival = dataIn.ReadInt64(); - info.UserID = dataIn.ReadString(); - info.RecievedByDFBridge = dataIn.ReadBoolean(); - + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerId[] value = new BrokerId[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.BrokerPath = value; } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - Message info = (Message) command; - CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); - WriteDestination(info.Destination, dataOut); - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - WriteDestination(info.OriginalDestination, dataOut); - CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut); - CommandMarshallerRegistry.WriteCommand(info.OriginalTransactionId, dataOut); - dataOut.Write(info.GroupID); - dataOut.Write(info.GroupSequence); - dataOut.Write(info.CorrelationId); - dataOut.Write(info.Persistent); - dataOut.Write(info.Expiration); - dataOut.Write(info.Priority); - WriteDestination(info.ReplyTo, dataOut); - dataOut.Write(info.Timestamp); - dataOut.Write(info.Type); - 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); - WriteBrokerIds(info.BrokerPath, dataOut); - dataOut.Write(info.Arrival); - dataOut.Write(info.UserID); - dataOut.Write(info.RecievedByDFBridge); - + else { + info.BrokerPath = null; } + info.Arrival = UnmarshalLong(wireFormat, dataIn, bs); + info.UserID = ReadString(dataIn, bs); + info.RecievedByDFBridge = bs.ReadBoolean(); + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + Message info = (Message)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += Marshal1CachedObject(wireFormat, info.TransactionId, bs); + rc += Marshal1CachedObject(wireFormat, info.OriginalDestination, bs); + rc += Marshal1NestedObject(wireFormat, info.MessageId, bs); + rc += Marshal1CachedObject(wireFormat, info.OriginalTransactionId, bs); + rc += WriteString(info.GroupID, bs); + rc += WriteString(info.CorrelationId, bs); + bs.WriteBoolean(info.Persistent); + rc += Marshal1Long(wireFormat, info.Expiration, bs); + rc += Marshal1NestedObject(wireFormat, info.ReplyTo, bs); + rc += Marshal1Long(wireFormat, info.Timestamp, bs); + rc += WriteString(info.Type, bs); + bs.WriteBoolean(info.Content!=null); + rc += info.Content==null ? 0 : info.Content.Length+4; + bs.WriteBoolean(info.MarshalledProperties!=null); + rc += info.MarshalledProperties==null ? 0 : info.MarshalledProperties.Length+4; + rc += Marshal1NestedObject(wireFormat, info.DataStructure, bs); + rc += Marshal1CachedObject(wireFormat, info.TargetConsumerId, bs); + bs.WriteBoolean(info.Compressed); + rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs); + rc += Marshal1Long(wireFormat, info.Arrival, bs); + rc += WriteString(info.UserID, bs); + bs.WriteBoolean(info.RecievedByDFBridge); + + return rc + 3; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + Message info = (Message)o; + Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + Marshal2CachedObject(wireFormat, info.TransactionId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.OriginalDestination, dataOut, bs); + Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.OriginalTransactionId, dataOut, bs); + WriteString(info.GroupID, dataOut, bs); + dataOut.Write((int) info.GroupSequence); + WriteString(info.CorrelationId, dataOut, bs); + bs.ReadBoolean(); + Marshal2Long(wireFormat, info.Expiration, dataOut, bs); + dataOut.Write((byte) info.Priority); + Marshal2NestedObject(wireFormat, info.ReplyTo, dataOut, bs); + Marshal2Long(wireFormat, info.Timestamp, dataOut, bs); + WriteString(info.Type, dataOut, bs); + if(bs.ReadBoolean()) { + dataOut.Write((int)info.Content.Length); + dataOut.Write(info.Content); + } + if(bs.ReadBoolean()) { + dataOut.Write((int)info.MarshalledProperties.Length); + dataOut.Write(info.MarshalledProperties); + } + Marshal2NestedObject(wireFormat, info.DataStructure, dataOut, bs); + Marshal2CachedObject(wireFormat, info.TargetConsumerId, dataOut, bs); + bs.ReadBoolean(); + dataOut.Write((int) info.RedeliveryCounter); + MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs); + Marshal2Long(wireFormat, info.Arrival, dataOut, bs); + WriteString(info.UserID, dataOut, bs); + bs.ReadBoolean(); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs index 0060ebb39a..b75bf022c3 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ProducerId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,68 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ProducerIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ProducerId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ProducerIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ProducerId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ProducerId info = (ProducerId) command; - info.ConnectionId = dataIn.ReadString(); - info.Value = dataIn.ReadInt64(); - info.SessionId = dataIn.ReadInt64(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ProducerId info = (ProducerId) command; - dataOut.Write(info.ConnectionId); - dataOut.Write(info.Value); - dataOut.Write(info.SessionId); - - } + return new ProducerId(); } + + public override byte GetDataStructureType() + { + return ProducerId.ID_ProducerId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ProducerId info = (ProducerId)o; + info.ConnectionId = ReadString(dataIn, bs); + info.Value = UnmarshalLong(wireFormat, dataIn, bs); + info.SessionId = UnmarshalLong(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ProducerId info = (ProducerId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.ConnectionId, bs); + rc += Marshal1Long(wireFormat, info.Value, bs); + rc += Marshal1Long(wireFormat, info.SessionId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ProducerId info = (ProducerId)o; + WriteString(info.ConnectionId, dataOut, bs); + Marshal2Long(wireFormat, info.Value, dataOut, bs); + Marshal2Long(wireFormat, info.SessionId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs index 8645f0bea4..42ce3ce5be 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ProducerInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,79 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ProducerInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ProducerInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ProducerInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ProducerInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - ProducerInfo info = (ProducerInfo) command; - info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn); - info.Destination = ReadDestination(dataIn); - info.BrokerPath = ReadBrokerIds(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - ProducerInfo info = (ProducerInfo) command; - CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); - WriteDestination(info.Destination, dataOut); - WriteBrokerIds(info.BrokerPath, dataOut); - - } + return new ProducerInfo(); } + + public override byte GetDataStructureType() + { + return ProducerInfo.ID_ProducerInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + ProducerInfo info = (ProducerInfo)o; + info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + + if (bs.ReadBoolean()) { + short size = dataIn.ReadInt16(); + BrokerId[] value = new BrokerId[size]; + for( int i=0; i < size; i++ ) { + value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs); + } + info.BrokerPath = value; + } + else { + info.BrokerPath = null; + } + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ProducerInfo info = (ProducerInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + ProducerInfo info = (ProducerInfo)o; + Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs index c285a35506..ee6c9e6161 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for RemoveInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class RemoveInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for RemoveInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class RemoveInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new RemoveInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - RemoveInfo info = (RemoveInfo) command; - info.ObjectId = CommandMarshallerRegistry.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - RemoveInfo info = (RemoveInfo) command; - CommandMarshallerRegistry.WriteCommand((Command) info.ObjectId, dataOut); - - } + return new RemoveInfo(); } + + public override byte GetDataStructureType() + { + return RemoveInfo.ID_RemoveInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + RemoveInfo info = (RemoveInfo)o; + info.ObjectId = (DataStructure) UnmarshalCachedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + RemoveInfo info = (RemoveInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ObjectId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + RemoveInfo info = (RemoveInfo)o; + Marshal2CachedObject(wireFormat, info.ObjectId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs index d4e5779a4e..14dd782428 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for RemoveSubscriptionInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,68 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class RemoveSubscriptionInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for RemoveSubscriptionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class RemoveSubscriptionInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new RemoveSubscriptionInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command; - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - info.SubcriptionName = dataIn.ReadString(); - info.ClientId = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command; - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - dataOut.Write(info.SubcriptionName); - dataOut.Write(info.ClientId); - - } + return new RemoveSubscriptionInfo(); } + + public override byte GetDataStructureType() + { + return RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.SubcriptionName = ReadString(dataIn, bs); + info.ClientId = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs); + rc += WriteString(info.SubcriptionName, bs); + rc += WriteString(info.ClientId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs); + WriteString(info.SubcriptionName, dataOut, bs); + WriteString(info.ClientId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs index de57e629b7..8d8af83d66 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for Response -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,61 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ResponseMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for Response + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ResponseMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new Response(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - Response info = (Response) command; - info.CorrelationId = dataIn.ReadInt16(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - Response info = (Response) command; - dataOut.Write(info.CorrelationId); - - } + return new Response(); } + + public override byte GetDataStructureType() + { + return Response.ID_Response; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + Response info = (Response)o; + info.CorrelationId = dataIn.ReadInt16(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + Response info = (Response)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + Response info = (Response)o; + dataOut.Write((short)info.CorrelationId); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs index 4489ba06dc..3d00c517a9 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SessionId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,30 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class SessionIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for SessionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class SessionIdMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new SessionId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - SessionId info = (SessionId) command; - info.ConnectionId = dataIn.ReadString(); - info.Value = dataIn.ReadInt64(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - SessionId info = (SessionId) command; - dataOut.Write(info.ConnectionId); - dataOut.Write(info.Value); - - } + return new SessionId(); } + + public override byte GetDataStructureType() + { + return SessionId.ID_SessionId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + SessionId info = (SessionId)o; + info.ConnectionId = ReadString(dataIn, bs); + info.Value = UnmarshalLong(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + SessionId info = (SessionId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.ConnectionId, bs); + rc += Marshal1Long(wireFormat, info.Value, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + SessionId info = (SessionId)o; + WriteString(info.ConnectionId, dataOut, bs); + Marshal2Long(wireFormat, info.Value, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs index 98d3eca2f0..896d0ae710 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SessionInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,28 +26,62 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class SessionInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for SessionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class SessionInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new SessionInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - SessionInfo info = (SessionInfo) command; - info.SessionId = (SessionId) CommandMarshallerRegistry.SessionIdMarshaller.ReadCommand(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - SessionInfo info = (SessionInfo) command; - CommandMarshallerRegistry.SessionIdMarshaller.WriteCommand(info.SessionId, dataOut); - - } + return new SessionInfo(); } + + public override byte GetDataStructureType() + { + return SessionInfo.ID_SessionInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + SessionInfo info = (SessionInfo)o; + info.SessionId = (SessionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + SessionInfo info = (SessionInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.SessionId, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + SessionInfo info = (SessionInfo)o; + Marshal2CachedObject(wireFormat, info.SessionId, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs index a3acf8c222..9434b6d5ed 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ShutdownInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,22 +26,55 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class ShutdownInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for ShutdownInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class ShutdownInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new ShutdownInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } + return new ShutdownInfo(); } + + public override byte GetDataStructureType() + { + return ShutdownInfo.ID_ShutdownInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + ShutdownInfo info = (ShutdownInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs index 89ef5c24a2..71e46804ea 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SubscriptionInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,34 +26,71 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class SubscriptionInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for SubscriptionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class SubscriptionInfoMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new SubscriptionInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - SubscriptionInfo info = (SubscriptionInfo) command; - info.ClientId = dataIn.ReadString(); - info.Destination = ReadDestination(dataIn); - info.Selector = dataIn.ReadString(); - info.SubcriptionName = dataIn.ReadString(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - SubscriptionInfo info = (SubscriptionInfo) command; - dataOut.Write(info.ClientId); - WriteDestination(info.Destination, dataOut); - dataOut.Write(info.Selector); - dataOut.Write(info.SubcriptionName); - - } + return new SubscriptionInfo(); } + + public override byte GetDataStructureType() + { + return SubscriptionInfo.ID_SubscriptionInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + SubscriptionInfo info = (SubscriptionInfo)o; + info.ClientId = ReadString(dataIn, bs); + info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Selector = ReadString(dataIn, bs); + info.SubcriptionName = ReadString(dataIn, bs); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + SubscriptionInfo info = (SubscriptionInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += WriteString(info.ClientId, bs); + rc += Marshal1CachedObject(wireFormat, info.Destination, bs); + rc += WriteString(info.Selector, bs); + rc += WriteString(info.SubcriptionName, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + SubscriptionInfo info = (SubscriptionInfo)o; + WriteString(info.ClientId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs); + WriteString(info.Selector, dataOut, bs); + WriteString(info.SubcriptionName, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs index bda7ad6023..da629e1efd 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for TransactionId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,18 +26,44 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public abstract class TransactionIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for TransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public abstract class TransactionIdMarshaller : DataStreamMarshaller + { + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) { + base.Unmarshal(wireFormat, o, dataIn, bs); - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - } } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + TransactionId info = (TransactionId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 0; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs index 3da2386083..3256aceb0a 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for TransactionInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,67 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class TransactionInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for TransactionInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class TransactionInfoMarshaller : BaseCommandMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new TransactionInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - TransactionInfo info = (TransactionInfo) command; - info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); - info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); - info.Type = dataIn.ReadByte(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - TransactionInfo info = (TransactionInfo) command; - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - dataOut.Write(info.Type); - - } + return new TransactionInfo(); } + + public override byte GetDataStructureType() + { + return TransactionInfo.ID_TransactionInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + TransactionInfo info = (TransactionInfo)o; + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Type = dataIn.ReadByte(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + TransactionInfo info = (TransactionInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs); + rc += Marshal1CachedObject(wireFormat, info.TransactionId, bs); + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + TransactionInfo info = (TransactionInfo)o; + Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs); + Marshal2CachedObject(wireFormat, info.TransactionId, dataOut, bs); + dataOut.Write((byte) info.Type); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs index bbbf550551..2e1fa8cd77 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for WireFormatInfo -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,65 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class WireFormatInfoMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for WireFormatInfo + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class WireFormatInfoMarshaller : DataStreamMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new WireFormatInfo(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - WireFormatInfo info = (WireFormatInfo) command; - info.Magic = ReadBytes(dataIn); - info.Version = dataIn.ReadInt32(); - info.Options = dataIn.ReadInt32(); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - WireFormatInfo info = (WireFormatInfo) command; - WriteBytes(info.Magic, dataOut); - dataOut.Write(info.Version); - dataOut.Write(info.Options); - - } + return new WireFormatInfo(); } + + public override byte GetDataStructureType() + { + return WireFormatInfo.ID_WireFormatInfo; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + WireFormatInfo info = (WireFormatInfo)o; + info.Magic = ReadBytes(dataIn, 8); + info.Version = dataIn.ReadInt32(); + info.Options = dataIn.ReadInt32(); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + WireFormatInfo info = (WireFormatInfo)o; + + int rc = base.Marshal1(wireFormat, info, bs); + + return rc + 10; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + WireFormatInfo info = (WireFormatInfo)o; + dataOut.Write(info.Magic, 0, 8); + dataOut.Write((int) info.Version); + dataOut.Write((int) info.Options); + + } + } } diff --git a/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs index 154793b933..c7cb793077 100644 --- a/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs +++ b/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for XATransactionId -// // -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module +// Copyright 2005-2006 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // using System; @@ -18,32 +26,75 @@ using OpenWire.Client.IO; namespace OpenWire.Client.IO { - public class XATransactionIdMarshaller : AbstractCommandMarshaller + // + // Marshalling code for Open Wire Format for XATransactionId + // + // + // NOTE!: This file is autogenerated - do not modify! + // if you need to make a change, please see the Groovy scripts in the + // activemq-core module + // + public class XATransactionIdMarshaller : TransactionIdMarshaller + { + + + public override DataStructure CreateObject() { - - - public override Command CreateCommand() { - return new XATransactionId(); - } - - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - - XATransactionId info = (XATransactionId) command; - info.FormatId = dataIn.ReadInt32(); - info.GlobalTransactionId = ReadBytes(dataIn); - info.BranchQualifier = ReadBytes(dataIn); - - } - - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); - - XATransactionId info = (XATransactionId) command; - dataOut.Write(info.FormatId); - WriteBytes(info.GlobalTransactionId, dataOut); - WriteBytes(info.BranchQualifier, dataOut); - - } + return new XATransactionId(); } + + public override byte GetDataStructureType() + { + return XATransactionId.ID_XATransactionId; + } + + // + // Un-marshal an object instance from the data input stream + // + public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) + { + base.Unmarshal(wireFormat, o, dataIn, bs); + + XATransactionId info = (XATransactionId)o; + info.FormatId = dataIn.ReadInt32(); + info.GlobalTransactionId = ReadBytes(dataIn, bs.ReadBoolean()); + info.BranchQualifier = ReadBytes(dataIn, bs.ReadBoolean()); + + } + + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + XATransactionId info = (XATransactionId)o; + + int rc = base.Marshal1(wireFormat, info, bs); + bs.WriteBoolean(info.GlobalTransactionId!=null); + rc += info.GlobalTransactionId==null ? 0 : info.GlobalTransactionId.Length+4; + bs.WriteBoolean(info.BranchQualifier!=null); + rc += info.BranchQualifier==null ? 0 : info.BranchQualifier.Length+4; + + return rc + 1; + } + + // + // Write a object instance to data output stream + // + public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) { + base.Marshal2(wireFormat, o, dataOut, bs); + + XATransactionId info = (XATransactionId)o; + dataOut.Write((int) info.FormatId); + if(bs.ReadBoolean()) { + dataOut.Write((int)info.GlobalTransactionId.Length); + dataOut.Write(info.GlobalTransactionId); + } + if(bs.ReadBoolean()) { + dataOut.Write((int)info.BranchQualifier.Length); + dataOut.Write(info.BranchQualifier); + } + + } + } }