You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/03/01 07:29:57 UTC
svn commit: r381926 [3/8] - in /incubator/activemq/trunk:
activemq-core/src/gram/java/org/apache/activemq/openwire/tool/
activemq-core/src/gram/script/
activemq-core/src/main/java/org/apache/activemq/command/
activemq-core/src/main/java/org/apache/acti...
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerInfoMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,17 +60,17 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
ConsumerInfo info = (ConsumerInfo)o;
- info.setConsumerId((ConsumerId) unmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setBrowser(bs.readBoolean());
- info.setDestination((ActiveMQDestination) unmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setPrefetchSize(dataIn.readInt());
info.setDispatchAsync(bs.readBoolean());
- info.setSelector(readString(dataIn, bs));
- info.setSubcriptionName(readString(dataIn, bs));
+ info.setSelector(tightUnmarshalString(dataIn, bs));
+ info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
info.setNoLocal(bs.readBoolean());
info.setExclusive(bs.readBoolean());
info.setRetroactive(bs.readBoolean());
@@ -80,7 +80,7 @@
short size = dataIn.readShort();
BrokerId value[] = new BrokerId[size];
for( int i=0; i < size; i++ ) {
- value[i] = (BrokerId) unmarsalNestedObject(wireFormat,dataIn, bs);
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
}
info.setBrokerPath(value);
}
@@ -95,24 +95,24 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ConsumerInfo info = (ConsumerInfo)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1CachedObject(wireFormat, info.getConsumerId(), bs);
- bs.writeBoolean(info.isBrowser());
- rc += marshal1CachedObject(wireFormat, info.getDestination(), bs);
- bs.writeBoolean(info.isDispatchAsync());
- rc += writeString(info.getSelector(), bs);
- rc += writeString(info.getSubcriptionName(), bs);
- bs.writeBoolean(info.isNoLocal());
- bs.writeBoolean(info.isExclusive());
- bs.writeBoolean(info.isRetroactive());
- rc += marshalObjectArray(wireFormat, info.getBrokerPath(), bs);
- bs.writeBoolean(info.isNetworkSubscription());
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs);
+ bs.writeBoolean(info.isBrowser());
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ bs.writeBoolean(info.isDispatchAsync());
+ rc += tightMarshalString1(info.getSelector(), bs);
+ rc += tightMarshalString1(info.getSubcriptionName(), bs);
+ bs.writeBoolean(info.isNoLocal());
+ bs.writeBoolean(info.isExclusive());
+ bs.writeBoolean(info.isRetroactive());
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ bs.writeBoolean(info.isNetworkSubscription());
- return rc + 2;
+ return rc + 5;
}
/**
@@ -122,23 +122,86 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
ConsumerInfo info = (ConsumerInfo)o;
- marshal2CachedObject(wireFormat, info.getConsumerId(), dataOut, bs);
- bs.readBoolean();
- marshal2CachedObject(wireFormat, info.getDestination(), dataOut, bs);
- dataOut.writeInt(info.getPrefetchSize());
- bs.readBoolean();
- writeString(info.getSelector(), dataOut, bs);
- writeString(info.getSubcriptionName(), dataOut, bs);
- bs.readBoolean();
- bs.readBoolean();
- bs.readBoolean();
- dataOut.writeByte(info.getPriority());
- marshalObjectArray(wireFormat, info.getBrokerPath(), dataOut, bs);
- bs.readBoolean();
+ tightMarshalCachedObject2(wireFormat, info.getConsumerId(), dataOut, bs);
+ bs.readBoolean();
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ dataOut.writeInt(info.getPrefetchSize());
+ bs.readBoolean();
+ tightMarshalString2(info.getSelector(), dataOut, bs);
+ tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ dataOut.writeByte(info.getPriority());
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ bs.readBoolean();
+
+ }
+
+ /**
+ * 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ConsumerInfo info = (ConsumerInfo)o;
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setBrowser(dataIn.readBoolean());
+ info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setPrefetchSize(dataIn.readInt());
+ info.setDispatchAsync(dataIn.readBoolean());
+ info.setSelector(looseUnmarshalString(dataIn));
+ info.setSubcriptionName(looseUnmarshalString(dataIn));
+ info.setNoLocal(dataIn.readBoolean());
+ info.setExclusive(dataIn.readBoolean());
+ info.setRetroactive(dataIn.readBoolean());
+ info.setPriority(dataIn.readByte());
+
+ 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.setNetworkSubscription(dataIn.readBoolean());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ ConsumerInfo info = (ConsumerInfo)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut);
+ dataOut.writeBoolean(info.isBrowser());
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ dataOut.writeInt(info.getPrefetchSize());
+ dataOut.writeBoolean(info.isDispatchAsync());
+ looseMarshalString(info.getSelector(), dataOut);
+ looseMarshalString(info.getSubcriptionName(), dataOut);
+ dataOut.writeBoolean(info.isNoLocal());
+ dataOut.writeBoolean(info.isExclusive());
+ dataOut.writeBoolean(info.isRetroactive());
+ dataOut.writeByte(info.getPriority());
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ dataOut.writeBoolean(info.isNetworkSubscription());
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ControlCommandMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,11 +60,11 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
ControlCommand info = (ControlCommand)o;
- info.setCommand(readString(dataIn, bs));
+ info.setCommand(tightUnmarshalString(dataIn, bs));
}
@@ -72,12 +72,12 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ControlCommand info = (ControlCommand)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += writeString(info.getCommand(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getCommand(), bs);
return rc + 0;
}
@@ -89,11 +89,39 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
ControlCommand info = (ControlCommand)o;
- writeString(info.getCommand(), dataOut, bs);
+ tightMarshalString2(info.getCommand(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ControlCommand info = (ControlCommand)o;
+ info.setCommand(looseUnmarshalString(dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ ControlCommand info = (ControlCommand)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getCommand(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataArrayResponseMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,8 +60,8 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
DataArrayResponse info = (DataArrayResponse)o;
@@ -69,7 +69,7 @@
short size = dataIn.readShort();
DataStructure value[] = new DataStructure[size];
for( int i=0; i < size; i++ ) {
- value[i] = (DataStructure) unmarsalNestedObject(wireFormat,dataIn, bs);
+ value[i] = (DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
}
info.setData(value);
}
@@ -83,12 +83,12 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
DataArrayResponse info = (DataArrayResponse)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshalObjectArray(wireFormat, info.getData(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs);
return rc + 0;
}
@@ -100,11 +100,50 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
DataArrayResponse info = (DataArrayResponse)o;
- marshalObjectArray(wireFormat, info.getData(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, 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
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ DataArrayResponse info = (DataArrayResponse)o;
+
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ DataStructure value[] = new DataStructure[size];
+ for( int i=0; i < size; i++ ) {
+ value[i] = (DataStructure) looseUnmarsalNestedObject(wireFormat,dataIn);
+ }
+ info.setData(value);
+ }
+ else {
+ info.setData(null);
+ }
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ DataArrayResponse info = (DataArrayResponse)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalObjectArray(wireFormat, info.getData(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataResponseMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,11 +60,11 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
DataResponse info = (DataResponse)o;
- info.setData((DataStructure) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setData((DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
@@ -72,12 +72,12 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
DataResponse info = (DataResponse)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1NestedObject(wireFormat, info.getData(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getData(), bs);
return rc + 0;
}
@@ -89,11 +89,39 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
DataResponse info = (DataResponse)o;
- marshal2NestedObject(wireFormat, info.getData(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, 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
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ DataResponse info = (DataResponse)o;
+ info.setData((DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ DataResponse info = (DataResponse)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalNestedObject(wireFormat, info.getData(), dataOut);
}
}
Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java?rev=381926&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java (added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DataStructureSupportMarshaller.java Tue Feb 28 22:29:45 2006
@@ -0,0 +1,97 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.openwire.v1;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.*;
+import org.apache.activemq.command.*;
+
+
+/**
+ * Marshalling code for Open Wire Format for DataStructureSupportMarshaller
+ *
+ *
+ * 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.
+ *
+ * @version $Revision$
+ */
+public abstract class DataStructureSupportMarshaller 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
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ 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
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream 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
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DestinationInfoMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,20 +60,20 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
DestinationInfo info = (DestinationInfo)o;
- info.setConnectionId((ConnectionId) unmarsalCachedObject(wireFormat, dataIn, bs));
- info.setDestination((ActiveMQDestination) unmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setOperationType(dataIn.readByte());
- info.setTimeout(unmarshalLong(wireFormat, dataIn, bs));
+ info.setTimeout(tightUnmarshalLong(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) unmarsalNestedObject(wireFormat,dataIn, bs);
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
}
info.setBrokerPath(value);
}
@@ -87,15 +87,15 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
DestinationInfo info = (DestinationInfo)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1CachedObject(wireFormat, info.getConnectionId(), bs);
- rc += marshal1CachedObject(wireFormat, info.getDestination(), bs);
- rc+=marshal1Long(wireFormat, info.getTimeout(), bs);
- rc += marshalObjectArray(wireFormat, info.getBrokerPath(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConnectionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
return rc + 1;
}
@@ -107,15 +107,62 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
DestinationInfo info = (DestinationInfo)o;
- marshal2CachedObject(wireFormat, info.getConnectionId(), dataOut, bs);
- marshal2CachedObject(wireFormat, info.getDestination(), dataOut, bs);
- dataOut.writeByte(info.getOperationType());
- marshal2Long(wireFormat, info.getTimeout(), dataOut, bs);
- marshalObjectArray(wireFormat, info.getBrokerPath(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getConnectionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ dataOut.writeByte(info.getOperationType());
+ tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ DestinationInfo info = (DestinationInfo)o;
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setOperationType(dataIn.readByte());
+ info.setTimeout(looseUnmarshalLong(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);
+ }
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ DestinationInfo info = (DestinationInfo)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConnectionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ dataOut.writeByte(info.getOperationType());
+ looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/DiscoveryEventMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class DiscoveryEventMarshaller extends DataStreamMarshaller {
+public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,12 +60,12 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
DiscoveryEvent info = (DiscoveryEvent)o;
- info.setServiceName(readString(dataIn, bs));
- info.setBrokerName(readString(dataIn, bs));
+ info.setServiceName(tightUnmarshalString(dataIn, bs));
+ info.setBrokerName(tightUnmarshalString(dataIn, bs));
}
@@ -73,13 +73,13 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
DiscoveryEvent info = (DiscoveryEvent)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += writeString(info.getServiceName(), bs);
- rc += writeString(info.getBrokerName(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getServiceName(), bs);
+ rc += tightMarshalString1(info.getBrokerName(), bs);
return rc + 0;
}
@@ -91,12 +91,42 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
DiscoveryEvent info = (DiscoveryEvent)o;
- writeString(info.getServiceName(), dataOut, bs);
- writeString(info.getBrokerName(), dataOut, bs);
+ tightMarshalString2(info.getServiceName(), dataOut, bs);
+ tightMarshalString2(info.getBrokerName(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ DiscoveryEvent info = (DiscoveryEvent)o;
+ info.setServiceName(looseUnmarshalString(dataIn));
+ info.setBrokerName(looseUnmarshalString(dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ DiscoveryEvent info = (DiscoveryEvent)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getServiceName(), dataOut);
+ looseMarshalString(info.getBrokerName(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ExceptionResponseMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,11 +60,11 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
ExceptionResponse info = (ExceptionResponse)o;
- info.setException((Throwable) unmarsalThrowable(wireFormat, dataIn, bs));
+ info.setException((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
}
@@ -72,12 +72,12 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
ExceptionResponse info = (ExceptionResponse)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshalThrowable(wireFormat, info.getException(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
return rc + 0;
}
@@ -89,11 +89,39 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
ExceptionResponse info = (ExceptionResponse)o;
- marshalThrowable(wireFormat, info.getException(), dataOut, bs);
+ tightMarshalThrowable2(wireFormat, info.getException(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ExceptionResponse info = (ExceptionResponse)o;
+ info.setException((Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ ExceptionResponse info = (ExceptionResponse)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalThrowable(wireFormat, info.getException(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/FlushCommandMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,8 +60,8 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
}
@@ -69,9 +69,9 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
- int rc = super.marshal1(wireFormat, o, bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
return rc + 0;
}
@@ -83,8 +83,30 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream 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
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/IntegerResponseMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,8 +60,8 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
IntegerResponse info = (IntegerResponse)o;
info.setResult(dataIn.readInt());
@@ -72,13 +72,13 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
IntegerResponse info = (IntegerResponse)o;
- int rc = super.marshal1(wireFormat, o, bs);
-
- return rc + 1;
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 4;
}
/**
@@ -88,11 +88,39 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
IntegerResponse info = (IntegerResponse)o;
- dataOut.writeInt(info.getResult());
+ dataOut.writeInt(info.getResult());
+
+ }
+
+ /**
+ * 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ IntegerResponse info = (IntegerResponse)o;
+ info.setResult(dataIn.readInt());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ IntegerResponse info = (IntegerResponse)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ dataOut.writeInt(info.getResult());
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalQueueAckMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class JournalQueueAckMarshaller extends DataStreamMarshaller {
+public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,12 +60,12 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
JournalQueueAck info = (JournalQueueAck)o;
- info.setDestination((ActiveMQDestination) unmarsalNestedObject(wireFormat, dataIn, bs));
- info.setMessageAck((MessageAck) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageAck((MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
@@ -73,13 +73,13 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
JournalQueueAck info = (JournalQueueAck)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1NestedObject(wireFormat, info.getDestination(), bs);
- rc += marshal1NestedObject(wireFormat, info.getMessageAck(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getMessageAck(), bs);
return rc + 0;
}
@@ -91,12 +91,42 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
JournalQueueAck info = (JournalQueueAck)o;
- marshal2NestedObject(wireFormat, info.getDestination(), dataOut, bs);
- marshal2NestedObject(wireFormat, info.getMessageAck(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getMessageAck(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ JournalQueueAck info = (JournalQueueAck)o;
+ info.setDestination((ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageAck((MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ JournalQueueAck info = (JournalQueueAck)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalNestedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getMessageAck(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTopicAckMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class JournalTopicAckMarshaller extends DataStreamMarshaller {
+public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,16 +60,16 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
JournalTopicAck info = (JournalTopicAck)o;
- info.setDestination((ActiveMQDestination) unmarsalNestedObject(wireFormat, dataIn, bs));
- info.setMessageId((MessageId) unmarsalNestedObject(wireFormat, dataIn, bs));
- info.setMessageSequenceId(unmarshalLong(wireFormat, dataIn, bs));
- info.setSubscritionName(readString(dataIn, bs));
- info.setClientId(readString(dataIn, bs));
- info.setTransactionId((TransactionId) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setSubscritionName(tightUnmarshalString(dataIn, bs));
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
}
@@ -77,17 +77,17 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
JournalTopicAck info = (JournalTopicAck)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1NestedObject(wireFormat, info.getDestination(), bs);
- rc += marshal1NestedObject(wireFormat, info.getMessageId(), bs);
- rc+=marshal1Long(wireFormat, info.getMessageSequenceId(), bs);
- rc += writeString(info.getSubscritionName(), bs);
- rc += writeString(info.getClientId(), bs);
- rc += marshal1NestedObject(wireFormat, info.getTransactionId(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getMessageId(), bs);
+ rc+=tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
+ rc += tightMarshalString1(info.getSubscritionName(), bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getTransactionId(), bs);
return rc + 0;
}
@@ -99,16 +99,54 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
JournalTopicAck info = (JournalTopicAck)o;
- marshal2NestedObject(wireFormat, info.getDestination(), dataOut, bs);
- marshal2NestedObject(wireFormat, info.getMessageId(), dataOut, bs);
- marshal2Long(wireFormat, info.getMessageSequenceId(), dataOut, bs);
- writeString(info.getSubscritionName(), dataOut, bs);
- writeString(info.getClientId(), dataOut, bs);
- marshal2NestedObject(wireFormat, info.getTransactionId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getMessageId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
+ tightMarshalString2(info.getSubscritionName(), dataOut, bs);
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getTransactionId(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ JournalTopicAck info = (JournalTopicAck)o;
+ info.setDestination((ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ info.setSubscritionName(looseUnmarshalString(dataIn));
+ info.setClientId(looseUnmarshalString(dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ JournalTopicAck info = (JournalTopicAck)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalNestedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getMessageId(), dataOut);
+ looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
+ looseMarshalString(info.getSubscritionName(), dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getTransactionId(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTraceMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class JournalTraceMarshaller extends DataStreamMarshaller {
+public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,11 +60,11 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
JournalTrace info = (JournalTrace)o;
- info.setMessage(readString(dataIn, bs));
+ info.setMessage(tightUnmarshalString(dataIn, bs));
}
@@ -72,12 +72,12 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
JournalTrace info = (JournalTrace)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += writeString(info.getMessage(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getMessage(), bs);
return rc + 0;
}
@@ -89,11 +89,39 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
JournalTrace info = (JournalTrace)o;
- writeString(info.getMessage(), dataOut, bs);
+ tightMarshalString2(info.getMessage(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ JournalTrace info = (JournalTrace)o;
+ info.setMessage(looseUnmarshalString(dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ JournalTrace info = (JournalTrace)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getMessage(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/JournalTransactionMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class JournalTransactionMarshaller extends DataStreamMarshaller {
+public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,11 +60,11 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
JournalTransaction info = (JournalTransaction)o;
- info.setTransactionId((TransactionId) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
info.setType(dataIn.readByte());
info.setWasPrepared(bs.readBoolean());
@@ -74,13 +74,13 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
JournalTransaction info = (JournalTransaction)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1NestedObject(wireFormat, info.getTransactionId(), bs);
- bs.writeBoolean(info.getWasPrepared());
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getTransactionId(), bs);
+ bs.writeBoolean(info.getWasPrepared());
return rc + 1;
}
@@ -92,13 +92,45 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
JournalTransaction info = (JournalTransaction)o;
- marshal2NestedObject(wireFormat, info.getTransactionId(), dataOut, bs);
- dataOut.writeByte(info.getType());
- bs.readBoolean();
+ tightMarshalNestedObject2(wireFormat, info.getTransactionId(), dataOut, bs);
+ dataOut.writeByte(info.getType());
+ bs.readBoolean();
+
+ }
+
+ /**
+ * 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ JournalTransaction info = (JournalTransaction)o;
+ info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setType(dataIn.readByte());
+ info.setWasPrepared(dataIn.readBoolean());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ JournalTransaction info = (JournalTransaction)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalNestedObject(wireFormat, info.getTransactionId(), dataOut);
+ dataOut.writeByte(info.getType());
+ dataOut.writeBoolean(info.getWasPrepared());
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/KeepAliveInfoMarshaller.java Tue Feb 28 22:29:45 2006
@@ -36,7 +36,7 @@
*
* @version $Revision$
*/
-public class KeepAliveInfoMarshaller extends DataStreamMarshaller {
+public class KeepAliveInfoMarshaller extends BaseDataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
@@ -60,8 +60,8 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
}
@@ -69,9 +69,9 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
- int rc = super.marshal1(wireFormat, o, bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
return rc + 0;
}
@@ -83,8 +83,30 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream 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
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/LocalTransactionIdMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,12 +60,12 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
LocalTransactionId info = (LocalTransactionId)o;
- info.setValue(unmarshalLong(wireFormat, dataIn, bs));
- info.setConnectionId((ConnectionId) unmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
}
@@ -73,13 +73,13 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
LocalTransactionId info = (LocalTransactionId)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc+=marshal1Long(wireFormat, info.getValue(), bs);
- rc += marshal1CachedObject(wireFormat, info.getConnectionId(), bs);
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc+=tightMarshalLong1(wireFormat, info.getValue(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConnectionId(), bs);
return rc + 0;
}
@@ -91,12 +91,42 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
LocalTransactionId info = (LocalTransactionId)o;
- marshal2Long(wireFormat, info.getValue(), dataOut, bs);
- marshal2CachedObject(wireFormat, info.getConnectionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getConnectionId(), 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ LocalTransactionId info = (LocalTransactionId)o;
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ LocalTransactionId info = (LocalTransactionId)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConnectionId(), dataOut);
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageAckMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,16 +60,16 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
MessageAck info = (MessageAck)o;
- info.setDestination((ActiveMQDestination) unmarsalCachedObject(wireFormat, dataIn, bs));
- info.setTransactionId((TransactionId) unmarsalCachedObject(wireFormat, dataIn, bs));
- info.setConsumerId((ConsumerId) unmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setAckType(dataIn.readByte());
- info.setFirstMessageId((MessageId) unmarsalNestedObject(wireFormat, dataIn, bs));
- info.setLastMessageId((MessageId) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setFirstMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setLastMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
info.setMessageCount(dataIn.readInt());
}
@@ -78,18 +78,18 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
MessageAck info = (MessageAck)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1CachedObject(wireFormat, info.getDestination(), bs);
- rc += marshal1CachedObject(wireFormat, info.getTransactionId(), bs);
- rc += marshal1CachedObject(wireFormat, info.getConsumerId(), bs);
- rc += marshal1NestedObject(wireFormat, info.getFirstMessageId(), bs);
- rc += marshal1NestedObject(wireFormat, info.getLastMessageId(), bs);
-
- return rc + 2;
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getTransactionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getFirstMessageId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getLastMessageId(), bs);
+
+ return rc + 5;
}
/**
@@ -99,17 +99,57 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
MessageAck info = (MessageAck)o;
- marshal2CachedObject(wireFormat, info.getDestination(), dataOut, bs);
- marshal2CachedObject(wireFormat, info.getTransactionId(), dataOut, bs);
- marshal2CachedObject(wireFormat, info.getConsumerId(), dataOut, bs);
- dataOut.writeByte(info.getAckType());
- marshal2NestedObject(wireFormat, info.getFirstMessageId(), dataOut, bs);
- marshal2NestedObject(wireFormat, info.getLastMessageId(), dataOut, bs);
- dataOut.writeInt(info.getMessageCount());
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getTransactionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getConsumerId(), dataOut, bs);
+ dataOut.writeByte(info.getAckType());
+ tightMarshalNestedObject2(wireFormat, info.getFirstMessageId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getLastMessageId(), dataOut, bs);
+ dataOut.writeInt(info.getMessageCount());
+
+ }
+
+ /**
+ * 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ MessageAck info = (MessageAck)o;
+ info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setAckType(dataIn.readByte());
+ info.setFirstMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setLastMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageCount(dataIn.readInt());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ MessageAck info = (MessageAck)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getTransactionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut);
+ dataOut.writeByte(info.getAckType());
+ looseMarshalNestedObject(wireFormat, info.getFirstMessageId(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getLastMessageId(), dataOut);
+ dataOut.writeInt(info.getMessageCount());
}
}
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java?rev=381926&r1=381925&r2=381926&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/MessageDispatchMarshaller.java Tue Feb 28 22:29:45 2006
@@ -60,13 +60,13 @@
* @param dataIn the data input stream to build the object from
* @throws IOException
*/
- public void unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
- super.unmarshal(wireFormat, o, dataIn, bs);
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
MessageDispatch info = (MessageDispatch)o;
- info.setConsumerId((ConsumerId) unmarsalCachedObject(wireFormat, dataIn, bs));
- info.setDestination((ActiveMQDestination) unmarsalCachedObject(wireFormat, dataIn, bs));
- info.setMessage((Message) unmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setMessage((Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
info.setRedeliveryCounter(dataIn.readInt());
}
@@ -75,16 +75,16 @@
/**
* Write the booleans that this object uses to a BooleanStream
*/
- public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
MessageDispatch info = (MessageDispatch)o;
- int rc = super.marshal1(wireFormat, o, bs);
- rc += marshal1CachedObject(wireFormat, info.getConsumerId(), bs);
- rc += marshal1CachedObject(wireFormat, info.getDestination(), bs);
- rc += marshal1NestedObject(wireFormat, info.getMessage(), bs);
-
- return rc + 1;
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, info.getMessage(), bs);
+
+ return rc + 4;
}
/**
@@ -94,14 +94,48 @@
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/
- public void marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
- super.marshal2(wireFormat, o, dataOut, bs);
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
MessageDispatch info = (MessageDispatch)o;
- marshal2CachedObject(wireFormat, info.getConsumerId(), dataOut, bs);
- marshal2CachedObject(wireFormat, info.getDestination(), dataOut, bs);
- marshal2NestedObject(wireFormat, info.getMessage(), dataOut, bs);
- dataOut.writeInt(info.getRedeliveryCounter());
+ tightMarshalCachedObject2(wireFormat, info.getConsumerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, info.getMessage(), dataOut, bs);
+ dataOut.writeInt(info.getRedeliveryCounter());
+
+ }
+
+ /**
+ * 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, DataInputStream dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ MessageDispatch info = (MessageDispatch)o;
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setMessage((Message) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setRedeliveryCounter(dataIn.readInt());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut) throws IOException {
+
+ MessageDispatch info = (MessageDispatch)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, info.getMessage(), dataOut);
+ dataOut.writeInt(info.getRedeliveryCounter());
}
}