http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java new file mode 100644 index 0000000..bfd19dd --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for ExceptionResponse + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class ExceptionResponseMarshaller extends ResponseMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return ExceptionResponse.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new ExceptionResponse(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + ExceptionResponse info = (ExceptionResponse) target; + + info.setException((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + ExceptionResponse info = (ExceptionResponse) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalThrowable1(wireFormat, info.getException(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + ExceptionResponse info = (ExceptionResponse) source; + + tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + ExceptionResponse info = (ExceptionResponse) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalThrowable(wireFormat, info.getException(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + ExceptionResponse info = (ExceptionResponse) target; + + info.setException((Throwable) looseUnmarsalThrowable(wireFormat, dataIn)); + } +}
http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java new file mode 100644 index 0000000..3ff520e --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for FlushCommand + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class FlushCommandMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return FlushCommand.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new FlushCommand(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + + int rc = super.tightMarshal1(wireFormat, source, bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + super.looseMarshal(wireFormat, source, dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java new file mode 100644 index 0000000..b31f7c8 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java @@ -0,0 +1,130 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for IntegerResponse + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class IntegerResponseMarshaller extends ResponseMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return IntegerResponse.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new IntegerResponse(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + IntegerResponse info = (IntegerResponse) target; + + info.setResult(dataIn.readInt()); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + IntegerResponse info = (IntegerResponse) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + + return rc + 4; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + IntegerResponse info = (IntegerResponse) source; + + dataOut.writeInt(info.getResult()); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + IntegerResponse info = (IntegerResponse) source; + + super.looseMarshal(wireFormat, source, dataOut); + dataOut.writeInt(info.getResult()); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + IntegerResponse info = (IntegerResponse) target; + + info.setResult(dataIn.readInt()); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java new file mode 100644 index 0000000..229b92e --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for JournalQueueAck + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return JournalQueueAck.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new JournalQueueAck(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + JournalQueueAck info = (JournalQueueAck) target; + + info.setDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setMessageAck((MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + JournalQueueAck info = (JournalQueueAck) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + JournalQueueAck info = (JournalQueueAck) source; + + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + JournalQueueAck info = (JournalQueueAck) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + JournalQueueAck info = (JournalQueueAck) target; + + info.setDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); + info.setMessageAck((MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn)); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java new file mode 100644 index 0000000..c4c0431 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java @@ -0,0 +1,156 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for JournalTopicAck + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return JournalTopicAck.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new JournalTopicAck(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + JournalTopicAck info = (JournalTopicAck) target; + + info.setDestination((OpenWireDestination) 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)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + JournalTopicAck info = (JournalTopicAck) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs); + rc += tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs); + rc += tightMarshalString1(info.getSubscritionName(), bs); + rc += tightMarshalString1(info.getClientId(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + JournalTopicAck info = (JournalTopicAck) source; + + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs); + tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs); + tightMarshalString2(info.getSubscritionName(), dataOut, bs); + tightMarshalString2(info.getClientId(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + JournalTopicAck info = (JournalTopicAck) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut); + looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut); + looseMarshalString(info.getSubscritionName(), dataOut); + looseMarshalString(info.getClientId(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + JournalTopicAck info = (JournalTopicAck) target; + + info.setDestination((OpenWireDestination) 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)); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java new file mode 100644 index 0000000..2c42ab2 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for JournalTrace + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class JournalTraceMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return JournalTrace.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new JournalTrace(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + JournalTrace info = (JournalTrace) target; + + info.setMessage(tightUnmarshalString(dataIn, bs)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + JournalTrace info = (JournalTrace) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalString1(info.getMessage(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + JournalTrace info = (JournalTrace) source; + + tightMarshalString2(info.getMessage(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + JournalTrace info = (JournalTrace) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalString(info.getMessage(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + JournalTrace info = (JournalTrace) target; + + info.setMessage(looseUnmarshalString(dataIn)); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java new file mode 100644 index 0000000..2f74d93 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for JournalTransaction + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class JournalTransactionMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return JournalTransaction.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new JournalTransaction(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + JournalTransaction info = (JournalTransaction) target; + + info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setType(dataIn.readByte()); + info.setWasPrepared(bs.readBoolean()); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + JournalTransaction info = (JournalTransaction) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); + bs.writeBoolean(info.getWasPrepared()); + + return rc + 1; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + JournalTransaction info = (JournalTransaction) source; + + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); + dataOut.writeByte(info.getType()); + bs.readBoolean(); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + JournalTransaction info = (JournalTransaction) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); + dataOut.writeByte(info.getType()); + dataOut.writeBoolean(info.getWasPrepared()); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + JournalTransaction info = (JournalTransaction) target; + + info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn)); + info.setType(dataIn.readByte()); + info.setWasPrepared(dataIn.readBoolean()); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java new file mode 100644 index 0000000..beae045 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for KeepAliveInfo + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class KeepAliveInfoMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return KeepAliveInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new KeepAliveInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + + int rc = super.tightMarshal1(wireFormat, source, bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + super.looseMarshal(wireFormat, source, dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java new file mode 100644 index 0000000..4289dc4 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for LastPartialCommand + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class LastPartialCommandMarshaller extends PartialCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return LastPartialCommand.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new LastPartialCommand(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + + int rc = super.tightMarshal1(wireFormat, source, bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + super.looseMarshal(wireFormat, source, dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java new file mode 100644 index 0000000..896b21e --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java @@ -0,0 +1,136 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for LocalTransactionId + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class LocalTransactionIdMarshaller extends TransactionIdMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return LocalTransactionId.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new LocalTransactionId(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + LocalTransactionId info = (LocalTransactionId) target; + + info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); + info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + LocalTransactionId info = (LocalTransactionId) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalLong1(wireFormat, info.getValue(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + LocalTransactionId info = (LocalTransactionId) source; + + tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + LocalTransactionId info = (LocalTransactionId) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalLong(wireFormat, info.getValue(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + LocalTransactionId info = (LocalTransactionId) target; + + info.setValue(looseUnmarshalLong(wireFormat, dataIn)); + info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java new file mode 100644 index 0000000..3e1989d --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import org.apache.activemq.openwire.codec.DataStreamMarshaller; +import org.apache.activemq.openwire.codec.OpenWireFormat; + +/** + * Marshalling Factory for the Universal OpenWire Codec package. + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class MarshallerFactory{ + + /** + * Creates a Map of command type -> Marshallers + */ + static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256]; + static { + + add(new BrokerIdMarshaller()); + add(new BrokerInfoMarshaller()); + add(new ConnectionControlMarshaller()); + add(new ConnectionErrorMarshaller()); + add(new ConnectionIdMarshaller()); + add(new ConnectionInfoMarshaller()); + add(new ConsumerControlMarshaller()); + add(new ConsumerIdMarshaller()); + add(new ConsumerInfoMarshaller()); + add(new ControlCommandMarshaller()); + add(new DataArrayResponseMarshaller()); + add(new DataResponseMarshaller()); + add(new DestinationInfoMarshaller()); + add(new DiscoveryEventMarshaller()); + add(new ExceptionResponseMarshaller()); + add(new FlushCommandMarshaller()); + add(new IntegerResponseMarshaller()); + add(new JournalQueueAckMarshaller()); + add(new JournalTopicAckMarshaller()); + add(new JournalTraceMarshaller()); + add(new JournalTransactionMarshaller()); + add(new KeepAliveInfoMarshaller()); + add(new LastPartialCommandMarshaller()); + add(new LocalTransactionIdMarshaller()); + add(new MessageAckMarshaller()); + add(new MessageDispatchMarshaller()); + add(new MessageDispatchNotificationMarshaller()); + add(new MessageIdMarshaller()); + add(new MessagePullMarshaller()); + add(new NetworkBridgeFilterMarshaller()); + add(new OpenWireBlobMessageMarshaller()); + add(new OpenWireBytesMessageMarshaller()); + add(new OpenWireMapMessageMarshaller()); + add(new OpenWireMessageMarshaller()); + add(new OpenWireObjectMessageMarshaller()); + add(new OpenWireQueueMarshaller()); + add(new OpenWireStreamMessageMarshaller()); + add(new OpenWireTempQueueMarshaller()); + add(new OpenWireTempTopicMarshaller()); + add(new OpenWireTextMessageMarshaller()); + add(new OpenWireTopicMarshaller()); + add(new PartialCommandMarshaller()); + add(new ProducerAckMarshaller()); + add(new ProducerIdMarshaller()); + add(new ProducerInfoMarshaller()); + add(new RemoveInfoMarshaller()); + add(new RemoveSubscriptionInfoMarshaller()); + add(new ReplayCommandMarshaller()); + add(new ResponseMarshaller()); + add(new SessionIdMarshaller()); + add(new SessionInfoMarshaller()); + add(new ShutdownInfoMarshaller()); + add(new SubscriptionInfoMarshaller()); + add(new TransactionInfoMarshaller()); + add(new WireFormatInfoMarshaller()); + add(new XATransactionIdMarshaller()); + } + + static private void add(DataStreamMarshaller dsm) { + marshaller[dsm.getDataStructureType()] = dsm; + } + + static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) { + return marshaller; + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java new file mode 100644 index 0000000..84b9e94 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java @@ -0,0 +1,179 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for MessageAck + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class MessageAckMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return MessageAck.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new MessageAck(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + MessageAck info = (MessageAck) target; + int version = wireFormat.getVersion(); + + info.setDestination((OpenWireDestination) 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) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setLastMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setMessageCount(dataIn.readInt()); + if (version >= 7) { + info.setPoisonCause((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs)); + } + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + MessageAck info = (MessageAck) source; + int version = wireFormat.getVersion(); + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs); + if (version >= 7) { + rc += tightMarshalThrowable1(wireFormat, info.getPoisonCause(), bs); + } + + return rc + 5; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + MessageAck info = (MessageAck) source; + int version = wireFormat.getVersion(); + + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); + dataOut.writeByte(info.getAckType()); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs); + dataOut.writeInt(info.getMessageCount()); + if (version >= 7) { + tightMarshalThrowable2(wireFormat, info.getPoisonCause(), dataOut, bs); + } + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + MessageAck info = (MessageAck) source; + int version = wireFormat.getVersion(); + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); + dataOut.writeByte(info.getAckType()); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut); + dataOut.writeInt(info.getMessageCount()); + if (version >= 7) { + looseMarshalThrowable(wireFormat, info.getPoisonCause(), dataOut); + } + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + MessageAck info = (MessageAck) target; + int version = wireFormat.getVersion(); + + info.setDestination((OpenWireDestination) 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()); + if (version >= 7) { + info.setPoisonCause((Throwable) looseUnmarsalThrowable(wireFormat, dataIn)); + } + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java new file mode 100644 index 0000000..68d9e0f --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java @@ -0,0 +1,145 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for MessageDispatch + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class MessageDispatchMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return MessageDispatch.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new MessageDispatch(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + MessageDispatch info = (MessageDispatch) target; + + info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setMessage((Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setRedeliveryCounter(dataIn.readInt()); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + MessageDispatch info = (MessageDispatch) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs); + + return rc + 4; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + MessageDispatch info = (MessageDispatch) source; + + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs); + dataOut.writeInt(info.getRedeliveryCounter()); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + MessageDispatch info = (MessageDispatch) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut); + dataOut.writeInt(info.getRedeliveryCounter()); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + MessageDispatch info = (MessageDispatch) target; + + info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setMessage((Message) looseUnmarsalNestedObject(wireFormat, dataIn)); + info.setRedeliveryCounter(dataIn.readInt()); + } +} http://git-wip-us.apache.org/repos/asf/activemq-openwire/blob/0c90d2e3/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java ---------------------------------------------------------------------- diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java new file mode 100644 index 0000000..bd776c5 --- /dev/null +++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.codec.universal; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.codec.*; +import org.apache.activemq.openwire.commands.*; + +/** + * Marshalling code for Open Wire for MessageDispatchNotification + * + * NOTE!: This file is auto generated - do not modify! + * + */ +public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure handled by this Marshaler + * + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return MessageDispatchNotification.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new instance of the managed type. + */ + public DataStructure createObject() { + return new MessageDispatchNotification(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * @param bs the boolean stream where the type's booleans were marshaled + * + * @throws IOException if an error occurs while reading the data + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, target, dataIn, bs); + + MessageDispatchNotification info = (MessageDispatchNotification) target; + + info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs)); + info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + } + + /** + * Write the booleans that this object uses to a BooleanStream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException { + MessageDispatchNotification info = (MessageDispatchNotification) source; + + int rc = super.tightMarshal1(wireFormat, source, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param wireFormat the OpenWireFormat instance to use + * @param source the object to marshal + * @param dataOut the DataOut where the properties are written + * @param bs the boolean stream where the type's booleans are written + * + * @throws IOException if an error occurs while writing the data + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, source, dataOut, bs); + + MessageDispatchNotification info = (MessageDispatchNotification) source; + + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs); + } + + /** + * Write the object to the output using loose marshaling. + * + * @throws IOException if an error occurs while writing the data + */ + public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException { + MessageDispatchNotification info = (MessageDispatchNotification) source; + + super.looseMarshal(wireFormat, source, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param target the object to un-marshal + * @param dataIn the data input stream to build the object from + * + * @throws IOException if an error occurs while writing the data + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, target, dataIn); + + MessageDispatchNotification info = (MessageDispatchNotification) target; + + info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn)); + info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); + } +}
