You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/03/10 20:07:58 UTC

svn commit: r384897 - in /incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ: Commands/LastPartialCommand.cs Commands/PartialCommand.cs OpenWire/V1/LastPartialCommandMarshaller.cs OpenWire/V1/PartialCommandMarshaller.cs

Author: jstrachan
Date: Fri Mar 10 11:07:57 2006
New Revision: 384897

URL: http://svn.apache.org/viewcvs?rev=384897&view=rev
Log:
Refactored the PartialCommand to make it simpler and make LastPartialCommand not contain binary data

Modified:
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/LastPartialCommand.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/PartialCommand.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/LastPartialCommandMarshaller.cs
    incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/PartialCommandMarshaller.cs

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/LastPartialCommand.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/LastPartialCommand.cs?rev=384897&r1=384896&r2=384897&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/LastPartialCommand.cs (original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/LastPartialCommand.cs Fri Mar 10 11:07:57 2006
@@ -1 +1 @@
-/*
* 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.
*/

//
//  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
//

using System;
using System.Collections;

using ActiveMQ.OpenWire;
using ActiveMQ.Commands;

namespace ActiveMQ.Commands
{
	/// <summary>
    ///  The ActiveMQ LastPartialCommand Com
 mand
	/// </summary>
    public class LastPartialCommand : PartialCommand
    {
        public const byte ID_LastPartialCommand = 61;
    			

		public override string ToString() {
            return GetType().Name + "["
                + " ]";

		}
	


        public override byte GetDataStructureType() {
            return ID_LastPartialCommand;
        }


        // Properties

    }
}
\ No newline at end of file
+/*
* 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.
*/

//
//  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
//

using System;
using System.Collections;

using ActiveMQ.OpenWire;
using ActiveMQ.Commands;

namespace ActiveMQ.Commands
{
	/// <summary>
    ///  The ActiveMQ LastPartialCommand Com
 mand
	/// </summary>
    public class LastPartialCommand : BaseCommand
    {
        public const byte ID_LastPartialCommand = 61;
    			

		public override string ToString() {
            return GetType().Name + "["
                + " ]";

		}
	


        public override byte GetDataStructureType() {
            return ID_LastPartialCommand;
        }


        // Properties

    }
}
\ No newline at end of file

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/PartialCommand.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/PartialCommand.cs?rev=384897&r1=384896&r2=384897&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/PartialCommand.cs (original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/Commands/PartialCommand.cs Fri Mar 10 11:07:57 2006
@@ -1 +1 @@
-/*
* 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.
*/

//
//  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
//

using System;
using System.Collections;

using ActiveMQ.OpenWire;
using ActiveMQ.Commands;

namespace ActiveMQ.Commands
{
	/// <summary>
    ///  The ActiveMQ PartialCommand Command
 
	/// </summary>
    public class PartialCommand : BaseCommand
    {
        public const byte ID_PartialCommand = 60;
    			
        byte[] data;

		public override string ToString() {
            return GetType().Name + "["
                + " Data=" + Data
                + " ]";

		}
	


        public override byte GetDataStructureType() {
            return ID_PartialCommand;
        }


        // Properties

        public byte[] Data
        {
            get { return data; }
            set { this.data = value; }            
        }

    }
}
\ No newline at end of file
+/*
* 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.
*/

//
//  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
//

using System;
using System.Collections;

using ActiveMQ.OpenWire;
using ActiveMQ.Commands;

namespace ActiveMQ.Commands
{
	/// <summary>
    ///  The ActiveMQ PartialCommand Command
 
	/// </summary>
    public class PartialCommand : AbstractCommand, Command
    {
        public const byte ID_PartialCommand = 60;
    			
        int commandId;
        byte[] data;

		public override string ToString() {
            return GetType().Name + "["
                + " CommandId=" + CommandId
                + " Data=" + Data
                + " ]";

		}
	


        public override byte GetDataStructureType() {
            return ID_PartialCommand;
        }


        // Properties

        public int CommandId
        {
            get { return commandId; }
            set { this.commandId = value; }            
        }

        public byte[] Data
        {
            get { return data; }
            set { this.data = value; }            
        }

    }
}
\ No newline at end of file

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/LastPartialCommandMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/LastPartialCommandMarshaller.cs?rev=384897&r1=384896&r2=384897&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/LastPartialCommandMarshaller.cs (original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/LastPartialCommandMarshaller.cs Fri Mar 10 11:07:57 2006
@@ -1 +1 @@
-/*
* 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.
*/

//
// 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
//

using System;
using System.Collections;
using System.IO;

using ActiveMQ.Commands;
using ActiveMQ.OpenWire;
using ActiveMQ.OpenWire.V1;

namespace ActiveMQ.OpenWire.V1
{
  /// <summary
 >
  ///  Marshalling code for Open Wire Format for LastPartialCommand
  /// </summary>
  class LastPartialCommandMarshaller : PartialCommandMarshaller
  {


    public override DataStructure CreateObject() 
    {
        return new LastPartialCommand();
    }

    public override byte GetDataStructureType() 
    {
        return LastPartialCommand.ID_LastPartialCommand;
    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) 
    {
        base.TightUnmarshal(wireFormat, o, dataIn, bs);

    }

    //
    // Write the booleans that this object uses to a BooleanStream
    //
    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
        LastPartialCommand info = (LastPartialCommand)o;

        int rc = base.TightMarshal1(wireFormat, info, bs);

        return rc + 0;
    }

    // 
    // Wri
 te a object instance to data output stream
    //
    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
        base.TightMarshal2(wireFormat, o, dataOut, bs);

    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) 
    {
        base.LooseUnmarshal(wireFormat, o, dataIn);

    }

    // 
    // Write a object instance to data output stream
    //
    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {

        base.LooseMarshal(wireFormat, o, dataOut);

    }
    
  }
}
\ No newline at end of file
+/*
* 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.
*/

//
// 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
//

using System;
using System.Collections;
using System.IO;

using ActiveMQ.Commands;
using ActiveMQ.OpenWire;
using ActiveMQ.OpenWire.V1;

namespace ActiveMQ.OpenWire.V1
{
  /// <summary
 >
  ///  Marshalling code for Open Wire Format for LastPartialCommand
  /// </summary>
  class LastPartialCommandMarshaller : BaseCommandMarshaller
  {


    public override DataStructure CreateObject() 
    {
        return new LastPartialCommand();
    }

    public override byte GetDataStructureType() 
    {
        return LastPartialCommand.ID_LastPartialCommand;
    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) 
    {
        base.TightUnmarshal(wireFormat, o, dataIn, bs);

    }

    //
    // Write the booleans that this object uses to a BooleanStream
    //
    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
        LastPartialCommand info = (LastPartialCommand)o;

        int rc = base.TightMarshal1(wireFormat, info, bs);

        return rc + 0;
    }

    // 
    // Write 
 a object instance to data output stream
    //
    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
        base.TightMarshal2(wireFormat, o, dataOut, bs);

    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) 
    {
        base.LooseUnmarshal(wireFormat, o, dataIn);

    }

    // 
    // Write a object instance to data output stream
    //
    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {

        base.LooseMarshal(wireFormat, o, dataOut);

    }
    
  }
}
\ No newline at end of file

