Refactored the PartialCommand to make it simpler and make LastPartialCommand not contain binary data

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-10 19:07:57 +00:00
parent 21798b65c8
commit eb16cdb0ec
4 changed files with 4 additions and 4 deletions

View File

@ -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 Command /// </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 } }
/* * 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 Command /// </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 } }

View File

@ -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; } BaseCommand public byte[] Data { get { return data; } set { this.data = value; } } } }
/* * 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 override string ToString() { { 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; } } } }

View File

@ -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; } // // 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); } } }
/* * 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); } } }

View File

@ -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.TightMarshal1(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; { } // // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { PartialCommand info = (PartialCommand)o; public override DataStructure CreateObject() ); dataOut.Write(info.Data!=null); if(info.Data!=null) { dataOut.Write(info.Data.Length); dataOut.Write(info.Data); } } } }
/* * 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 = (PartialCommand)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; return new PartialCommand(); { } // // Write a object instance to data output stream // public override void LooseMarshal(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut) { PartialCommand info = (PartialCommand)o; return PartialCommand.ID_PartialCommand; public override DataStructure CreateObject() ); dataOut.Write(info.Data!=null); if(info.Data!=null) { dataOut.Write(info.Data.Length); dataOut.Write(info.Data); } } } }