Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 26966 invoked from network); 22 Feb 2006 17:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Feb 2006 17:46:16 -0000 Received: (qmail 38450 invoked by uid 500); 22 Feb 2006 17:46:16 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 38436 invoked by uid 500); 22 Feb 2006 17:46:15 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 38419 invoked by uid 99); 22 Feb 2006 17:46:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2006 09:46:15 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 22 Feb 2006 09:46:11 -0800 Received: (qmail 26776 invoked by uid 65534); 22 Feb 2006 17:45:50 -0000 Message-ID: <20060222174550.26775.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r379827 [5/5] - in /incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client: Commands/ Core/ IO/ Date: Wed, 22 Feb 2006 17:45:20 -0000 To: activemq-commits@geronimo.apache.org From: jstrachan@apache.org X-Mailer: svnmailer-1.0.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SessionId // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + return new SessionId(); + } + public override byte GetDataStructureType() + { + return SessionId.ID_SessionId; + } - public override Command CreateCommand() { - return new 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); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + SessionId info = (SessionId)o; + info.ConnectionId = ReadString(dataIn, bs); + info.Value = UnmarshalLong(wireFormat, dataIn, bs); - SessionId info = (SessionId) command; - info.ConnectionId = dataIn.ReadString(); - info.Value = dataIn.ReadInt64(); + } - } - 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) { + 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; + } - SessionId info = (SessionId) command; - dataOut.Write(info.ConnectionId); - dataOut.Write(info.Value); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SessionInfo // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + 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); + + } - public override Command CreateCommand() { - return new SessionInfo(); - } - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + SessionInfo info = (SessionInfo)o; - SessionInfo info = (SessionInfo) command; - info.SessionId = (SessionId) CommandMarshallerRegistry.SessionIdMarshaller.ReadCommand(dataIn); + int rc = base.Marshal1(wireFormat, info, bs); + rc += Marshal1CachedObject(wireFormat, info.SessionId, bs); - } + return rc + 0; + } - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); + // + // 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) command; - CommandMarshallerRegistry.SessionIdMarshaller.WriteCommand(info.SessionId, dataOut); + SessionInfo info = (SessionInfo)o; + Marshal2CachedObject(wireFormat, info.SessionId, dataOut, bs); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for ShutdownInfo // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + return new ShutdownInfo(); + } + public override byte GetDataStructureType() + { + return ShutdownInfo.ID_ShutdownInfo; + } - public override Command CreateCommand() { - return new 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); + + } - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); - } + // + // 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; + } - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for SubscriptionInfo // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() + { + 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; + } - 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); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for TransactionId // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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); + + } + + // + // Write the booleans that this object uses to a BooleanStream + // + public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { + TransactionId info = (TransactionId)o; - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + int rc = base.Marshal1(wireFormat, info, bs); - } + return rc + 0; + } - public override void WriteCommand(Command command, BinaryWriter dataOut) { - base.WriteCommand(command, dataOut); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for TransactionInfo // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + return new TransactionInfo(); + } + public override byte GetDataStructureType() + { + return TransactionInfo.ID_TransactionInfo; + } - public override Command CreateCommand() { - return new 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); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + TransactionInfo info = (TransactionInfo)o; + info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs); + info.Type = dataIn.ReadByte(); - 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); + // + // 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; + } - TransactionInfo info = (TransactionInfo) command; - CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); - CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); - dataOut.Write(info.Type); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for WireFormatInfo // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + return new WireFormatInfo(); + } + public override byte GetDataStructureType() + { + return WireFormatInfo.ID_WireFormatInfo; + } - public override Command CreateCommand() { - return new 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); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + WireFormatInfo info = (WireFormatInfo)o; + info.Magic = ReadBytes(dataIn, 8); + info.Version = dataIn.ReadInt32(); + info.Options = dataIn.ReadInt32(); - 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); + // + // 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; + } - WireFormatInfo info = (WireFormatInfo) command; - WriteBytes(info.Magic, dataOut); - dataOut.Write(info.Version); - dataOut.Write(info.Options); + // + // 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); - } } + } } Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs?rev=379827&r1=379826&r2=379827&view=diff ============================================================================== --- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs (original) +++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs Wed Feb 22 09:45:12 2006 @@ -1,10 +1,18 @@ // -// Marshalling code for Open Wire Format for XATransactionId // +// Copyright 2005-2006 The Apache Software Foundation // -// 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 +// 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 @@ 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() { + return new XATransactionId(); + } + public override byte GetDataStructureType() + { + return XATransactionId.ID_XATransactionId; + } - public override Command CreateCommand() { - return new 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); - public override void BuildCommand(Command command, BinaryReader dataIn) { - base.BuildCommand(command, dataIn); + XATransactionId info = (XATransactionId)o; + info.FormatId = dataIn.ReadInt32(); + info.GlobalTransactionId = ReadBytes(dataIn, bs.ReadBoolean()); + info.BranchQualifier = ReadBytes(dataIn, bs.ReadBoolean()); - 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); + // + // 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; - XATransactionId info = (XATransactionId) command; - dataOut.Write(info.FormatId); - WriteBytes(info.GlobalTransactionId, dataOut); - WriteBytes(info.BranchQualifier, dataOut); + 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); } + } + } }