Modified: incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/PartialCommandMarshaller.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/PartialCommandMarshaller.cs?rev=384897&r1=384896&r2=384897&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/PartialCommandMarshaller.cs (original)
+++ incubator/activemq/trunk/activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V1/PartialCommandMarshaller.cs Fri Mar 10 11:07:57 2006
@@ -1 +1 @@
-/*
* 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.
*/

//
// 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
//

using System;
using System.Collections;
using System.IO;

using ActiveMQ.Commands;
using ActiveMQ.OpenWire;
using ActiveMQ.OpenWire.V1;

namespace ActiveMQ.OpenWire.V1
{
  /// <summary
 >
  ///  Marshalling code for Open Wire Format for PartialCommand
  /// </summary>
  class PartialCommandMarshaller : BaseCommandMarshaller
  {


    public override DataStructure CreateObject() 
    {
        return new PartialCommand();
    }

    public override byte GetDataStructureType() 
    {
        return PartialCommand.ID_PartialCommand;
    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) 
    {
        base.TightUnmarshal(wireFormat, o, dataIn, bs);

        PartialCommand info = (PartialCommand)o;
        info.Data = ReadBytes(dataIn, bs.ReadBoolean());

    }

    //
    // Write the booleans that this object uses to a BooleanStream
    //
    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
        PartialCommand info = (PartialCommand)o;

