[continued from previous message]
+ info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setCompressed(dataIn.readBoolean());
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v10/PartialCommandMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v10/PartialCommandMarshaller.java
+@@ -67,7 +67,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(tightUnmarshalByteArray(dataIn, bs));
++ info.setData(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -113,7 +113,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(looseUnmarshalByteArray(dataIn));
++ info.setData(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v10/WireFormatInfoMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v10/WireFormatInfoMarshaller.java
+@@ -71,7 +71,7 @@
+
+ info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+
+ info.afterUnmarshall(wireFormat);
+
+@@ -129,7 +129,7 @@
+
+ info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+
+ info.afterUnmarshall(wireFormat);
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v10/XATransactionIdMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v10/XATransactionIdMarshaller.java
+@@ -67,8 +67,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
+- info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
++ info.setGlobalTransactionId(tightUnmarshalByteArray(wireFormat, dataIn, bs));
++ info.setBranchQualifier(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -116,8 +116,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
+- info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
++ info.setGlobalTransactionId(looseUnmarshalByteArray(wireFormat, dataIn));
++ info.setBranchQualifier(looseUnmarshalByteArray(wireFormat, dataIn)); +
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/BaseDataStreamMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/BaseDataStreamMarshaller.java
+@@ -409,10 +409,11 @@
+ }
+ }
+
+- protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected byte[] tightUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ byte rc[] = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -436,10 +437,11 @@
+ }
+ }
+
+- protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected ByteSequence tightUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ ByteSequence rc = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ return new ByteSequence(t, 0, size);
+@@ -616,10 +618,11 @@
+ }
+ }
+
+- protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
++ protected byte[] looseUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ byte rc[] = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -635,10 +638,11 @@
+ }
+ }
+
+- protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
++ protected ByteSequence looseUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ ByteSequence rc = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ rc = new ByteSequence(t, 0, size);
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ConnectionControlMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ConnectionControlMarshaller.java
+@@ -74,7 +74,7 @@
+ info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
+ info.setReconnectTo(tightUnmarshalString(dataIn, bs));
+ info.setRebalanceConnection(bs.readBoolean());
+- info.setToken(tightUnmarshalByteArray(dataIn, bs));
++ info.setToken(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -142,7 +142,7 @@
+ info.setConnectedBrokers(looseUnmarshalString(dataIn));
+ info.setReconnectTo(looseUnmarshalString(dataIn));
+ info.setRebalanceConnection(dataIn.readBoolean());
+- info.setToken(looseUnmarshalByteArray(dataIn));
++ info.setToken(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/MessageMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/MessageMarshaller.java
+@@ -69,8 +69,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setType(tightUnmarshalString(dataIn, bs));
+- info.setContent(tightUnmarshalByteSequence(dataIn, bs));
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setContent(tightUnmarshalByteSequence(wireFormat, dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+ info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setCompressed(bs.readBoolean());
+@@ -228,8 +228,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
+ info.setType(looseUnmarshalString(dataIn));
+- info.setContent(looseUnmarshalByteSequence(dataIn));
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setContent(looseUnmarshalByteSequence(wireFormat, dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+ info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setCompressed(dataIn.readBoolean());
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/PartialCommandMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/PartialCommandMarshaller.java
+@@ -67,7 +67,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(tightUnmarshalByteArray(dataIn, bs));
++ info.setData(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -113,7 +113,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(looseUnmarshalByteArray(dataIn));
++ info.setData(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java
+@@ -71,7 +71,7 @@
+
+ info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+
+ info.afterUnmarshall(wireFormat);
+
+@@ -129,7 +129,7 @@
+
+ info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+
+ info.afterUnmarshall(wireFormat);
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java
+@@ -67,8 +67,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
+- info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
++ info.setGlobalTransactionId(tightUnmarshalByteArray(wireFormat, dataIn, bs));
++ info.setBranchQualifier(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -116,8 +116,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
+- info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
++ info.setGlobalTransactionId(looseUnmarshalByteArray(wireFormat, dataIn));
++ info.setBranchQualifier(looseUnmarshalByteArray(wireFormat, dataIn)); +
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/BaseDataStreamMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/BaseDataStreamMarshaller.java
+@@ -409,10 +409,11 @@
+ }
+ }
+
+- protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected byte[] tightUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ byte rc[] = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -436,10 +437,11 @@
+ }
+ }
+
+- protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected ByteSequence tightUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ ByteSequence rc = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ return new ByteSequence(t, 0, size);
+@@ -616,10 +618,11 @@
+ }
+ }
+
+- protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
++ protected byte[] looseUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ byte rc[] = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -635,10 +638,11 @@
+ }
+ }
+
+- protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
++ protected ByteSequence looseUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ ByteSequence rc = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ rc = new ByteSequence(t, 0, size);
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/ConnectionControlMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/ConnectionControlMarshaller.java
+@@ -74,7 +74,7 @@
+ info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
+ info.setReconnectTo(tightUnmarshalString(dataIn, bs));
+ info.setRebalanceConnection(bs.readBoolean());
+- info.setToken(tightUnmarshalByteArray(dataIn, bs));
++ info.setToken(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -142,7 +142,7 @@
+ info.setConnectedBrokers(looseUnmarshalString(dataIn));
+ info.setReconnectTo(looseUnmarshalString(dataIn));
+ info.setRebalanceConnection(dataIn.readBoolean());
+- info.setToken(looseUnmarshalByteArray(dataIn));
++ info.setToken(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/MessageMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/MessageMarshaller.java
+@@ -69,8 +69,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setType(tightUnmarshalString(dataIn, bs));
+- info.setContent(tightUnmarshalByteSequence(dataIn, bs));
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setContent(tightUnmarshalByteSequence(wireFormat, dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+ info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setCompressed(bs.readBoolean());
+@@ -228,8 +228,8 @@
+ info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
+ info.setType(looseUnmarshalString(dataIn));
+- info.setContent(looseUnmarshalByteSequence(dataIn));
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setContent(looseUnmarshalByteSequence(wireFormat, dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+ info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setCompressed(dataIn.readBoolean());
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/PartialCommandMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/PartialCommandMarshaller.java
+@@ -67,7 +67,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(tightUnmarshalByteArray(dataIn, bs));
++ info.setData(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -113,7 +113,7 @@
+
+ PartialCommand info = (PartialCommand)o;
+ info.setCommandId(dataIn.readInt());
+- info.setData(looseUnmarshalByteArray(dataIn));
++ info.setData(looseUnmarshalByteArray(wireFormat, dataIn));
+
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/WireFormatInfoMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/WireFormatInfoMarshaller.java
+@@ -71,7 +71,7 @@
+
+ info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); ++ info.setMarshalledProperties(tightUnmarshalByteSequence(wireFormat, dataIn, bs));
+
+ info.afterUnmarshall(wireFormat);
+
+@@ -129,7 +129,7 @@
+
+ info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
+ info.setVersion(dataIn.readInt());
+- info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
++ info.setMarshalledProperties(looseUnmarshalByteSequence(wireFormat, dataIn));
+
+ info.afterUnmarshall(wireFormat);
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v12/XATransactionIdMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v12/XATransactionIdMarshaller.java
+@@ -67,8 +67,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
+- info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
++ info.setGlobalTransactionId(tightUnmarshalByteArray(wireFormat, dataIn, bs));
++ info.setBranchQualifier(tightUnmarshalByteArray(wireFormat, dataIn, bs));
+
+ }
+
+@@ -116,8 +116,8 @@
+
+ XATransactionId info = (XATransactionId)o;
+ info.setFormatId(dataIn.readInt());
+- info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
+- info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
++ info.setGlobalTransactionId(looseUnmarshalByteArray(wireFormat, dataIn));
++ info.setBranchQualifier(looseUnmarshalByteArray(wireFormat, dataIn)); +
+ }
+
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v9/BaseDataStreamMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v9/BaseDataStreamMarshaller.java
+@@ -409,10 +409,11 @@
+ }
+ }
+
+- protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected byte[] tightUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ byte rc[] = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -436,10 +437,11 @@
+ }
+ }
+
+- protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
++ protected ByteSequence tightUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException {
+ ByteSequence rc = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ return new ByteSequence(t, 0, size);
+@@ -616,10 +618,11 @@
+ }
+ }
+
+- protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
++ protected byte[] looseUnmarshalByteArray(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ byte rc[] = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+@@ -635,10 +638,11 @@
+ }
+ }
+
+- protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
++ protected ByteSequence looseUnmarshalByteSequence(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ ByteSequence rc = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
++ OpenWireUtil.validateBufferSize(wireFormat, size);
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ rc = new ByteSequence(t, 0, size);
+--- a/activemq-client/src/main/java/org/apache/activemq/openwire/v9/ConnectionControlMarshaller.java
++++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v9/ConnectionControlMarshaller.java
+@@ -1 +1 @@
+-/**
*
* 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.v9;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.activemq.openwire.*;
import org.apache.activemq.command.*;
/**
* Marshalling code for Open Wire Format for ConnectionControlMarshaller
*
*
* NOTE!: This file is auto generated - do not modify!
* if you need to make a change, please see the modify the groovy scripts in the
* under src/gram/
script and then use maven openwire:generate to regenerate
* this file.
*
*
*/
public class ConnectionControlMarshaller extends BaseCommandMarshaller {
/**
* Return the type of Data Structure we marshal
* @return short
representation of the type data structure
*/
public byte getDataStructureType() {
return ConnectionControl.DATA_STRUCTURE_TYPE;
}
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new ConnectionControl();
}
/**
* 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
*/
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
super.tightUnmarshal(wireFormat, o, dataIn, bs);
ConnectionControl info = (ConnectionControl)
o;
info.setClose(bs.readBoolean());
info.setExit(bs.readBoolean());
info.setFaultTolerant(bs.readBoolean());
info.setResume(bs.readBoolean());
info.setSuspend(bs.readBoolean());
info.setConnectedBrokers(
tightUnmarshalString(dataIn, bs));
info.setReconnectTo(tightUnmarshalString(dataIn, bs));
info.setRebalanceConnection(bs.readBoolean());
info.setToken(tightUnmarshalByteArray(dataIn, bs));
}
/**
* Write the
booleans that this object uses to a BooleanStream
*/
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ConnectionControl info = (ConnectionControl)o;
int rc = super.
tightMarshal1(wireFormat, o, bs);
bs.writeBoolean(info.isClose());
bs.writeBoolean(info.isExit());
bs.writeBoolean(info.isFaultTolerant());
bs.writeBoolean(info.isResume());
bs.writeBoolean(info.isSuspend());
rc += tightMarshalString1(info.getConnectedBrokers(), bs);
rc += tightMarshalString1(info.getReconnectTo(), bs);
bs.writeBoolean(info.isRebalanceConnection());
rc += tightMarshalByteArray1(info.getToken(), 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
*/
public void
tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
ConnectionControl info = (ConnectionControl)o;
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
tightMarshalString2(info.getConnectedBrokers(), dataOut, bs);
tightMarshalString2(info.getReconnectTo(), dataOut, bs);
bs.
readBoolean();
tightMarshalByteArray2(info.getToken(), 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
*/
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
ConnectionControl info = (
ConnectionControl)o;
info.setClose(dataIn.readBoolean());
info.setExit(dataIn.readBoolean());
info.setFaultTolerant(dataIn.readBoolean());
info.setResume(dataIn.readBoolean());
info.setSuspend(dataIn.readBoolean());
info.setConnectedBrokers(looseUnmarshalString(dataIn));
info.setReconnectTo(looseUnmarshalString(dataIn));
info.setRebalanceConnection(dataIn.readBoolean());
info.setToken(looseUnmarshalByteArray(dataIn));
}
/**
* Write the booleans that this object uses to a BooleanStream
*/
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
ConnectionControl info = (ConnectionControl)o;
super.
looseMarshal(wireFormat, o, dataOut);
dataOut.writeBoolean(info.isClose());
dataOut.writeBoolean(info.isExit());
dataOut.writeBoolean(info.isFaultTolerant());
dataOut.writeBoolean(info.isResume());
dataOut.
writeBoolean(info.isSuspend());
looseMarshalString(info.getConnectedBrokers(), dataOut);
looseMarshalString(info.getReconnectTo(), dataOut);
dataOut.writeBoolean(info.isRebalanceConnection());
looseMarshalByteArray(
wireFormat, info.getToken(), dataOut);
}
}
+\ No newline at end of file
[continued in next message]
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)