--- /dev/null
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-protocol</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>openwire-annotations</artifactId>
+ <name>openwire-annotations</name>
+ <description>The main OpenWire protocol implementation providing current versions of the codec.</description>
+ <packaging>jar</packaging>
+
+</project>
--- /dev/null
+/*
+ * 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.annotations;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Used to add documentation notes to an OpenWire command or one its properties.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface OpenWireDocumentation {
+
+ /**
+ * @return a quick one sentence description of the element.
+ */
+ String shortDescription();
+
+ /**
+ * @return a longer more thorough description of the element.
+ */
+ String longDescription() default "";
+
+}
--- /dev/null
+/*
+ * 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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Defines the annotation value to use to describes any extensions
+ * to a given OpenWire data type that is not part of the marshaled
+ * data for that type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface OpenWireExtension {
+
+ /**
+ * Defines if the extension is transient or not.
+ *
+ * @return true if the value should not be marked as transient.
+ */
+ boolean serialized() default false;
+
+}
--- /dev/null
+/*
+ * 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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Defines the annotation value for the properties of an OpenWire data type.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD})
+public @interface OpenWireProperty {
+
+ int version();
+
+ int sequence();
+
+ boolean cached() default false;
+
+ boolean serialized() default true;
+
+ boolean mandatory() default false;
+
+ int size() default 0;
+
+}
--- /dev/null
+/*
+ * 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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.TYPE})
+public @interface OpenWireType {
+
+ int typeCode();
+
+ int version() default 1;
+
+ boolean marshalAware() default false;
+
+}
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <openwire-src>${basedir}/src/main/java/io/openwire/commands</openwire-src>
- <openwire-oldest>10</openwire-oldest>
- <openwire-newest>10</openwire-newest>
+ <openwire-codec-dir>${basedir}/src/main/java/</openwire-codec-dir>
</properties>
<dependencies>
<!-- =================================== -->
- <!-- Required Dependencies -->
+ <!-- Required Dependencies -->
<!-- =================================== -->
<dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-annotations</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>openwire-generator</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <version>${activemq-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-kahadb-store</artifactId>
- <version>${activemq-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-jaas</artifactId>
- <version>${activemq-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-spring</artifactId>
- <version>${activemq-version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
-<!-- <build> -->
-<!-- <plugins> -->
-<!-- <plugin> -->
-<!-- <groupId>org.apache.maven.plugins</groupId> -->
-<!-- <artifactId>maven-antrun-plugin</artifactId> -->
-<!-- <executions> -->
-<!-- <execution> -->
-<!-- <id>default</id> -->
-<!-- <phase>generate-sources</phase> -->
-<!-- <configuration> -->
-<!-- <target> -->
-<!-- <echo>Running OpenWire Generator</echo> -->
-<!-- <taskdef name="generate" classname="org.apache.activemq.openwire.generator.GeneratorTask" classpathref="maven.test.classpath" /> -->
-<!-- <generate fromVersion="${openwire-oldest}" toVersion="${openwire-newest}" sourceDir="${openwire-src}" targetDir="${project.build.directory}/generated-sources/openwire" /> -->
-<!-- </target> -->
-<!-- </configuration> -->
-<!-- <goals> -->
-<!-- <goal>run</goal> -->
-<!-- </goals> -->
-<!-- </execution> -->
-<!-- </executions> -->
-<!-- </plugin> -->
-<!-- <plugin> -->
-<!-- <groupId>org.codehaus.mojo</groupId> -->
-<!-- <artifactId>build-helper-maven-plugin</artifactId> -->
-<!-- <version>1.7</version> -->
-<!-- <executions> -->
-<!-- <execution> -->
-<!-- <id>default</id> -->
-<!-- <phase>generate-sources</phase> -->
-<!-- <goals> -->
-<!-- <goal>add-source</goal> -->
-<!-- </goals> -->
-<!-- <configuration> -->
-<!-- <sources> -->
-<!-- <source>${project.build.directory}/generated-sources/openwire</source> -->
-<!-- </sources> -->
-<!-- </configuration> -->
-<!-- </execution> -->
-<!-- </executions> -->
-<!-- </plugin> -->
-<!-- </plugins> -->
-<!-- </build> -->
-
-<!-- <profiles> -->
-<!-- <profile> -->
-<!-- <id>lib/tools.jar</id> -->
-<!-- <activation> -->
-<!-- <file> -->
-<!-- <exists>${java.home}/lib/tools.jar</exists> -->
-<!-- </file> -->
-<!-- </activation> -->
-<!-- <build> -->
-<!-- <plugins> -->
-<!-- <plugin> -->
-<!-- <groupId>org.apache.maven.plugins</groupId> -->
-<!-- <artifactId>maven-antrun-plugin</artifactId> -->
-<!-- <dependencies> -->
-<!-- <dependency> -->
-<!-- <groupId>com.sun</groupId> -->
-<!-- <artifactId>tools</artifactId> -->
-<!-- <version>1.6.5</version> -->
-<!-- <scope>system</scope> -->
-<!-- <optional>true</optional> -->
-<!-- <systemPath>${java.home}/lib/tools.jar</systemPath> -->
-<!-- </dependency> -->
-<!-- </dependencies> -->
-<!-- </plugin> -->
-<!-- </plugins> -->
-<!-- </build> -->
-<!-- </profile> -->
-<!-- <profile> -->
-<!-- <id>../lib/tools.jar</id> -->
-<!-- <activation> -->
-<!-- <file> -->
-<!-- <exists>${java.home}/../lib/tools.jar</exists> -->
-<!-- </file> -->
-<!-- </activation> -->
-<!-- <build> -->
-<!-- <plugins> -->
-<!-- <plugin> -->
-<!-- <groupId>org.apache.maven.plugins</groupId> -->
-<!-- <artifactId>maven-antrun-plugin</artifactId> -->
-<!-- <dependencies> -->
-<!-- <dependency> -->
-<!-- <groupId>com.sun</groupId> -->
-<!-- <artifactId>tools</artifactId> -->
-<!-- <version>1.6.5</version> -->
-<!-- <scope>system</scope> -->
-<!-- <optional>true</optional> -->
-<!-- <systemPath>${java.home}/../lib/tools.jar</systemPath> -->
-<!-- </dependency> -->
-<!-- </dependencies> -->
-<!-- </plugin> -->
-<!-- </plugins> -->
-<!-- </build> -->
-<!-- </profile> -->
-<!-- </profiles> -->
+ <profiles>
+ <!-- Execute with: mvn -P openwire-generate antrun:run -->
+ <profile>
+ <id>openwire-generate</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <target>
+ <echo>Running OpenWire Generator</echo>
+ <taskdef name="generate" classname="org.apache.activemq.openwire.generator.GeneratorTask" classpathref="maven.test.classpath"/>
+ <generate baseDir="${openwire-codec-dir}" />
+ </target>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-annotations</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-generator</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.reflections</groupId>
+ <artifactId>reflections</artifactId>
+ <version>${reflections-version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
private boolean sizePrefixDisabled;
private long maxFrameSize = DEFAULT_MAX_FRAME_SIZE;
+ private boolean useLegacyCodecs = false;
+
// The following fields are used for value caching
private short nextMarshallCacheIndex;
private short nextMarshallCacheEvictionIndex;
if (object == null) {
return false;
}
+
OpenWireFormat o = (OpenWireFormat) object;
return o.stackTraceEnabled == stackTraceEnabled && o.cacheEnabled == cacheEnabled && o.version == version
&& o.tightEncodingEnabled == tightEncodingEnabled && o.sizePrefixDisabled == sizePrefixDisabled;
throw new IOException("Unknown data type: " + type);
}
if (tightEncodingEnabled) {
-
BooleanStream bs = new BooleanStream();
size += dsm.tightMarshal1(this, c, bs);
size += bs.marshalledSize();
bs.marshal(bytesOut);
dsm.tightMarshal2(this, c, bytesOut, bs);
sequence = bytesOut.toBuffer();
-
} else {
bytesOut.restart();
if (!sizePrefixDisabled) {
}
public synchronized void marshal(Object o, DataOutput dataOut) throws IOException {
-
if (cacheEnabled) {
runMarshallCacheEvictionSweep();
}
if (dsm == null) {
throw new IOException("Unknown data type: " + type);
}
+
if (tightEncodingEnabled) {
BooleanStream bs = new BooleanStream();
size += dsm.tightMarshal1(this, c, bs);
dataOut.writeByte(type);
bs.marshal(dataOut);
dsm.tightMarshal2(this, c, dataOut, bs);
-
} else {
DataOutput looseOut = dataOut;
dataOut.writeInt(sequence.getLength());
dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
}
-
}
-
} else {
if (!sizePrefixDisabled) {
dataOut.writeInt(size);
throw new IOException("Frame size of " + (size / (1024 * 1024)) + " MB larger than max allowed " + (maxFrameSize / (1024 * 1024)) + " MB");
}
}
+
return doUnmarshal(dataIn);
}
size += dsm.tightMarshal1(this, c, bs);
size += bs.marshalledSize();
}
+
return size;
}
}
}
- /**
- * Allows you to dynamically switch the version of the openwire protocol being used.
- *
- * @param version
- */
- public void setVersion(int version) {
- String mfName = "org.apache.activemq.openwire.codec.v" + version + ".MarshallerFactory";
- Class<?> mfClass;
- try {
- mfClass = Class.forName(mfName, false, getClass().getClassLoader());
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("Invalid version: " + version + ", could not load " + mfName, e);
- }
- try {
- Method method = mfClass.getMethod("createMarshallerMap", new Class[] { OpenWireFormat.class });
- dataMarshallers = (DataStreamMarshaller[]) method.invoke(null, new Object[] { this });
- } catch (Throwable e) {
- throw new IllegalArgumentException("Invalid version: " + version + ", " + mfName
- + " does not properly implement the createMarshallerMap method.", e);
- }
- this.version = version;
- }
-
public Object doUnmarshal(DataInput dis) throws IOException {
byte dataType = dis.readByte();
if (dataType != NULL_TYPE) {
public DataStructure looseUnmarshalNestedObject(DataInput dis) throws IOException {
if (dis.readBoolean()) {
-
byte dataType = dis.readByte();
DataStreamMarshaller dsm = dataMarshallers[dataType & 0xFF];
if (dsm == null) {
DataStructure data = dsm.createObject();
dsm.looseUnmarshal(this, data, dis);
return data;
-
} else {
return null;
}
this.maxFrameSize = maxFrameSize;
}
+ /**
+ * @return the useLegacyCodecs current value.
+ */
+ public boolean isUseLegacyCodecs() {
+ return useLegacyCodecs;
+ }
+
+ /**
+ * Sets whether the WireFormat should use the legacy codecs or the universal codec.
+ *
+ * @param useLegacyCodecs
+ * the useLegacyCodecs setting to use.
+ */
+ public void setUseLegacyCodecs(boolean useLegacyCodecs) {
+ this.useLegacyCodecs = useLegacyCodecs;
+ }
+
+ /**
+ * Allows you to dynamically switch the version of the openwire protocol being used.
+ *
+ * @param version
+ */
+ public void setVersion(int version) {
+ String mfName = null;
+ Class<?> mfClass;
+
+ if (!useLegacyCodecs) {
+ mfName = "org.apache.activemq.openwire.codec.universal.MarshallerFactory";
+ } else {
+ mfName = "org.apache.activemq.openwire.codec.v" + version + ".MarshallerFactory";
+ }
+
+ try {
+ mfClass = Class.forName(mfName, false, getClass().getClassLoader());
+ } catch (ClassNotFoundException e) {
+ throw new IllegalArgumentException("Invalid version: " + version + ", could not load " + mfName, e);
+ }
+
+ try {
+ Method method = mfClass.getMethod("createMarshallerMap", new Class[] { OpenWireFormat.class });
+ dataMarshallers = (DataStreamMarshaller[]) method.invoke(null, new Object[] { this });
+ } catch (Throwable e) {
+ throw new IllegalArgumentException("Invalid version: " + version + ", " + mfName
+ + " does not properly implement the createMarshallerMap method.", e);
+ }
+
+ this.version = version;
+ }
+
public void renegotiateWireFormat(WireFormatInfo info) throws IOException {
if (preferedWireFormatInfo == null) {
throw new IllegalStateException("Wireformat cannot not be renegotiated.");
--- /dev/null
+/*
+ * 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 BaseCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * 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);
+
+ BaseCommand info = (BaseCommand) target;
+
+ info.setCommandId(dataIn.readInt());
+ info.setResponseRequired(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 {
+ BaseCommand info = (BaseCommand) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ bs.writeBoolean(info.isResponseRequired());
+
+ 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);
+
+ BaseCommand info = (BaseCommand) source;
+
+ dataOut.writeInt(info.getCommandId());
+ 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 {
+ BaseCommand info = (BaseCommand) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeInt(info.getCommandId());
+ dataOut.writeBoolean(info.isResponseRequired());
+ }
+
+ /**
+ * 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);
+
+ BaseCommand info = (BaseCommand) target;
+
+ info.setCommandId(dataIn.readInt());
+ info.setResponseRequired(dataIn.readBoolean());
+ }
+}
--- /dev/null
+/*
+ * 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 BrokerId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class BrokerIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return BrokerId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new BrokerId();
+ }
+
+ /**
+ * 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);
+
+ BrokerId info = (BrokerId) target;
+
+ info.setValue(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 {
+ BrokerId info = (BrokerId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getValue(), 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);
+
+ BrokerId info = (BrokerId) source;
+
+ tightMarshalString2(info.getValue(), 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 {
+ BrokerId info = (BrokerId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getValue(), 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);
+
+ BrokerId info = (BrokerId) target;
+
+ info.setValue(looseUnmarshalString(dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 BrokerInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class BrokerInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return BrokerInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new BrokerInfo();
+ }
+
+ /**
+ * 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);
+
+ BrokerInfo info = (BrokerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setBrokerId((BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setBrokerURL(tightUnmarshalString(dataIn, bs));
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerInfo value[] = new BrokerInfo[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setPeerBrokerInfos(value);
+ } else {
+ info.setPeerBrokerInfos(null);
+ }
+ info.setBrokerName(tightUnmarshalString(dataIn, bs));
+ info.setSlaveBroker(bs.readBoolean());
+ info.setMasterBroker(bs.readBoolean());
+ info.setFaultTolerantConfiguration(bs.readBoolean());
+ if (version >= 2) {
+ info.setDuplexConnection(bs.readBoolean());
+ }
+ if (version >= 2) {
+ info.setNetworkConnection(bs.readBoolean());
+ }
+ if (version >= 2) {
+ info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setNetworkProperties(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 {
+ BrokerInfo info = (BrokerInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs);
+ rc += tightMarshalString1(info.getBrokerURL(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs);
+ rc += tightMarshalString1(info.getBrokerName(), bs);
+ bs.writeBoolean(info.isSlaveBroker());
+ bs.writeBoolean(info.isMasterBroker());
+ bs.writeBoolean(info.isFaultTolerantConfiguration());
+ if (version >= 2) {
+ bs.writeBoolean(info.isDuplexConnection());
+ }
+ if (version >= 2) {
+ bs.writeBoolean(info.isNetworkConnection());
+ }
+ if (version >= 2) {
+ rc += tightMarshalLong1(wireFormat, info.getConnectionId(), bs);
+ }
+ if (version >= 3) {
+ rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
+ }
+ if (version >= 3) {
+ rc += tightMarshalString1(info.getNetworkProperties(), 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);
+
+ BrokerInfo info = (BrokerInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs);
+ tightMarshalString2(info.getBrokerURL(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
+ tightMarshalString2(info.getBrokerName(), dataOut, bs);
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 2) {
+ tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs);
+ }
+ if (version >= 3) {
+ tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
+ }
+ if (version >= 3) {
+ tightMarshalString2(info.getNetworkProperties(), 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 {
+ BrokerInfo info = (BrokerInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut);
+ looseMarshalString(info.getBrokerURL(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut);
+ looseMarshalString(info.getBrokerName(), dataOut);
+ dataOut.writeBoolean(info.isSlaveBroker());
+ dataOut.writeBoolean(info.isMasterBroker());
+ dataOut.writeBoolean(info.isFaultTolerantConfiguration());
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isDuplexConnection());
+ }
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isNetworkConnection());
+ }
+ if (version >= 2) {
+ looseMarshalLong(wireFormat, info.getConnectionId(), dataOut);
+ }
+ if (version >= 3) {
+ looseMarshalString(info.getBrokerUploadUrl(), dataOut);
+ }
+ if (version >= 3) {
+ looseMarshalString(info.getNetworkProperties(), 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);
+
+ BrokerInfo info = (BrokerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setBrokerId((BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setBrokerURL(looseUnmarshalString(dataIn));
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerInfo value[] = new BrokerInfo[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn);
+ }
+ info.setPeerBrokerInfos(value);
+ } else {
+ info.setPeerBrokerInfos(null);
+ }
+ info.setBrokerName(looseUnmarshalString(dataIn));
+ info.setSlaveBroker(dataIn.readBoolean());
+ info.setMasterBroker(dataIn.readBoolean());
+ info.setFaultTolerantConfiguration(dataIn.readBoolean());
+ if (version >= 2) {
+ info.setDuplexConnection(dataIn.readBoolean());
+ }
+ if (version >= 2) {
+ info.setNetworkConnection(dataIn.readBoolean());
+ }
+ if (version >= 2) {
+ info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn));
+ }
+ if (version >= 3) {
+ info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
+ }
+ if (version >= 3) {
+ info.setNetworkProperties(looseUnmarshalString(dataIn));
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 ConnectionControl
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConnectionControlMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConnectionControl.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConnectionControl();
+ }
+
+ /**
+ * 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);
+
+ ConnectionControl info = (ConnectionControl) target;
+ int version = wireFormat.getVersion();
+
+ info.setClose(bs.readBoolean());
+ info.setExit(bs.readBoolean());
+ info.setFaultTolerant(bs.readBoolean());
+ info.setResume(bs.readBoolean());
+ info.setSuspend(bs.readBoolean());
+ if (version >= 6) {
+ info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 6) {
+ info.setReconnectTo(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 6) {
+ info.setRebalanceConnection(bs.readBoolean());
+ }
+ if (version >= 6) {
+ info.setToken(tightUnmarshalConstByteArray(dataIn, bs, 0));
+ }
+ }
+
+ /**
+ * 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 {
+ ConnectionControl info = (ConnectionControl) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ bs.writeBoolean(info.isClose());
+ bs.writeBoolean(info.isExit());
+ bs.writeBoolean(info.isFaultTolerant());
+ bs.writeBoolean(info.isResume());
+ bs.writeBoolean(info.isSuspend());
+ if (version >= 6) {
+ rc += tightMarshalString1(info.getConnectedBrokers(), bs);
+ }
+ if (version >= 6) {
+ rc += tightMarshalString1(info.getReconnectTo(), bs);
+ }
+ if (version >= 6) {
+ bs.writeBoolean(info.isRebalanceConnection());
+ }
+ if (version >= 6) {
+ rc += tightMarshalByteArray1(info.getToken(), 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);
+
+ ConnectionControl info = (ConnectionControl) source;
+ int version = wireFormat.getVersion();
+
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ if (version >= 6) {
+ tightMarshalString2(info.getConnectedBrokers(), dataOut, bs);
+ }
+ if (version >= 6) {
+ tightMarshalString2(info.getReconnectTo(), dataOut, bs);
+ }
+ if (version >= 6) {
+ bs.readBoolean();
+ }
+ if (version >= 6) {
+ tightMarshalByteArray2(info.getToken(), 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 {
+ ConnectionControl info = (ConnectionControl) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeBoolean(info.isClose());
+ dataOut.writeBoolean(info.isExit());
+ dataOut.writeBoolean(info.isFaultTolerant());
+ dataOut.writeBoolean(info.isResume());
+ dataOut.writeBoolean(info.isSuspend());
+ if (version >= 6) {
+ looseMarshalString(info.getConnectedBrokers(), dataOut);
+ }
+ if (version >= 6) {
+ looseMarshalString(info.getReconnectTo(), dataOut);
+ }
+ if (version >= 6) {
+ dataOut.writeBoolean(info.isRebalanceConnection());
+ }
+ if (version >= 6) {
+ looseMarshalByteArray(wireFormat, info.getToken(), 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);
+
+ ConnectionControl info = (ConnectionControl) target;
+ int version = wireFormat.getVersion();
+
+ info.setClose(dataIn.readBoolean());
+ info.setExit(dataIn.readBoolean());
+ info.setFaultTolerant(dataIn.readBoolean());
+ info.setResume(dataIn.readBoolean());
+ info.setSuspend(dataIn.readBoolean());
+ if (version >= 6) {
+ info.setConnectedBrokers(looseUnmarshalString(dataIn));
+ }
+ if (version >= 6) {
+ info.setReconnectTo(looseUnmarshalString(dataIn));
+ }
+ if (version >= 6) {
+ info.setRebalanceConnection(dataIn.readBoolean());
+ }
+ if (version >= 6) {
+ info.setToken(looseUnmarshalByteArray(dataIn));
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 ConnectionError
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConnectionErrorMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConnectionError.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConnectionError();
+ }
+
+ /**
+ * 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);
+
+ ConnectionError info = (ConnectionError) target;
+
+ info.setException((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
+ info.setConnectionId((ConnectionId) 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 {
+ ConnectionError info = (ConnectionError) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
+ rc += tightMarshalNestedObject1(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);
+
+ ConnectionError info = (ConnectionError) source;
+
+ tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
+ tightMarshalNestedObject2(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 {
+ ConnectionError info = (ConnectionError) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalThrowable(wireFormat, info.getException(), dataOut);
+ looseMarshalNestedObject(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);
+
+ ConnectionError info = (ConnectionError) target;
+
+ info.setException((Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
+ info.setConnectionId((ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 ConnectionId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConnectionIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConnectionId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConnectionId();
+ }
+
+ /**
+ * 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);
+
+ ConnectionId info = (ConnectionId) target;
+
+ info.setValue(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 {
+ ConnectionId info = (ConnectionId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getValue(), 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);
+
+ ConnectionId info = (ConnectionId) source;
+
+ tightMarshalString2(info.getValue(), 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 {
+ ConnectionId info = (ConnectionId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getValue(), 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);
+
+ ConnectionId info = (ConnectionId) target;
+
+ info.setValue(looseUnmarshalString(dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 ConnectionInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConnectionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConnectionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConnectionInfo();
+ }
+
+ /**
+ * 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);
+
+ ConnectionInfo info = (ConnectionInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ info.setPassword(tightUnmarshalString(dataIn, bs));
+ info.setUserName(tightUnmarshalString(dataIn, bs));
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ info.setBrokerMasterConnector(bs.readBoolean());
+ info.setManageable(bs.readBoolean());
+ if (version >= 2) {
+ info.setClientMaster(bs.readBoolean());
+ }
+ if (version >= 6) {
+ info.setFaultTolerant(bs.readBoolean());
+ }
+ if (version >= 6) {
+ info.setFailoverReconnect(bs.readBoolean());
+ }
+ if (version >= 8) {
+ info.setClientIp(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 {
+ ConnectionInfo info = (ConnectionInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+ rc += tightMarshalString1(info.getPassword(), bs);
+ rc += tightMarshalString1(info.getUserName(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ bs.writeBoolean(info.isBrokerMasterConnector());
+ bs.writeBoolean(info.isManageable());
+ if (version >= 2) {
+ bs.writeBoolean(info.isClientMaster());
+ }
+ if (version >= 6) {
+ bs.writeBoolean(info.isFaultTolerant());
+ }
+ if (version >= 6) {
+ bs.writeBoolean(info.isFailoverReconnect());
+ }
+ if (version >= 8) {
+ rc += tightMarshalString1(info.getClientIp(), 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);
+
+ ConnectionInfo info = (ConnectionInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ tightMarshalString2(info.getPassword(), dataOut, bs);
+ tightMarshalString2(info.getUserName(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ bs.readBoolean();
+ bs.readBoolean();
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 6) {
+ bs.readBoolean();
+ }
+ if (version >= 6) {
+ bs.readBoolean();
+ }
+ if (version >= 8) {
+ tightMarshalString2(info.getClientIp(), 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 {
+ ConnectionInfo info = (ConnectionInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ looseMarshalString(info.getPassword(), dataOut);
+ looseMarshalString(info.getUserName(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ dataOut.writeBoolean(info.isBrokerMasterConnector());
+ dataOut.writeBoolean(info.isManageable());
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isClientMaster());
+ }
+ if (version >= 6) {
+ dataOut.writeBoolean(info.isFaultTolerant());
+ }
+ if (version >= 6) {
+ dataOut.writeBoolean(info.isFailoverReconnect());
+ }
+ if (version >= 8) {
+ looseMarshalString(info.getClientIp(), 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);
+
+ ConnectionInfo info = (ConnectionInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setClientId(looseUnmarshalString(dataIn));
+ info.setPassword(looseUnmarshalString(dataIn));
+ info.setUserName(looseUnmarshalString(dataIn));
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ info.setBrokerMasterConnector(dataIn.readBoolean());
+ info.setManageable(dataIn.readBoolean());
+ if (version >= 2) {
+ info.setClientMaster(dataIn.readBoolean());
+ }
+ if (version >= 6) {
+ info.setFaultTolerant(dataIn.readBoolean());
+ }
+ if (version >= 6) {
+ info.setFailoverReconnect(dataIn.readBoolean());
+ }
+ if (version >= 8) {
+ info.setClientIp(looseUnmarshalString(dataIn));
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 ConsumerControl
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConsumerControlMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConsumerControl.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConsumerControl();
+ }
+
+ /**
+ * 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);
+
+ ConsumerControl info = (ConsumerControl) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 6) {
+ info.setDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+ info.setClose(bs.readBoolean());
+ info.setConsumerId((ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setPrefetch(dataIn.readInt());
+ if (version >= 2) {
+ info.setFlush(bs.readBoolean());
+ }
+ if (version >= 2) {
+ info.setStart(bs.readBoolean());
+ }
+ if (version >= 2) {
+ info.setStop(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 {
+ ConsumerControl info = (ConsumerControl) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ if (version >= 6) {
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ }
+ bs.writeBoolean(info.isClose());
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ if (version >= 2) {
+ bs.writeBoolean(info.isFlush());
+ }
+ if (version >= 2) {
+ bs.writeBoolean(info.isStart());
+ }
+ if (version >= 2) {
+ bs.writeBoolean(info.isStop());
+ }
+
+ 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);
+
+ ConsumerControl info = (ConsumerControl) source;
+ int version = wireFormat.getVersion();
+
+ if (version >= 6) {
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ }
+ bs.readBoolean();
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ dataOut.writeInt(info.getPrefetch());
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 2) {
+ 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 {
+ ConsumerControl info = (ConsumerControl) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ if (version >= 6) {
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ }
+ dataOut.writeBoolean(info.isClose());
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ dataOut.writeInt(info.getPrefetch());
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isFlush());
+ }
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isStart());
+ }
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isStop());
+ }
+ }
+
+ /**
+ * 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);
+
+ ConsumerControl info = (ConsumerControl) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 6) {
+ info.setDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+ info.setClose(dataIn.readBoolean());
+ info.setConsumerId((ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setPrefetch(dataIn.readInt());
+ if (version >= 2) {
+ info.setFlush(dataIn.readBoolean());
+ }
+ if (version >= 2) {
+ info.setStart(dataIn.readBoolean());
+ }
+ if (version >= 2) {
+ info.setStop(dataIn.readBoolean());
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 ConsumerId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConsumerIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConsumerId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConsumerId();
+ }
+
+ /**
+ * 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);
+
+ ConsumerId info = (ConsumerId) target;
+
+ info.setConnectionId(tightUnmarshalString(dataIn, bs));
+ info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setValue(tightUnmarshalLong(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 {
+ ConsumerId info = (ConsumerId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getConnectionId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getValue(), 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);
+
+ ConsumerId info = (ConsumerId) source;
+
+ tightMarshalString2(info.getConnectionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getValue(), 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 {
+ ConsumerId info = (ConsumerId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getConnectionId(), dataOut);
+ looseMarshalLong(wireFormat, info.getSessionId(), dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), 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);
+
+ ConsumerId info = (ConsumerId) target;
+
+ info.setConnectionId(looseUnmarshalString(dataIn));
+ info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 ConsumerInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ConsumerInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ConsumerInfo();
+ }
+
+ /**
+ * 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);
+
+ ConsumerInfo info = (ConsumerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setBrowser(bs.readBoolean());
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setPrefetchSize(dataIn.readInt());
+ info.setMaximumPendingMessageLimit(dataIn.readInt());
+ info.setDispatchAsync(bs.readBoolean());
+ info.setSelector(tightUnmarshalString(dataIn, bs));
+ if (version >= 10) {
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ }
+ info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
+ info.setNoLocal(bs.readBoolean());
+ info.setExclusive(bs.readBoolean());
+ info.setRetroactive(bs.readBoolean());
+ info.setPriority(dataIn.readByte());
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ info.setAdditionalPredicate((Object) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setNetworkSubscription(bs.readBoolean());
+ info.setOptimizedAcknowledge(bs.readBoolean());
+ info.setNoRangeAcks(bs.readBoolean());
+ if (version >= 4) {
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ ConsumerId value[] = new ConsumerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (ConsumerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setNetworkConsumerPath(value);
+ } else {
+ info.setNetworkConsumerPath(null);
+ }
+ }
+ }
+
+ /**
+ * 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 {
+ ConsumerInfo info = (ConsumerInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ bs.writeBoolean(info.isBrowser());
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ bs.writeBoolean(info.isDispatchAsync());
+ rc += tightMarshalString1(info.getSelector(), bs);
+ if (version >= 10) {
+ rc += tightMarshalString1(info.getClientId(), bs);
+ }
+ rc += tightMarshalString1(info.getSubscriptionName(), bs);
+ bs.writeBoolean(info.isNoLocal());
+ bs.writeBoolean(info.isExclusive());
+ bs.writeBoolean(info.isRetroactive());
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs);
+ bs.writeBoolean(info.isNetworkSubscription());
+ bs.writeBoolean(info.isOptimizedAcknowledge());
+ bs.writeBoolean(info.isNoRangeAcks());
+ if (version >= 4) {
+ rc += tightMarshalObjectArray1(wireFormat, info.getNetworkConsumerPath(), bs);
+ }
+
+ return rc + 9;
+ }
+
+ /**
+ * 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);
+
+ ConsumerInfo info = (ConsumerInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ bs.readBoolean();
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ dataOut.writeInt(info.getPrefetchSize());
+ dataOut.writeInt(info.getMaximumPendingMessageLimit());
+ bs.readBoolean();
+ tightMarshalString2(info.getSelector(), dataOut, bs);
+ if (version >= 10) {
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ }
+ tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ dataOut.writeByte(info.getPriority());
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs);
+ bs.readBoolean();
+ bs.readBoolean();
+ bs.readBoolean();
+ if (version >= 4) {
+ tightMarshalObjectArray2(wireFormat, info.getNetworkConsumerPath(), 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 {
+ ConsumerInfo info = (ConsumerInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ dataOut.writeBoolean(info.isBrowser());
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ dataOut.writeInt(info.getPrefetchSize());
+ dataOut.writeInt(info.getMaximumPendingMessageLimit());
+ dataOut.writeBoolean(info.isDispatchAsync());
+ looseMarshalString(info.getSelector(), dataOut);
+ if (version >= 10) {
+ looseMarshalString(info.getClientId(), dataOut);
+ }
+ looseMarshalString(info.getSubscriptionName(), dataOut);
+ dataOut.writeBoolean(info.isNoLocal());
+ dataOut.writeBoolean(info.isExclusive());
+ dataOut.writeBoolean(info.isRetroactive());
+ dataOut.writeByte(info.getPriority());
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut);
+ dataOut.writeBoolean(info.isNetworkSubscription());
+ dataOut.writeBoolean(info.isOptimizedAcknowledge());
+ dataOut.writeBoolean(info.isNoRangeAcks());
+ if (version >= 4) {
+ looseMarshalObjectArray(wireFormat, info.getNetworkConsumerPath(), 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);
+
+ ConsumerInfo info = (ConsumerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setBrowser(dataIn.readBoolean());
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setPrefetchSize(dataIn.readInt());
+ info.setMaximumPendingMessageLimit(dataIn.readInt());
+ info.setDispatchAsync(dataIn.readBoolean());
+ info.setSelector(looseUnmarshalString(dataIn));
+ if (version >= 10) {
+ info.setClientId(looseUnmarshalString(dataIn));
+ }
+ info.setSubscriptionName(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.setAdditionalPredicate((Object) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setNetworkSubscription(dataIn.readBoolean());
+ info.setOptimizedAcknowledge(dataIn.readBoolean());
+ info.setNoRangeAcks(dataIn.readBoolean());
+ if (version >= 4) {
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ ConsumerId value[] = new ConsumerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (ConsumerId) looseUnmarsalNestedObject(wireFormat,dataIn);
+ }
+ info.setNetworkConsumerPath(value);
+ } else {
+ info.setNetworkConsumerPath(null);
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 ControlCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ControlCommandMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ControlCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ControlCommand();
+ }
+
+ /**
+ * 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);
+
+ ControlCommand info = (ControlCommand) target;
+
+ info.setCommand(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 {
+ ControlCommand info = (ControlCommand) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getCommand(), 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);
+
+ ControlCommand info = (ControlCommand) source;
+
+ tightMarshalString2(info.getCommand(), 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 {
+ ControlCommand info = (ControlCommand) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getCommand(), 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);
+
+ ControlCommand info = (ControlCommand) target;
+
+ info.setCommand(looseUnmarshalString(dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 DataArrayResponse
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class DataArrayResponseMarshaller extends ResponseMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return DataArrayResponse.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new DataArrayResponse();
+ }
+
+ /**
+ * 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);
+
+ DataArrayResponse info = (DataArrayResponse) target;
+
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ DataStructure value[] = new DataStructure[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setData(value);
+ } else {
+ info.setData(null);
+ }
+ }
+
+ /**
+ * 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 {
+ DataArrayResponse info = (DataArrayResponse) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getData(), 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);
+
+ DataArrayResponse info = (DataArrayResponse) source;
+
+ tightMarshalObjectArray2(wireFormat, info.getData(), 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 {
+ DataArrayResponse info = (DataArrayResponse) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalObjectArray(wireFormat, info.getData(), 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);
+
+ DataArrayResponse info = (DataArrayResponse) target;
+
+ 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 DataResponse
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class DataResponseMarshaller extends ResponseMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return DataResponse.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new DataResponse();
+ }
+
+ /**
+ * 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);
+
+ DataResponse info = (DataResponse) target;
+
+ info.setData((DataStructure) 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 {
+ DataResponse info = (DataResponse) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), 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);
+
+ DataResponse info = (DataResponse) source;
+
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), 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 {
+ DataResponse info = (DataResponse) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), 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);
+
+ DataResponse info = (DataResponse) target;
+
+ info.setData((DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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 DestinationInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class DestinationInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return DestinationInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new DestinationInfo();
+ }
+
+ /**
+ * 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);
+
+ DestinationInfo info = (DestinationInfo) target;
+
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setOperationType(dataIn.readByte());
+ 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) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ }
+
+ /**
+ * 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 {
+ DestinationInfo info = (DestinationInfo) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+
+ 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);
+
+ DestinationInfo info = (DestinationInfo) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ dataOut.writeByte(info.getOperationType());
+ tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), 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 {
+ DestinationInfo info = (DestinationInfo) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ dataOut.writeByte(info.getOperationType());
+ looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), 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);
+
+ DestinationInfo info = (DestinationInfo) target;
+
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) 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);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 DiscoveryEvent
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return DiscoveryEvent.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new DiscoveryEvent();
+ }
+
+ /**
+ * 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);
+
+ DiscoveryEvent info = (DiscoveryEvent) target;
+
+ info.setServiceName(tightUnmarshalString(dataIn, bs));
+ info.setBrokerName(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 {
+ DiscoveryEvent info = (DiscoveryEvent) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getServiceName(), bs);
+ rc += tightMarshalString1(info.getBrokerName(), 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);
+
+ DiscoveryEvent info = (DiscoveryEvent) source;
+
+ tightMarshalString2(info.getServiceName(), dataOut, bs);
+ tightMarshalString2(info.getBrokerName(), 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 {
+ DiscoveryEvent info = (DiscoveryEvent) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getServiceName(), dataOut);
+ looseMarshalString(info.getBrokerName(), 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);
+
+ DiscoveryEvent info = (DiscoveryEvent) target;
+
+ info.setServiceName(looseUnmarshalString(dataIn));
+ info.setBrokerName(looseUnmarshalString(dataIn));
+ }
+}
--- /dev/null
+/*
+ * 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));
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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());
+ }
+}
--- /dev/null
+/*
+ * 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));
+ }
+}
--- /dev/null
+/*
+ * 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));
+ }
+}
--- /dev/null
+/*
+ * 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));
+ }
+}
--- /dev/null
+/*
+ * 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());
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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);
+ }
+}
--- /dev/null
+/*
+ * 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));
+ }
+}
--- /dev/null
+/*
+ * 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&