        int rc = base.TightMarsh
 al1(wireFormat, info, bs);
        bs.WriteBoolean(info.Data!=null);
        rc += info.Data==null ? 0 : info.Data.Length+4;

        return rc + 0;
    }

    // 
    // Write a object instance to data output stream
    //
    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
        base.TightMarshal2(wireFormat, o, dataOut, bs);

        PartialCommand info = (PartialCommand)o;
        if(bs.ReadBoolean()) {
           dataOut.Write(info.Data.Length);
           dataOut.Write(info.Data);
        }

    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) 
    {
        base.LooseUnmarshal(wireFormat, o, dataIn);

        PartialCommand info = (PartialCommand)o;
        info.Data = ReadBytes(dataIn, dataIn.ReadBoolean());

    }

    // 
    // Write a object instance to data output s
 tream
    //
    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {

        PartialCommand info = (PartialCommand)o;

        base.LooseMarshal(wireFormat, o, dataOut);
        dataOut.Write(info.Data!=null);
        if(info.Data!=null) {
           dataOut.Write(info.Data.Length);
           dataOut.Write(info.Data);
        }

    }
    
  }
}
\ No newline at end of file
+/*
* 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.
*/

//
// 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
//

using System;
using System.Collections;
using System.IO;

using ActiveMQ.Commands;
using ActiveMQ.OpenWire;
using ActiveMQ.OpenWire.V1;

namespace ActiveMQ.OpenWire.V1
{
  /// <summary
 >
  ///  Marshalling code for Open Wire Format for PartialCommand
  /// </summary>
  class PartialCommandMarshaller : BaseDataStreamMarshaller
  {


    public override DataStructure CreateObject() 
    {
        return new PartialCommand();
    }

    public override byte GetDataStructureType() 
    {
        return PartialCommand.ID_PartialCommand;
    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void TightUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs) 
    {
        base.TightUnmarshal(wireFormat, o, dataIn, bs);

        PartialCommand info = (PartialCommand)o;
        info.CommandId = dataIn.ReadInt32();
        info.Data = ReadBytes(dataIn, bs.ReadBoolean());

    }

    //
    // Write the booleans that this object uses to a BooleanStream
    //
    public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
        PartialCommand info = (Par
 tialCommand)o;

        int rc = base.TightMarshal1(wireFormat, info, bs);
        bs.WriteBoolean(info.Data!=null);
        rc += info.Data==null ? 0 : info.Data.Length+4;

        return rc + 4;
    }

    // 
    // Write a object instance to data output stream
    //
    public override void TightMarshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
        base.TightMarshal2(wireFormat, o, dataOut, bs);

        PartialCommand info = (PartialCommand)o;
        dataOut.Write(info.CommandId);
        if(bs.ReadBoolean()) {
           dataOut.Write(info.Data.Length);
           dataOut.Write(info.Data);
        }

    }

    // 
    // Un-marshal an object instance from the data input stream
    // 
    public override void LooseUnmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn) 
    {
        base.LooseUnmarshal(wireFormat, o, dataIn);

        PartialCommand info = (PartialCommand)o;
        info.CommandId = dataIn.ReadI
 nt32();
        info.Data = ReadBytes(dataIn, dataIn.ReadBoolean());

    }

    // 
    // Write a object instance to data output stream
    //
    public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) {

        PartialCommand info = (PartialCommand)o;

        base.LooseMarshal(wireFormat, o, dataOut);
        dataOut.Write(info.CommandId);
        dataOut.Write(info.Data!=null);
        if(info.Data!=null) {
           dataOut.Write(info.Data.Length);
           dataOut.Write(info.Data);
        }

    }
    
  }
}
\ No newline at end of file