You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/07/24 16:23:09 UTC
[20/51] [partial] https://issues.apache.org/jira/browse/OPENWIRE-1
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempQueueMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempQueueMarshaller.java
new file mode 100644
index 0000000..80616fe
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempQueueMarshaller.java
@@ -0,0 +1,108 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireTempQueue;
+
+public class OpenWireTempQueueMarshaller extends OpenWireTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return OpenWireTempQueue.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new OpenWireTempQueue();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempTopicMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempTopicMarshaller.java
new file mode 100644
index 0000000..e7e34d3
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTempTopicMarshaller.java
@@ -0,0 +1,108 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireTempTopic;
+
+public class OpenWireTempTopicMarshaller extends OpenWireTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return OpenWireTempTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new OpenWireTempTopic();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTextMessageMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTextMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTextMessageMarshaller.java
new file mode 100644
index 0000000..0a5543f
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTextMessageMarshaller.java
@@ -0,0 +1,108 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireTextMessage;
+
+public class OpenWireTextMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return OpenWireTextMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new OpenWireTextMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTopicMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTopicMarshaller.java
new file mode 100644
index 0000000..67d2b37
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/OpenWireTopicMarshaller.java
@@ -0,0 +1,108 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireTopic;
+
+public class OpenWireTopicMarshaller extends OpenWireDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return OpenWireTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new OpenWireTopic();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/PartialCommandMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/PartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/PartialCommandMarshaller.java
new file mode 100644
index 0000000..452bbab
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/PartialCommandMarshaller.java
@@ -0,0 +1,128 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BaseDataStreamMarshaller;
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.PartialCommand;
+
+public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return PartialCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new PartialCommand();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ PartialCommand info = (PartialCommand) o;
+ info.setCommandId(dataIn.readInt());
+ info.setData(tightUnmarshalByteArray(dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ PartialCommand info = (PartialCommand) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalByteArray1(info.getData(), bs);
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ PartialCommand info = (PartialCommand) o;
+ dataOut.writeInt(info.getCommandId());
+ tightMarshalByteArray2(info.getData(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ PartialCommand info = (PartialCommand) o;
+ info.setCommandId(dataIn.readInt());
+ info.setData(looseUnmarshalByteArray(dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ PartialCommand info = (PartialCommand) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ dataOut.writeInt(info.getCommandId());
+ looseMarshalByteArray(wireFormat, info.getData(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerAckMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerAckMarshaller.java
new file mode 100644
index 0000000..af280f6
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerAckMarshaller.java
@@ -0,0 +1,128 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.ProducerAck;
+import org.apache.activemq.openwire.commands.ProducerId;
+
+public class ProducerAckMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return ProducerAck.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new ProducerAck();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ ProducerAck info = (ProducerAck) o;
+ info.setProducerId((ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setSize(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ ProducerAck info = (ProducerAck) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getProducerId(), bs);
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ ProducerAck info = (ProducerAck) o;
+ tightMarshalNestedObject2(wireFormat, info.getProducerId(), dataOut, bs);
+ dataOut.writeInt(info.getSize());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ProducerAck info = (ProducerAck) o;
+ info.setProducerId((ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setSize(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ ProducerAck info = (ProducerAck) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalNestedObject(wireFormat, info.getProducerId(), dataOut);
+ dataOut.writeInt(info.getSize());
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerIdMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerIdMarshaller.java
new file mode 100644
index 0000000..b07d6df
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerIdMarshaller.java
@@ -0,0 +1,134 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BaseDataStreamMarshaller;
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.ProducerId;
+
+public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return ProducerId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new ProducerId();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ ProducerId info = (ProducerId) o;
+ info.setConnectionId(tightUnmarshalString(dataIn, bs));
+ info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ ProducerId info = (ProducerId) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getConnectionId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ ProducerId info = (ProducerId) o;
+ tightMarshalString2(info.getConnectionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ProducerId info = (ProducerId) o;
+ info.setConnectionId(looseUnmarshalString(dataIn));
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ ProducerId info = (ProducerId) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getConnectionId(), dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), dataOut);
+ looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerInfoMarshaller.java
new file mode 100644
index 0000000..5dfb8d7
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ProducerInfoMarshaller.java
@@ -0,0 +1,165 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.BrokerId;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireDestination;
+import org.apache.activemq.openwire.commands.ProducerId;
+import org.apache.activemq.openwire.commands.ProducerInfo;
+
+public class ProducerInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return ProducerInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new ProducerInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ ProducerInfo info = (ProducerInfo) o;
+ info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ info.setDispatchAsync(bs.readBoolean());
+ info.setWindowSize(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ ProducerInfo info = (ProducerInfo) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getProducerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ bs.writeBoolean(info.isDispatchAsync());
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ ProducerInfo info = (ProducerInfo) o;
+ tightMarshalCachedObject2(wireFormat, info.getProducerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ bs.readBoolean();
+ dataOut.writeInt(info.getWindowSize());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ProducerInfo info = (ProducerInfo) o;
+ info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) looseUnmarsalNestedObject(wireFormat, dataIn);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ info.setDispatchAsync(dataIn.readBoolean());
+ info.setWindowSize(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ ProducerInfo info = (ProducerInfo) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getProducerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ dataOut.writeBoolean(info.isDispatchAsync());
+ dataOut.writeInt(info.getWindowSize());
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveInfoMarshaller.java
new file mode 100644
index 0000000..bb9b597
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveInfoMarshaller.java
@@ -0,0 +1,123 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.RemoveInfo;
+
+public class RemoveInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return RemoveInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new RemoveInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ RemoveInfo info = (RemoveInfo) o;
+ info.setObjectId(tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ RemoveInfo info = (RemoveInfo) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getObjectId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ RemoveInfo info = (RemoveInfo) o;
+ tightMarshalCachedObject2(wireFormat, info.getObjectId(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ RemoveInfo info = (RemoveInfo) o;
+ info.setObjectId(looseUnmarsalCachedObject(wireFormat, dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ RemoveInfo info = (RemoveInfo) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getObjectId(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveSubscriptionInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveSubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveSubscriptionInfoMarshaller.java
new file mode 100644
index 0000000..7dde0fe
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/RemoveSubscriptionInfoMarshaller.java
@@ -0,0 +1,135 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.ConnectionId;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.RemoveSubscriptionInfo;
+
+public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new RemoveSubscriptionInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o;
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConnectionId(), bs);
+ rc += tightMarshalString1(info.getSubcriptionName(), bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o;
+ tightMarshalCachedObject2(wireFormat, info.getConnectionId(), dataOut, bs);
+ tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o;
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setSubcriptionName(looseUnmarshalString(dataIn));
+ info.setClientId(looseUnmarshalString(dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConnectionId(), dataOut);
+ looseMarshalString(info.getSubcriptionName(), dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ReplayCommandMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ReplayCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ReplayCommandMarshaller.java
new file mode 100644
index 0000000..409fdce
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ReplayCommandMarshaller.java
@@ -0,0 +1,123 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.ReplayCommand;
+
+public class ReplayCommandMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return ReplayCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new ReplayCommand();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ ReplayCommand info = (ReplayCommand) o;
+ info.setFirstNakNumber(dataIn.readInt());
+ info.setLastNakNumber(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ return rc + 8;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ ReplayCommand info = (ReplayCommand) o;
+ dataOut.writeInt(info.getFirstNakNumber());
+ dataOut.writeInt(info.getLastNakNumber());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ReplayCommand info = (ReplayCommand) o;
+ info.setFirstNakNumber(dataIn.readInt());
+ info.setLastNakNumber(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ ReplayCommand info = (ReplayCommand) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ dataOut.writeInt(info.getFirstNakNumber());
+ dataOut.writeInt(info.getLastNakNumber());
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ResponseMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ResponseMarshaller.java
new file mode 100644
index 0000000..a1da21a
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ResponseMarshaller.java
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.Response;
+
+public class ResponseMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return Response.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new Response();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ Response info = (Response) o;
+ info.setCorrelationId(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ Response info = (Response) o;
+ dataOut.writeInt(info.getCorrelationId());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ Response info = (Response) o;
+ info.setCorrelationId(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ Response info = (Response) o;
+ super.looseMarshal(wireFormat, o, dataOut);
+ dataOut.writeInt(info.getCorrelationId());
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionIdMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionIdMarshaller.java
new file mode 100644
index 0000000..87cc76a
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionIdMarshaller.java
@@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BaseDataStreamMarshaller;
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.SessionId;
+
+public class SessionIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return SessionId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new SessionId();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ SessionId info = (SessionId) o;
+ info.setConnectionId(tightUnmarshalString(dataIn, bs));
+ info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ SessionId info = (SessionId) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getConnectionId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ SessionId info = (SessionId) o;
+ tightMarshalString2(info.getConnectionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ SessionId info = (SessionId) o;
+ info.setConnectionId(looseUnmarshalString(dataIn));
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ SessionId info = (SessionId) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getConnectionId(), dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionInfoMarshaller.java
new file mode 100644
index 0000000..db921c5
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SessionInfoMarshaller.java
@@ -0,0 +1,124 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.SessionId;
+import org.apache.activemq.openwire.commands.SessionInfo;
+
+public class SessionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return SessionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new SessionInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ SessionInfo info = (SessionInfo) o;
+ info.setSessionId((SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ SessionInfo info = (SessionInfo) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getSessionId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ SessionInfo info = (SessionInfo) o;
+ tightMarshalCachedObject2(wireFormat, info.getSessionId(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ SessionInfo info = (SessionInfo) o;
+ info.setSessionId((SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ SessionInfo info = (SessionInfo) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getSessionId(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ShutdownInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ShutdownInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ShutdownInfoMarshaller.java
new file mode 100644
index 0000000..2b7c601
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/ShutdownInfoMarshaller.java
@@ -0,0 +1,107 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.ShutdownInfo;
+
+public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return ShutdownInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new ShutdownInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SubscriptionInfoMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SubscriptionInfoMarshaller.java
new file mode 100644
index 0000000..1eb64b7
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/SubscriptionInfoMarshaller.java
@@ -0,0 +1,145 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BaseDataStreamMarshaller;
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+import org.apache.activemq.openwire.commands.DataStructure;
+import org.apache.activemq.openwire.commands.OpenWireDestination;
+import org.apache.activemq.openwire.commands.SubscriptionInfo;
+
+public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ *
+ * @return short representation of the type data structure
+ */
+ @Override
+ public byte getDataStructureType() {
+ return SubscriptionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ @Override
+ public DataStructure createObject() {
+ return new SubscriptionInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ SubscriptionInfo info = (SubscriptionInfo) o;
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setSelector(tightUnmarshalString(dataIn, bs));
+ info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
+ info.setSubscribedDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ SubscriptionInfo info = (SubscriptionInfo) o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalString1(info.getSelector(), bs);
+ rc += tightMarshalString1(info.getSubcriptionName(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getSubscribedDestination(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ SubscriptionInfo info = (SubscriptionInfo) o;
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalString2(info.getSelector(), dataOut, bs);
+ tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getSubscribedDestination(), dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ SubscriptionInfo info = (SubscriptionInfo) o;
+ info.setClientId(looseUnmarshalString(dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setSelector(looseUnmarshalString(dataIn));
+ info.setSubcriptionName(looseUnmarshalString(dataIn));
+ info.setSubscribedDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ SubscriptionInfo info = (SubscriptionInfo) o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalString(info.getSelector(), dataOut);
+ looseMarshalString(info.getSubcriptionName(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getSubscribedDestination(), dataOut);
+ }
+}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/7ae454fa/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/TransactionIdMarshaller.java
----------------------------------------------------------------------
diff --git a/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/TransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/TransactionIdMarshaller.java
new file mode 100644
index 0000000..feadb29
--- /dev/null
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v3/TransactionIdMarshaller.java
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+package org.apache.activemq.openwire.codec.v3;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.BaseDataStreamMarshaller;
+import org.apache.activemq.openwire.codec.BooleanStream;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+
+public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o
+ * the instance to be marshaled
+ * @param dataOut
+ * the output stream
+ * @throws IOException
+ * thrown if an error occurs
+ */
+ @Override
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o
+ * the object to un-marshal
+ * @param dataIn
+ * the data input stream to build the object from
+ * @throws IOException
+ */
+ @Override
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ @Override
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, o, dataOut);
+ }
+}