OPENWIRE-19
Create an annotation based codec generator and a set of openwire
annotations that can be used to decorate openwire commands to define the
openwire command set and any extensions.
OPENWIRE-10
Create a marsaller implementation that uses the openwire annotations to
generate a single codec capable of encoding and decoding all openwire
versions. Move all single version codecs into the legacy module.
diff --git a/openwire-annotations/.gitignore b/openwire-annotations/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/openwire-annotations/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/openwire-annotations/pom.xml b/openwire-annotations/pom.xml
new file mode 100644
index 0000000..af29c42
--- /dev/null
+++ b/openwire-annotations/pom.xml
@@ -0,0 +1,31 @@
+<?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>
diff --git a/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireDocumentation.java b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireDocumentation.java
new file mode 100644
index 0000000..e51cf52
--- /dev/null
+++ b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireDocumentation.java
@@ -0,0 +1,38 @@
+/*
+ * 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 "";
+
+}
diff --git a/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireExtension.java b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireExtension.java
new file mode 100644
index 0000000..13a3c84
--- /dev/null
+++ b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireExtension.java
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+}
diff --git a/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireProperty.java b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireProperty.java
new file mode 100644
index 0000000..a4646c4
--- /dev/null
+++ b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireProperty.java
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+}
diff --git a/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireType.java b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireType.java
new file mode 100644
index 0000000..797aef1
--- /dev/null
+++ b/openwire-annotations/src/main/java/org/apache/activemq/openwire/annotations/OpenWireType.java
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+}
diff --git a/openwire-core/pom.xml b/openwire-core/pom.xml
index 18d3573..62077dd 100644
--- a/openwire-core/pom.xml
+++ b/openwire-core/pom.xml
@@ -29,16 +29,18 @@
<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>
@@ -64,135 +66,59 @@
<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>
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/OpenWireFormat.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/OpenWireFormat.java
index 720d658..9e0c063 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/OpenWireFormat.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/OpenWireFormat.java
@@ -53,6 +53,8 @@
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;
@@ -93,6 +95,7 @@
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;
@@ -123,7 +126,6 @@
throw new IOException("Unknown data type: " + type);
}
if (tightEncodingEnabled) {
-
BooleanStream bs = new BooleanStream();
size += dsm.tightMarshal1(this, c, bs);
size += bs.marshalledSize();
@@ -136,7 +138,6 @@
bs.marshal(bytesOut);
dsm.tightMarshal2(this, c, bytesOut, bs);
sequence = bytesOut.toBuffer();
-
} else {
bytesOut.restart();
if (!sizePrefixDisabled) {
@@ -181,7 +182,6 @@
}
public synchronized void marshal(Object o, DataOutput dataOut) throws IOException {
-
if (cacheEnabled) {
runMarshallCacheEvictionSweep();
}
@@ -195,6 +195,7 @@
if (dsm == null) {
throw new IOException("Unknown data type: " + type);
}
+
if (tightEncodingEnabled) {
BooleanStream bs = new BooleanStream();
size += dsm.tightMarshal1(this, c, bs);
@@ -207,7 +208,6 @@
dataOut.writeByte(type);
bs.marshal(dataOut);
dsm.tightMarshal2(this, c, dataOut, bs);
-
} else {
DataOutput looseOut = dataOut;
@@ -224,9 +224,7 @@
dataOut.writeInt(sequence.getLength());
dataOut.write(sequence.getData(), sequence.getOffset(), sequence.getLength());
}
-
}
-
} else {
if (!sizePrefixDisabled) {
dataOut.writeInt(size);
@@ -243,6 +241,7 @@
throw new IOException("Frame size of " + (size / (1024 * 1024)) + " MB larger than max allowed " + (maxFrameSize / (1024 * 1024)) + " MB");
}
}
+
return doUnmarshal(dataIn);
}
@@ -262,6 +261,7 @@
size += dsm.tightMarshal1(this, c, bs);
size += bs.marshalledSize();
}
+
return size;
}
@@ -286,29 +286,6 @@
}
}
- /**
- * 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) {
@@ -400,7 +377,6 @@
public DataStructure looseUnmarshalNestedObject(DataInput dis) throws IOException {
if (dis.readBoolean()) {
-
byte dataType = dis.readByte();
DataStreamMarshaller dsm = dataMarshallers[dataType & 0xFF];
if (dsm == null) {
@@ -409,7 +385,6 @@
DataStructure data = dsm.createObject();
dsm.looseUnmarshal(this, data, dis);
return data;
-
} else {
return null;
}
@@ -536,6 +511,55 @@
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.");
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BaseCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BaseCommandMarshaller.java
new file mode 100644
index 0000000..cd4f683
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BaseCommandMarshaller.java
@@ -0,0 +1,119 @@
+/*
+ * 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());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerIdMarshaller.java
new file mode 100644
index 0000000..d2def84
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerIdMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerInfoMarshaller.java
new file mode 100644
index 0000000..b7c0433
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/BrokerInfoMarshaller.java
@@ -0,0 +1,259 @@
+/*
+ * 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));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionControlMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionControlMarshaller.java
new file mode 100644
index 0000000..da4aa81
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionControlMarshaller.java
@@ -0,0 +1,216 @@
+/*
+ * 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));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionErrorMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionErrorMarshaller.java
new file mode 100644
index 0000000..c694202
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionErrorMarshaller.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionIdMarshaller.java
new file mode 100644
index 0000000..91a5bb6
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionIdMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionInfoMarshaller.java
new file mode 100644
index 0000000..184f272
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConnectionInfoMarshaller.java
@@ -0,0 +1,244 @@
+/*
+ * 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));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerControlMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerControlMarshaller.java
new file mode 100644
index 0000000..21958cb
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerControlMarshaller.java
@@ -0,0 +1,205 @@
+/*
+ * 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());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerIdMarshaller.java
new file mode 100644
index 0000000..974997d
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerIdMarshaller.java
@@ -0,0 +1,141 @@
+/*
+ * 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerInfoMarshaller.java
new file mode 100644
index 0000000..216735f
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ConsumerInfoMarshaller.java
@@ -0,0 +1,279 @@
+/*
+ * 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);
+ }
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ControlCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ControlCommandMarshaller.java
new file mode 100644
index 0000000..536b7cf
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ControlCommandMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataArrayResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataArrayResponseMarshaller.java
new file mode 100644
index 0000000..8c50f26
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataArrayResponseMarshaller.java
@@ -0,0 +1,149 @@
+/*
+ * 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);
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataResponseMarshaller.java
new file mode 100644
index 0000000..e51fbed
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DataResponseMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DestinationInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DestinationInfoMarshaller.java
new file mode 100644
index 0000000..a55be2a
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DestinationInfoMarshaller.java
@@ -0,0 +1,168 @@
+/*
+ * 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);
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DiscoveryEventMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DiscoveryEventMarshaller.java
new file mode 100644
index 0000000..3a79c4e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/DiscoveryEventMarshaller.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for 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));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java
new file mode 100644
index 0000000..bfd19dd
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ExceptionResponseMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for ExceptionResponse
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ExceptionResponseMarshaller extends ResponseMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ExceptionResponse.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ExceptionResponse();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ ExceptionResponse info = (ExceptionResponse) target;
+
+ info.setException((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ ExceptionResponse info = (ExceptionResponse) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalThrowable1(wireFormat, info.getException(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ ExceptionResponse info = (ExceptionResponse) source;
+
+ tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ ExceptionResponse info = (ExceptionResponse) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalThrowable(wireFormat, info.getException(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ ExceptionResponse info = (ExceptionResponse) target;
+
+ info.setException((Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java
new file mode 100644
index 0000000..3ff520e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/FlushCommandMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for FlushCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class FlushCommandMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return FlushCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new FlushCommand();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, source, dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java
new file mode 100644
index 0000000..b31f7c8
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/IntegerResponseMarshaller.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for IntegerResponse
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class IntegerResponseMarshaller extends ResponseMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return IntegerResponse.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new IntegerResponse();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ IntegerResponse info = (IntegerResponse) target;
+
+ info.setResult(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ IntegerResponse info = (IntegerResponse) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ IntegerResponse info = (IntegerResponse) source;
+
+ dataOut.writeInt(info.getResult());
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ IntegerResponse info = (IntegerResponse) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeInt(info.getResult());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ IntegerResponse info = (IntegerResponse) target;
+
+ info.setResult(dataIn.readInt());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java
new file mode 100644
index 0000000..229b92e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalQueueAckMarshaller.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for JournalQueueAck
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return JournalQueueAck.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new JournalQueueAck();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ JournalQueueAck info = (JournalQueueAck) target;
+
+ info.setDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageAck((MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ JournalQueueAck info = (JournalQueueAck) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ JournalQueueAck info = (JournalQueueAck) source;
+
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ JournalQueueAck info = (JournalQueueAck) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ JournalQueueAck info = (JournalQueueAck) target;
+
+ info.setDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageAck((MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java
new file mode 100644
index 0000000..c4c0431
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTopicAckMarshaller.java
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for JournalTopicAck
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return JournalTopicAck.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new JournalTopicAck();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ JournalTopicAck info = (JournalTopicAck) target;
+
+ info.setDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setSubscritionName(tightUnmarshalString(dataIn, bs));
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ JournalTopicAck info = (JournalTopicAck) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs);
+ rc += tightMarshalString1(info.getSubscritionName(), bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ JournalTopicAck info = (JournalTopicAck) source;
+
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs);
+ tightMarshalString2(info.getSubscritionName(), dataOut, bs);
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ JournalTopicAck info = (JournalTopicAck) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
+ looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut);
+ looseMarshalString(info.getSubscritionName(), dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ JournalTopicAck info = (JournalTopicAck) target;
+
+ info.setDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ info.setSubscritionName(looseUnmarshalString(dataIn));
+ info.setClientId(looseUnmarshalString(dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java
new file mode 100644
index 0000000..2c42ab2
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTraceMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for JournalTrace
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class JournalTraceMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return JournalTrace.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new JournalTrace();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ JournalTrace info = (JournalTrace) target;
+
+ info.setMessage(tightUnmarshalString(dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ JournalTrace info = (JournalTrace) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getMessage(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ JournalTrace info = (JournalTrace) source;
+
+ tightMarshalString2(info.getMessage(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ JournalTrace info = (JournalTrace) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getMessage(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ JournalTrace info = (JournalTrace) target;
+
+ info.setMessage(looseUnmarshalString(dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java
new file mode 100644
index 0000000..2f74d93
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/JournalTransactionMarshaller.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for JournalTransaction
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class JournalTransactionMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return JournalTransaction.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new JournalTransaction();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ JournalTransaction info = (JournalTransaction) target;
+
+ info.setTransactionId((TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setType(dataIn.readByte());
+ info.setWasPrepared(bs.readBoolean());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ JournalTransaction info = (JournalTransaction) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
+ bs.writeBoolean(info.getWasPrepared());
+
+ return rc + 1;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ JournalTransaction info = (JournalTransaction) source;
+
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
+ dataOut.writeByte(info.getType());
+ bs.readBoolean();
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ JournalTransaction info = (JournalTransaction) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
+ dataOut.writeByte(info.getType());
+ dataOut.writeBoolean(info.getWasPrepared());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ JournalTransaction info = (JournalTransaction) target;
+
+ info.setTransactionId((TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setType(dataIn.readByte());
+ info.setWasPrepared(dataIn.readBoolean());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java
new file mode 100644
index 0000000..beae045
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/KeepAliveInfoMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for KeepAliveInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class KeepAliveInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return KeepAliveInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new KeepAliveInfo();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, source, dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java
new file mode 100644
index 0000000..4289dc4
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LastPartialCommandMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for LastPartialCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class LastPartialCommandMarshaller extends PartialCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return LastPartialCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new LastPartialCommand();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ super.looseMarshal(wireFormat, source, dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java
new file mode 100644
index 0000000..896b21e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/LocalTransactionIdMarshaller.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for LocalTransactionId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class LocalTransactionIdMarshaller extends TransactionIdMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return LocalTransactionId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new LocalTransactionId();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ LocalTransactionId info = (LocalTransactionId) target;
+
+ info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ LocalTransactionId info = (LocalTransactionId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ LocalTransactionId info = (LocalTransactionId) source;
+
+ tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ LocalTransactionId info = (LocalTransactionId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ LocalTransactionId info = (LocalTransactionId) target;
+
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java
new file mode 100644
index 0000000..3e1989d
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MarshallerFactory.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import org.apache.activemq.openwire.codec.DataStreamMarshaller;
+import org.apache.activemq.openwire.codec.OpenWireFormat;
+
+/**
+ * Marshalling Factory for the Universal OpenWire Codec package.
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MarshallerFactory{
+
+ /**
+ * Creates a Map of command type -> Marshallers
+ */
+ static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];
+ static {
+
+ add(new BrokerIdMarshaller());
+ add(new BrokerInfoMarshaller());
+ add(new ConnectionControlMarshaller());
+ add(new ConnectionErrorMarshaller());
+ add(new ConnectionIdMarshaller());
+ add(new ConnectionInfoMarshaller());
+ add(new ConsumerControlMarshaller());
+ add(new ConsumerIdMarshaller());
+ add(new ConsumerInfoMarshaller());
+ add(new ControlCommandMarshaller());
+ add(new DataArrayResponseMarshaller());
+ add(new DataResponseMarshaller());
+ add(new DestinationInfoMarshaller());
+ add(new DiscoveryEventMarshaller());
+ add(new ExceptionResponseMarshaller());
+ add(new FlushCommandMarshaller());
+ add(new IntegerResponseMarshaller());
+ add(new JournalQueueAckMarshaller());
+ add(new JournalTopicAckMarshaller());
+ add(new JournalTraceMarshaller());
+ add(new JournalTransactionMarshaller());
+ add(new KeepAliveInfoMarshaller());
+ add(new LastPartialCommandMarshaller());
+ add(new LocalTransactionIdMarshaller());
+ add(new MessageAckMarshaller());
+ add(new MessageDispatchMarshaller());
+ add(new MessageDispatchNotificationMarshaller());
+ add(new MessageIdMarshaller());
+ add(new MessagePullMarshaller());
+ add(new NetworkBridgeFilterMarshaller());
+ add(new OpenWireBlobMessageMarshaller());
+ add(new OpenWireBytesMessageMarshaller());
+ add(new OpenWireMapMessageMarshaller());
+ add(new OpenWireMessageMarshaller());
+ add(new OpenWireObjectMessageMarshaller());
+ add(new OpenWireQueueMarshaller());
+ add(new OpenWireStreamMessageMarshaller());
+ add(new OpenWireTempQueueMarshaller());
+ add(new OpenWireTempTopicMarshaller());
+ add(new OpenWireTextMessageMarshaller());
+ add(new OpenWireTopicMarshaller());
+ add(new PartialCommandMarshaller());
+ add(new ProducerAckMarshaller());
+ add(new ProducerIdMarshaller());
+ add(new ProducerInfoMarshaller());
+ add(new RemoveInfoMarshaller());
+ add(new RemoveSubscriptionInfoMarshaller());
+ add(new ReplayCommandMarshaller());
+ add(new ResponseMarshaller());
+ add(new SessionIdMarshaller());
+ add(new SessionInfoMarshaller());
+ add(new ShutdownInfoMarshaller());
+ add(new SubscriptionInfoMarshaller());
+ add(new TransactionInfoMarshaller());
+ add(new WireFormatInfoMarshaller());
+ add(new XATransactionIdMarshaller());
+ }
+
+ static private void add(DataStreamMarshaller dsm) {
+ marshaller[dsm.getDataStructureType()] = dsm;
+ }
+
+ static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {
+ return marshaller;
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java
new file mode 100644
index 0000000..84b9e94
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageAckMarshaller.java
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for MessageAck
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MessageAckMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return MessageAck.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new MessageAck();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ MessageAck info = (MessageAck) target;
+ int version = wireFormat.getVersion();
+
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setAckType(dataIn.readByte());
+ info.setFirstMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setLastMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setMessageCount(dataIn.readInt());
+ if (version >= 7) {
+ info.setPoisonCause((Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs));
+ }
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ MessageAck info = (MessageAck) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs);
+ if (version >= 7) {
+ rc += tightMarshalThrowable1(wireFormat, info.getPoisonCause(), bs);
+ }
+
+ return rc + 5;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ MessageAck info = (MessageAck) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ dataOut.writeByte(info.getAckType());
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs);
+ dataOut.writeInt(info.getMessageCount());
+ if (version >= 7) {
+ tightMarshalThrowable2(wireFormat, info.getPoisonCause(), dataOut, bs);
+ }
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ MessageAck info = (MessageAck) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ dataOut.writeByte(info.getAckType());
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut);
+ dataOut.writeInt(info.getMessageCount());
+ if (version >= 7) {
+ looseMarshalThrowable(wireFormat, info.getPoisonCause(), dataOut);
+ }
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ MessageAck info = (MessageAck) target;
+ int version = wireFormat.getVersion();
+
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setAckType(dataIn.readByte());
+ info.setFirstMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setLastMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setMessageCount(dataIn.readInt());
+ if (version >= 7) {
+ info.setPoisonCause((Throwable) looseUnmarsalThrowable(wireFormat, dataIn));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java
new file mode 100644
index 0000000..68d9e0f
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchMarshaller.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for MessageDispatch
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MessageDispatchMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return MessageDispatch.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new MessageDispatch();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ MessageDispatch info = (MessageDispatch) target;
+
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setMessage((Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setRedeliveryCounter(dataIn.readInt());
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ MessageDispatch info = (MessageDispatch) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs);
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ MessageDispatch info = (MessageDispatch) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs);
+ dataOut.writeInt(info.getRedeliveryCounter());
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ MessageDispatch info = (MessageDispatch) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut);
+ dataOut.writeInt(info.getRedeliveryCounter());
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ MessageDispatch info = (MessageDispatch) target;
+
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setMessage((Message) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setRedeliveryCounter(dataIn.readInt());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java
new file mode 100644
index 0000000..bd776c5
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageDispatchNotificationMarshaller.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for MessageDispatchNotification
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return MessageDispatchNotification.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new MessageDispatchNotification();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @param bs the boolean stream where the type's booleans were marshaled
+ *
+ * @throws IOException if an error occurs while reading the data
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, target, dataIn, bs);
+
+ MessageDispatchNotification info = (MessageDispatchNotification) target;
+
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ MessageDispatchNotification info = (MessageDispatchNotification) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ MessageDispatchNotification info = (MessageDispatchNotification) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ MessageDispatchNotification info = (MessageDispatchNotification) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ MessageDispatchNotification info = (MessageDispatchNotification) target;
+
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageIdMarshaller.java
new file mode 100644
index 0000000..fb9fa4e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageIdMarshaller.java
@@ -0,0 +1,161 @@
+/*
+ * 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 MessageId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MessageIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return MessageId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new MessageId();
+ }
+
+ /**
+ * 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);
+
+ MessageId info = (MessageId) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 10) {
+ info.setTextView(tightUnmarshalString(dataIn, bs));
+ }
+ info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setBrokerSequenceId(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 {
+ MessageId info = (MessageId) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ if (version >= 10) {
+ rc += tightMarshalString1(info.getTextView(), bs);
+ }
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), 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);
+
+ MessageId info = (MessageId) source;
+ int version = wireFormat.getVersion();
+
+ if (version >= 10) {
+ tightMarshalString2(info.getTextView(), dataOut, bs);
+ }
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), 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 {
+ MessageId info = (MessageId) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ if (version >= 10) {
+ looseMarshalString(info.getTextView(), dataOut);
+ }
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
+ looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
+ looseMarshalLong(wireFormat, info.getBrokerSequenceId(), 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);
+
+ MessageId info = (MessageId) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 10) {
+ info.setTextView(looseUnmarshalString(dataIn));
+ }
+ info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageMarshaller.java
new file mode 100644
index 0000000..f7b91f8
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessageMarshaller.java
@@ -0,0 +1,362 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import org.fusesource.hawtbuf.Buffer;
+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 Message
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public abstract class MessageMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * 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);
+
+ Message info = (Message) target;
+ int version = wireFormat.getVersion();
+
+ info.beforeUnmarshall(wireFormat);
+ info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setOriginalDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setOriginalTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setGroupID(tightUnmarshalString(dataIn, bs));
+ info.setGroupSequence(dataIn.readInt());
+ info.setCorrelationId(tightUnmarshalString(dataIn, bs));
+ info.setPersistent(bs.readBoolean());
+ info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setPriority(dataIn.readByte());
+ info.setReplyTo((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setType(tightUnmarshalString(dataIn, bs));
+ info.setContent(tightUnmarshalByteSequence(dataIn, bs));
+ info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
+ info.setDataStructure((DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ info.setTargetConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setCompressed(bs.readBoolean());
+ info.setRedeliveryCounter(dataIn.readInt());
+ 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.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setUserId(tightUnmarshalString(dataIn, bs));
+ info.setRecievedByDFBridge(bs.readBoolean());
+ if (version >= 2) {
+ info.setDroppable(bs.readBoolean());
+ }
+ if (version >= 3) {
+ 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.setCluster(value);
+ } else {
+ info.setCluster(null);
+ }
+ }
+ if (version >= 3) {
+ info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+ if (version >= 10) {
+ info.setJMSXGroupFirstForConsumer(bs.readBoolean());
+ }
+
+ info.afterUnmarshall(wireFormat);
+ }
+
+ /**
+ * 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 {
+ Message info = (Message) source;
+ int version = wireFormat.getVersion();
+
+ info.beforeMarshall(wireFormat);
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs);
+ rc += tightMarshalString1(info.getGroupId(), bs);
+ rc += tightMarshalString1(info.getCorrelationId(), bs);
+ bs.writeBoolean(info.isPersistent());
+ rc += tightMarshalLong1(wireFormat, info.getExpiration(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getTimestamp(), bs);
+ rc += tightMarshalString1(info.getType(), bs);
+ rc += tightMarshalByteSequence1(info.getContent(), bs);
+ rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs);
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs);
+ bs.writeBoolean(info.isCompressed());
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getArrival(), bs);
+ rc += tightMarshalString1(info.getUserId(), bs);
+ bs.writeBoolean(info.isRecievedByDFBridge());
+ if (version >= 2) {
+ bs.writeBoolean(info.isDroppable());
+ }
+ if (version >= 3) {
+ rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
+ }
+ if (version >= 3) {
+ rc += tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
+ }
+ if (version >= 3) {
+ rc += tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
+ }
+ if (version >= 10) {
+ bs.writeBoolean(info.isJMSXGroupFirstForConsumer());
+ }
+
+ 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);
+
+ Message info = (Message) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs);
+ tightMarshalString2(info.getGroupId(), dataOut, bs);
+ dataOut.writeInt(info.getGroupSequence());
+ tightMarshalString2(info.getCorrelationId(), dataOut, bs);
+ bs.readBoolean();
+ tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs);
+ dataOut.writeByte(info.getPriority());
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs);
+ tightMarshalString2(info.getType(), dataOut, bs);
+ tightMarshalByteSequence2(info.getContent(), dataOut, bs);
+ tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs);
+ bs.readBoolean();
+ dataOut.writeInt(info.getRedeliveryCounter());
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs);
+ tightMarshalString2(info.getUserId(), dataOut, bs);
+ bs.readBoolean();
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 3) {
+ tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
+ }
+ if (version >= 3) {
+ tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
+ }
+ if (version >= 3) {
+ tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
+ }
+ if (version >= 10) {
+ bs.readBoolean();
+ }
+
+ info.afterMarshall(wireFormat);
+ }
+
+ /**
+ * 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 {
+ Message info = (Message) source;
+ int version = wireFormat.getVersion();
+
+ info.beforeMarshall(wireFormat);
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut);
+ looseMarshalString(info.getGroupId(), dataOut);
+ dataOut.writeInt(info.getGroupSequence());
+ looseMarshalString(info.getCorrelationId(), dataOut);
+ dataOut.writeBoolean(info.isPersistent());
+ looseMarshalLong(wireFormat, info.getExpiration(), dataOut);
+ dataOut.writeByte(info.getPriority());
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut);
+ looseMarshalLong(wireFormat, info.getTimestamp(), dataOut);
+ looseMarshalString(info.getType(), dataOut);
+ looseMarshalByteSequence(wireFormat, info.getContent(), dataOut);
+ looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut);
+ dataOut.writeBoolean(info.isCompressed());
+ dataOut.writeInt(info.getRedeliveryCounter());
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ looseMarshalLong(wireFormat, info.getArrival(), dataOut);
+ looseMarshalString(info.getUserId(), dataOut);
+ dataOut.writeBoolean(info.isRecievedByDFBridge());
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isDroppable());
+ }
+ if (version >= 3) {
+ looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
+ }
+ if (version >= 3) {
+ looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
+ }
+ if (version >= 3) {
+ looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
+ }
+ if (version >= 10) {
+ dataOut.writeBoolean(info.isJMSXGroupFirstForConsumer());
+ }
+
+ info.afterMarshall(wireFormat);
+ }
+
+ /**
+ * 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);
+
+ Message info = (Message) target;
+ int version = wireFormat.getVersion();
+
+ info.beforeUnmarshall(wireFormat);
+ info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setOriginalDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setOriginalTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setGroupID(looseUnmarshalString(dataIn));
+ info.setGroupSequence(dataIn.readInt());
+ info.setCorrelationId(looseUnmarshalString(dataIn));
+ info.setPersistent(dataIn.readBoolean());
+ info.setExpiration(looseUnmarshalLong(wireFormat, dataIn));
+ info.setPriority(dataIn.readByte());
+ info.setReplyTo((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn));
+ info.setType(looseUnmarshalString(dataIn));
+ info.setContent(looseUnmarshalByteSequence(dataIn));
+ info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
+ info.setDataStructure((DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn));
+ info.setTargetConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setCompressed(dataIn.readBoolean());
+ info.setRedeliveryCounter(dataIn.readInt());
+ 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.setArrival(looseUnmarshalLong(wireFormat, dataIn));
+ info.setUserId(looseUnmarshalString(dataIn));
+ info.setRecievedByDFBridge(dataIn.readBoolean());
+ if (version >= 2) {
+ info.setDroppable(dataIn.readBoolean());
+ }
+ if (version >= 3) {
+ 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.setCluster(value);
+ } else {
+ info.setCluster(null);
+ }
+ }
+ if (version >= 3) {
+ info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
+ }
+ if (version >= 3) {
+ info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
+ }
+ if (version >= 10) {
+ info.setJMSXGroupFirstForConsumer(dataIn.readBoolean());
+ }
+
+ info.afterUnmarshall(wireFormat);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessagePullMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessagePullMarshaller.java
new file mode 100644
index 0000000..ab4afca
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/MessagePullMarshaller.java
@@ -0,0 +1,176 @@
+/*
+ * 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 MessagePull
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class MessagePullMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return MessagePull.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new MessagePull();
+ }
+
+ /**
+ * 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);
+
+ MessagePull info = (MessagePull) target;
+ int version = wireFormat.getVersion();
+
+ info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
+ if (version >= 3) {
+ info.setCorrelationId(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 4) {
+ info.setMessageId((MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {
+ MessagePull info = (MessagePull) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
+ if (version >= 3) {
+ rc += tightMarshalString1(info.getCorrelationId(), bs);
+ }
+ if (version >= 4) {
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs);
+ }
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat the OpenWireFormat instance to use
+ * @param source the object to marshal
+ * @param dataOut the DataOut where the properties are written
+ * @param bs the boolean stream where the type's booleans are written
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, source, dataOut, bs);
+
+ MessagePull info = (MessagePull) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
+ if (version >= 3) {
+ tightMarshalString2(info.getCorrelationId(), dataOut, bs);
+ }
+ if (version >= 4) {
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs);
+ }
+ }
+
+ /**
+ * Write the object to the output using loose marshaling.
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {
+ MessagePull info = (MessagePull) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
+ if (version >= 3) {
+ looseMarshalString(info.getCorrelationId(), dataOut);
+ }
+ if (version >= 4) {
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
+ }
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param target the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ *
+ * @throws IOException if an error occurs while writing the data
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, target, dataIn);
+
+ MessagePull info = (MessagePull) target;
+ int version = wireFormat.getVersion();
+
+ info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
+ if (version >= 3) {
+ info.setCorrelationId(looseUnmarshalString(dataIn));
+ }
+ if (version >= 4) {
+ info.setMessageId((MessageId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/NetworkBridgeFilterMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/NetworkBridgeFilterMarshaller.java
new file mode 100644
index 0000000..4df7db5
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/NetworkBridgeFilterMarshaller.java
@@ -0,0 +1,164 @@
+/*
+ * 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 NetworkBridgeFilter
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return NetworkBridgeFilter.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new NetworkBridgeFilter();
+ }
+
+ /**
+ * 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);
+
+ NetworkBridgeFilter info = (NetworkBridgeFilter) target;
+ int version = wireFormat.getVersion();
+
+ info.setNetworkBrokerId((BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ if (version >= 10) {
+ info.setMessageTTL(dataIn.readInt());
+ }
+ if (version >= 10) {
+ info.setConsumerTTL(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 {
+ NetworkBridgeFilter info = (NetworkBridgeFilter) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs);
+ if (version >= 10) {
+ }
+ if (version >= 10) {
+ }
+
+ return rc + 8;
+ }
+
+ /**
+ * 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);
+
+ NetworkBridgeFilter info = (NetworkBridgeFilter) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
+ if (version >= 10) {
+ dataOut.writeInt(info.getMessageTTL());
+ }
+ if (version >= 10) {
+ dataOut.writeInt(info.getConsumerTTL());
+ }
+ }
+
+ /**
+ * 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 {
+ NetworkBridgeFilter info = (NetworkBridgeFilter) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
+ if (version >= 10) {
+ dataOut.writeInt(info.getMessageTTL());
+ }
+ if (version >= 10) {
+ dataOut.writeInt(info.getConsumerTTL());
+ }
+ }
+
+ /**
+ * 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);
+
+ NetworkBridgeFilter info = (NetworkBridgeFilter) target;
+ int version = wireFormat.getVersion();
+
+ info.setNetworkBrokerId((BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ if (version >= 10) {
+ info.setMessageTTL(dataIn.readInt());
+ }
+ if (version >= 10) {
+ info.setConsumerTTL(dataIn.readInt());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBlobMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBlobMessageMarshaller.java
new file mode 100644
index 0000000..2a6bd04
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBlobMessageMarshaller.java
@@ -0,0 +1,176 @@
+/*
+ * 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 OpenWireBlobMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireBlobMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireBlobMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireBlobMessage();
+ }
+
+ /**
+ * 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);
+
+ OpenWireBlobMessage info = (OpenWireBlobMessage) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setMimeType(tightUnmarshalString(dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setDeletedByBroker(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 {
+ OpenWireBlobMessage info = (OpenWireBlobMessage) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ if (version >= 3) {
+ rc += tightMarshalString1(info.getRemoteBlobUrl(), bs);
+ }
+ if (version >= 3) {
+ rc += tightMarshalString1(info.getMimeType(), bs);
+ }
+ if (version >= 3) {
+ bs.writeBoolean(info.isDeletedByBroker());
+ }
+
+ 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);
+
+ OpenWireBlobMessage info = (OpenWireBlobMessage) source;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs);
+ }
+ if (version >= 3) {
+ tightMarshalString2(info.getMimeType(), dataOut, bs);
+ }
+ if (version >= 3) {
+ 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 {
+ OpenWireBlobMessage info = (OpenWireBlobMessage) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ if (version >= 3) {
+ looseMarshalString(info.getRemoteBlobUrl(), dataOut);
+ }
+ if (version >= 3) {
+ looseMarshalString(info.getMimeType(), dataOut);
+ }
+ if (version >= 3) {
+ dataOut.writeBoolean(info.isDeletedByBroker());
+ }
+ }
+
+ /**
+ * 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);
+
+ OpenWireBlobMessage info = (OpenWireBlobMessage) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ info.setRemoteBlobUrl(looseUnmarshalString(dataIn));
+ }
+ if (version >= 3) {
+ info.setMimeType(looseUnmarshalString(dataIn));
+ }
+ if (version >= 3) {
+ info.setDeletedByBroker(dataIn.readBoolean());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBytesMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBytesMessageMarshaller.java
new file mode 100644
index 0000000..da1e0e5
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireBytesMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireBytesMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireBytesMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireBytesMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireBytesMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireDestinationMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireDestinationMarshaller.java
new file mode 100644
index 0000000..03379a7
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireDestinationMarshaller.java
@@ -0,0 +1,115 @@
+/*
+ * 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 OpenWireDestination
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public abstract class OpenWireDestinationMarshaller 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);
+
+ OpenWireDestination info = (OpenWireDestination) target;
+
+ info.setPhysicalName(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 {
+ OpenWireDestination info = (OpenWireDestination) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getPhysicalName(), 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);
+
+ OpenWireDestination info = (OpenWireDestination) source;
+
+ tightMarshalString2(info.getPhysicalName(), 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 {
+ OpenWireDestination info = (OpenWireDestination) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getPhysicalName(), 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);
+
+ OpenWireDestination info = (OpenWireDestination) target;
+
+ info.setPhysicalName(looseUnmarshalString(dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMapMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMapMessageMarshaller.java
new file mode 100644
index 0000000..981e39c
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMapMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireMapMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireMapMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireMapMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireMapMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMessageMarshaller.java
new file mode 100644
index 0000000..f204059
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireMessageMarshaller extends MessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireObjectMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireObjectMessageMarshaller.java
new file mode 100644
index 0000000..f150818
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireObjectMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireObjectMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireObjectMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireObjectMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireObjectMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireQueueMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireQueueMarshaller.java
new file mode 100644
index 0000000..43a9b97
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireQueueMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireQueue
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireQueueMarshaller extends OpenWireDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireQueue.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireQueue();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireStreamMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireStreamMessageMarshaller.java
new file mode 100644
index 0000000..205fb44
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireStreamMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireStreamMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireStreamMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireStreamMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireStreamMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempDestinationMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempDestinationMarshaller.java
new file mode 100644
index 0000000..ca763ad
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempDestinationMarshaller.java
@@ -0,0 +1,98 @@
+/*
+ * 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 OpenWireTempDestination
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public abstract class OpenWireTempDestinationMarshaller extends OpenWireDestinationMarshaller {
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempQueueMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempQueueMarshaller.java
new file mode 100644
index 0000000..abd0a02
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempQueueMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireTempQueue
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireTempQueueMarshaller extends OpenWireTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireTempQueue.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireTempQueue();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempTopicMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempTopicMarshaller.java
new file mode 100644
index 0000000..6e4b1b6
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTempTopicMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireTempTopic
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireTempTopicMarshaller extends OpenWireTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireTempTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireTempTopic();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTextMessageMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTextMessageMarshaller.java
new file mode 100644
index 0000000..8ccfa57
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTextMessageMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireTextMessage
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireTextMessageMarshaller extends OpenWireMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireTextMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireTextMessage();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTopicMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTopicMarshaller.java
new file mode 100644
index 0000000..ac8e0ce
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/OpenWireTopicMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for OpenWireTopic
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class OpenWireTopicMarshaller extends OpenWireDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return OpenWireTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new OpenWireTopic();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/PartialCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/PartialCommandMarshaller.java
new file mode 100644
index 0000000..ebe3f66
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/PartialCommandMarshaller.java
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.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 PartialCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class PartialCommandMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return PartialCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new PartialCommand();
+ }
+
+ /**
+ * 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);
+
+ PartialCommand info = (PartialCommand) target;
+
+ info.setData(tightUnmarshalConstByteArray(dataIn, bs, 0));
+ info.setCommandId(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 {
+ PartialCommand info = (PartialCommand) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalByteArray1(info.getData(), 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);
+
+ PartialCommand info = (PartialCommand) source;
+
+ tightMarshalByteArray2(info.getData(), dataOut, bs);
+ dataOut.writeInt(info.getCommandId());
+ }
+
+ /**
+ * 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 {
+ PartialCommand info = (PartialCommand) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalByteArray(wireFormat, info.getData(), dataOut);
+ dataOut.writeInt(info.getCommandId());
+ }
+
+ /**
+ * 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);
+
+ PartialCommand info = (PartialCommand) target;
+
+ info.setData(looseUnmarshalByteArray(dataIn));
+ info.setCommandId(dataIn.readInt());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerAckMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerAckMarshaller.java
new file mode 100644
index 0000000..2d4ce64
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerAckMarshaller.java
@@ -0,0 +1,160 @@
+/*
+ * 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 ProducerAck
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ProducerAckMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ProducerAck.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ProducerAck();
+ }
+
+ /**
+ * 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);
+
+ ProducerAck info = (ProducerAck) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ info.setProducerId((ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+ if (version >= 3) {
+ info.setSize(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 {
+ ProducerAck info = (ProducerAck) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ if (version >= 3) {
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
+ }
+ if (version >= 3) {
+ }
+
+ 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);
+
+ ProducerAck info = (ProducerAck) source;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
+ }
+ if (version >= 3) {
+ dataOut.writeInt(info.getSize());
+ }
+ }
+
+ /**
+ * 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 {
+ ProducerAck info = (ProducerAck) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ if (version >= 3) {
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
+ }
+ if (version >= 3) {
+ dataOut.writeInt(info.getSize());
+ }
+ }
+
+ /**
+ * 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);
+
+ ProducerAck info = (ProducerAck) target;
+ int version = wireFormat.getVersion();
+
+ if (version >= 3) {
+ info.setProducerId((ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+ if (version >= 3) {
+ info.setSize(dataIn.readInt());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerIdMarshaller.java
new file mode 100644
index 0000000..04d394b
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerIdMarshaller.java
@@ -0,0 +1,141 @@
+/*
+ * 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 ProducerId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ProducerIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ProducerId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ProducerId();
+ }
+
+ /**
+ * 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);
+
+ ProducerId info = (ProducerId) target;
+
+ info.setConnectionId(tightUnmarshalString(dataIn, bs));
+ info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs));
+ info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs));
+ }
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @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 {
+ ProducerId info = (ProducerId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getConnectionId(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getValue(), bs);
+ rc += tightMarshalLong1(wireFormat, info.getSessionId(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param 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);
+
+ ProducerId info = (ProducerId) source;
+
+ tightMarshalString2(info.getConnectionId(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs);
+ tightMarshalLong2(wireFormat, info.getSessionId(), 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 {
+ ProducerId info = (ProducerId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getConnectionId(), dataOut);
+ looseMarshalLong(wireFormat, info.getValue(), dataOut);
+ looseMarshalLong(wireFormat, info.getSessionId(), 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);
+
+ ProducerId info = (ProducerId) target;
+
+ info.setConnectionId(looseUnmarshalString(dataIn));
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ info.setSessionId(looseUnmarshalLong(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerInfoMarshaller.java
new file mode 100644
index 0000000..1446405
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ProducerInfoMarshaller.java
@@ -0,0 +1,193 @@
+/*
+ * 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 ProducerInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ProducerInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ProducerInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ProducerInfo();
+ }
+
+ /**
+ * 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);
+
+ ProducerInfo info = (ProducerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setProducerId((ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ if (bs.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ if (version >= 2) {
+ info.setDispatchAsync(bs.readBoolean());
+ }
+ if (version >= 3) {
+ info.setWindowSize(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 {
+ ProducerInfo info = (ProducerInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs);
+ if (version >= 2) {
+ bs.writeBoolean(info.isDispatchAsync());
+ }
+ if (version >= 3) {
+ }
+
+ 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);
+
+ ProducerInfo info = (ProducerInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs);
+ if (version >= 2) {
+ bs.readBoolean();
+ }
+ if (version >= 3) {
+ dataOut.writeInt(info.getWindowSize());
+ }
+ }
+
+ /**
+ * 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 {
+ ProducerInfo info = (ProducerInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut);
+ if (version >= 2) {
+ dataOut.writeBoolean(info.isDispatchAsync());
+ }
+ if (version >= 3) {
+ dataOut.writeInt(info.getWindowSize());
+ }
+ }
+
+ /**
+ * 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);
+
+ ProducerInfo info = (ProducerInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ if (dataIn.readBoolean()) {
+ short size = dataIn.readShort();
+ BrokerId value[] = new BrokerId[size];
+ for (int i = 0; i < size; i++) {
+ value[i] = (BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn);
+ }
+ info.setBrokerPath(value);
+ } else {
+ info.setBrokerPath(null);
+ }
+ if (version >= 2) {
+ info.setDispatchAsync(dataIn.readBoolean());
+ }
+ if (version >= 3) {
+ info.setWindowSize(dataIn.readInt());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveInfoMarshaller.java
new file mode 100644
index 0000000..ab87769
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveInfoMarshaller.java
@@ -0,0 +1,151 @@
+/*
+ * 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 RemoveInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class RemoveInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return RemoveInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new RemoveInfo();
+ }
+
+ /**
+ * 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);
+
+ RemoveInfo info = (RemoveInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setObjectId((DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ if (version >= 5) {
+ info.setLastDeliveredSequenceId(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 {
+ RemoveInfo info = (RemoveInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
+ if (version >= 5) {
+ rc += tightMarshalLong1(wireFormat, info.getLastDeliveredSequenceId(), 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);
+
+ RemoveInfo info = (RemoveInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs);
+ if (version >= 5) {
+ tightMarshalLong2(wireFormat, info.getLastDeliveredSequenceId(), 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 {
+ RemoveInfo info = (RemoveInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut);
+ if (version >= 5) {
+ looseMarshalLong(wireFormat, info.getLastDeliveredSequenceId(), 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);
+
+ RemoveInfo info = (RemoveInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setObjectId((DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn));
+ if (version >= 5) {
+ info.setLastDeliveredSequenceId(looseUnmarshalLong(wireFormat, dataIn));
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveSubscriptionInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveSubscriptionInfoMarshaller.java
new file mode 100644
index 0000000..bff2464
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/RemoveSubscriptionInfoMarshaller.java
@@ -0,0 +1,141 @@
+/*
+ * 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 RemoveSubscriptionInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new RemoveSubscriptionInfo();
+ }
+
+ /**
+ * 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);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) target;
+
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
+ info.setClientId(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 {
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
+ rc += tightMarshalString1(info.getSubscriptionName(), bs);
+ rc += tightMarshalString1(info.getClientId(), 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);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
+ tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
+ tightMarshalString2(info.getClientId(), 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 {
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
+ looseMarshalString(info.getSubscriptionName(), dataOut);
+ looseMarshalString(info.getClientId(), 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);
+
+ RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) target;
+
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setSubscriptionName(looseUnmarshalString(dataIn));
+ info.setClientId(looseUnmarshalString(dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ReplayCommandMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ReplayCommandMarshaller.java
new file mode 100644
index 0000000..b25f179
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ReplayCommandMarshaller.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.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 ReplayCommand
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ReplayCommandMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ReplayCommand.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ReplayCommand();
+ }
+
+ /**
+ * 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);
+
+ ReplayCommand info = (ReplayCommand) target;
+
+ info.setFirstNakNumber(dataIn.readInt());
+ info.setLastNakNumber(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 {
+ ReplayCommand info = (ReplayCommand) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+
+ return rc + 8;
+ }
+
+ /**
+ * 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);
+
+ ReplayCommand info = (ReplayCommand) source;
+
+ dataOut.writeInt(info.getFirstNakNumber());
+ dataOut.writeInt(info.getLastNakNumber());
+ }
+
+ /**
+ * 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 {
+ ReplayCommand info = (ReplayCommand) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeInt(info.getFirstNakNumber());
+ dataOut.writeInt(info.getLastNakNumber());
+ }
+
+ /**
+ * 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);
+
+ ReplayCommand info = (ReplayCommand) target;
+
+ info.setFirstNakNumber(dataIn.readInt());
+ info.setLastNakNumber(dataIn.readInt());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ResponseMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ResponseMarshaller.java
new file mode 100644
index 0000000..e759a0e
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ResponseMarshaller.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for Response
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ResponseMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return Response.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new Response();
+ }
+
+ /**
+ * 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);
+
+ Response info = (Response) target;
+
+ info.setCorrelationId(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 {
+ Response info = (Response) 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);
+
+ Response info = (Response) source;
+
+ dataOut.writeInt(info.getCorrelationId());
+ }
+
+ /**
+ * 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 {
+ Response info = (Response) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeInt(info.getCorrelationId());
+ }
+
+ /**
+ * 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);
+
+ Response info = (Response) target;
+
+ info.setCorrelationId(dataIn.readInt());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionIdMarshaller.java
new file mode 100644
index 0000000..e7e8577
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionIdMarshaller.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for SessionId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class SessionIdMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return SessionId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new SessionId();
+ }
+
+ /**
+ * 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);
+
+ SessionId info = (SessionId) target;
+
+ info.setConnectionId(tightUnmarshalString(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 {
+ SessionId info = (SessionId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getConnectionId(), 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);
+
+ SessionId info = (SessionId) source;
+
+ tightMarshalString2(info.getConnectionId(), 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 {
+ SessionId info = (SessionId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getConnectionId(), 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);
+
+ SessionId info = (SessionId) target;
+
+ info.setConnectionId(looseUnmarshalString(dataIn));
+ info.setValue(looseUnmarshalLong(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionInfoMarshaller.java
new file mode 100644
index 0000000..a6669ea
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SessionInfoMarshaller.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for SessionInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class SessionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return SessionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new SessionInfo();
+ }
+
+ /**
+ * 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);
+
+ SessionInfo info = (SessionInfo) target;
+
+ info.setSessionId((SessionId) 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 {
+ SessionInfo info = (SessionInfo) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), 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);
+
+ SessionInfo info = (SessionInfo) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), 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 {
+ SessionInfo info = (SessionInfo) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), 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);
+
+ SessionInfo info = (SessionInfo) target;
+
+ info.setSessionId((SessionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ShutdownInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ShutdownInfoMarshaller.java
new file mode 100644
index 0000000..3bb3fd6
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/ShutdownInfoMarshaller.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for ShutdownInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class ShutdownInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ShutdownInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new ShutdownInfo();
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SubscriptionInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SubscriptionInfoMarshaller.java
new file mode 100644
index 0000000..f704bd3
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/SubscriptionInfoMarshaller.java
@@ -0,0 +1,181 @@
+/*
+ * 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 SubscriptionInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return SubscriptionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new SubscriptionInfo();
+ }
+
+ /**
+ * 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);
+
+ SubscriptionInfo info = (SubscriptionInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setClientId(tightUnmarshalString(dataIn, bs));
+ info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setSelector(tightUnmarshalString(dataIn, bs));
+ info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
+ if (version >= 3) {
+ info.setSubscribedDestination((OpenWireDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
+ }
+ if (version >= 11) {
+ info.setNoLocal(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 {
+ SubscriptionInfo info = (SubscriptionInfo) source;
+ int version = wireFormat.getVersion();
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalString1(info.getClientId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
+ rc += tightMarshalString1(info.getSelector(), bs);
+ rc += tightMarshalString1(info.getSubscriptionName(), bs);
+ if (version >= 3) {
+ rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
+ }
+ if (version >= 11) {
+ bs.writeBoolean(info.isNoLocal());
+ }
+
+ 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);
+
+ SubscriptionInfo info = (SubscriptionInfo) source;
+ int version = wireFormat.getVersion();
+
+ tightMarshalString2(info.getClientId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
+ tightMarshalString2(info.getSelector(), dataOut, bs);
+ tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
+ if (version >= 3) {
+ tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs);
+ }
+ if (version >= 11) {
+ 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 {
+ SubscriptionInfo info = (SubscriptionInfo) source;
+ int version = wireFormat.getVersion();
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalString(info.getClientId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut);
+ looseMarshalString(info.getSelector(), dataOut);
+ looseMarshalString(info.getSubscriptionName(), dataOut);
+ if (version >= 3) {
+ looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
+ }
+ if (version >= 11) {
+ dataOut.writeBoolean(info.isNoLocal());
+ }
+ }
+
+ /**
+ * 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);
+
+ SubscriptionInfo info = (SubscriptionInfo) target;
+ int version = wireFormat.getVersion();
+
+ info.setClientId(looseUnmarshalString(dataIn));
+ info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setSelector(looseUnmarshalString(dataIn));
+ info.setSubscriptionName(looseUnmarshalString(dataIn));
+ if (version >= 3) {
+ info.setSubscribedDestination((OpenWireDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
+ }
+ if (version >= 11) {
+ info.setNoLocal(dataIn.readBoolean());
+ }
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionIdMarshaller.java
new file mode 100644
index 0000000..d1d371d
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionIdMarshaller.java
@@ -0,0 +1,98 @@
+/*
+ * 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 TransactionId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public abstract class TransactionIdMarshaller 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);
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionInfoMarshaller.java
new file mode 100644
index 0000000..6ab4185
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/TransactionInfoMarshaller.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for TransactionInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class TransactionInfoMarshaller extends BaseCommandMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return TransactionInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new TransactionInfo();
+ }
+
+ /**
+ * 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);
+
+ TransactionInfo info = (TransactionInfo) target;
+
+ info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setTransactionId((TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setType(dataIn.readByte());
+ }
+
+ /**
+ * 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 {
+ TransactionInfo info = (TransactionInfo) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs);
+ rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), 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);
+
+ TransactionInfo info = (TransactionInfo) source;
+
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs);
+ tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs);
+ dataOut.writeByte(info.getType());
+ }
+
+ /**
+ * 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 {
+ TransactionInfo info = (TransactionInfo) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut);
+ looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut);
+ dataOut.writeByte(info.getType());
+ }
+
+ /**
+ * 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);
+
+ TransactionInfo info = (TransactionInfo) target;
+
+ info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setTransactionId((TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setType(dataIn.readByte());
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/WireFormatInfoMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/WireFormatInfoMarshaller.java
new file mode 100644
index 0000000..ca4c1fe
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/WireFormatInfoMarshaller.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import org.fusesource.hawtbuf.Buffer;
+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 WireFormatInfo
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return WireFormatInfo.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new WireFormatInfo();
+ }
+
+ /**
+ * 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);
+
+ WireFormatInfo info = (WireFormatInfo) target;
+
+ info.beforeUnmarshall(wireFormat);
+ info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+ info.setVersion(dataIn.readInt());
+ info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
+
+ info.afterUnmarshall(wireFormat);
+ }
+
+ /**
+ * 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 {
+ WireFormatInfo info = (WireFormatInfo) source;
+
+ info.beforeMarshall(wireFormat);
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8);
+ rc += tightMarshalByteSequence1(info.getMarshalledProperties(), 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);
+
+ WireFormatInfo info = (WireFormatInfo) source;
+
+ tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8);
+ dataOut.writeInt(info.getVersion());
+ tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs);
+
+ info.afterMarshall(wireFormat);
+ }
+
+ /**
+ * 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 {
+ WireFormatInfo info = (WireFormatInfo) source;
+
+ info.beforeMarshall(wireFormat);
+ super.looseMarshal(wireFormat, source, dataOut);
+ looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8);
+ dataOut.writeInt(info.getVersion());
+ looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut);
+
+ info.afterMarshall(wireFormat);
+ }
+
+ /**
+ * 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);
+
+ WireFormatInfo info = (WireFormatInfo) target;
+
+ info.beforeUnmarshall(wireFormat);
+ info.setMagic(looseUnmarshalConstByteArray(dataIn, 8));
+ info.setVersion(dataIn.readInt());
+ info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn));
+
+ info.afterUnmarshall(wireFormat);
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/XATransactionIdMarshaller.java b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/XATransactionIdMarshaller.java
new file mode 100644
index 0000000..a9bc463
--- /dev/null
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/codec/universal/XATransactionIdMarshaller.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.codec.universal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.codec.*;
+import org.apache.activemq.openwire.commands.*;
+
+/**
+ * Marshalling code for Open Wire for XATransactionId
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ *
+ */
+public class XATransactionIdMarshaller extends TransactionIdMarshaller {
+
+ /**
+ * Return the type of Data Structure handled by this Marshaler
+ *
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return XATransactionId.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new instance of the managed type.
+ */
+ public DataStructure createObject() {
+ return new XATransactionId();
+ }
+
+ /**
+ * 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);
+
+ XATransactionId info = (XATransactionId) target;
+
+ info.setFormatId(dataIn.readInt());
+ info.setGlobalTransactionId(tightUnmarshalConstByteArray(dataIn, bs, 0));
+ info.setBranchQualifier(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 {
+ XATransactionId info = (XATransactionId) source;
+
+ int rc = super.tightMarshal1(wireFormat, source, bs);
+ rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs);
+ rc += tightMarshalByteArray1(info.getBranchQualifier(), 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);
+
+ XATransactionId info = (XATransactionId) source;
+
+ dataOut.writeInt(info.getFormatId());
+ tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs);
+ tightMarshalByteArray2(info.getBranchQualifier(), 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 {
+ XATransactionId info = (XATransactionId) source;
+
+ super.looseMarshal(wireFormat, source, dataOut);
+ dataOut.writeInt(info.getFormatId());
+ looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut);
+ looseMarshalByteArray(wireFormat, info.getBranchQualifier(), 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);
+
+ XATransactionId info = (XATransactionId) target;
+
+ info.setFormatId(dataIn.readInt());
+ info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn));
+ info.setBranchQualifier(looseUnmarshalByteArray(dataIn));
+ }
+}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BaseCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BaseCommand.java
index 2585685..4e707cb 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BaseCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BaseCommand.java
@@ -16,12 +16,19 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller
*/
+@OpenWireType(typeCode = 0)
public abstract class BaseCommand implements Command {
+ @OpenWireProperty(version = 1, sequence = 1)
protected int commandId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected boolean responseRequired;
public void copy(BaseCommand copy) {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerId.java
index 2cadf37..bd63f02 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerId.java
@@ -16,12 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="124"
*/
+@OpenWireType(typeCode = 124)
public class BrokerId implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_ID;
+
+ @OpenWireProperty(version = 1, sequence = 1)
protected String value;
public BrokerId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerInfo.java
index 49085fa..7800581 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/BrokerInfo.java
@@ -16,6 +16,9 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* When a client connects to a broker, the broker send the client a BrokerInfo
* so that the client knows which broker node he's talking to and also any peers
@@ -24,21 +27,45 @@
*
* @openwire:marshaller code="2"
*/
+@OpenWireType(typeCode = 2)
public class BrokerInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected BrokerId brokerId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected String brokerURL;
- protected boolean slaveBroker;
- protected boolean masterBroker;
- protected boolean faultTolerantConfiguration;
- protected boolean networkConnection;
- protected boolean duplexConnection;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected BrokerInfo peerBrokerInfos[];
+
+ @OpenWireProperty(version = 1, sequence = 4)
protected String brokerName;
+
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected boolean slaveBroker;
+
+ @OpenWireProperty(version = 1, sequence = 6)
+ protected boolean masterBroker;
+
+ @OpenWireProperty(version = 1, sequence = 7)
+ protected boolean faultTolerantConfiguration;
+
+ @OpenWireProperty(version = 2, sequence = 8)
+ protected boolean duplexConnection;
+
+ @OpenWireProperty(version = 2, sequence = 9)
+ protected boolean networkConnection;
+
+ @OpenWireProperty(version = 2, sequence = 10)
protected long connectionId;
+
+ @OpenWireProperty(version = 3, sequence = 11)
protected String brokerUploadUrl;
+
+ @OpenWireProperty(version = 3, sequence = 12)
protected String networkProperties;
public BrokerInfo copy() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionControl.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionControl.java
index 87b4cdc..e4052de 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionControl.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionControl.java
@@ -16,26 +16,47 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used by the Broker to control the connection state, the client should react to
* this command immediately.
*
* @openwire:marshaller code="18"
*/
+@OpenWireType(typeCode = 18)
public class ConnectionControl extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_CONTROL;
- protected boolean suspend;
- protected boolean resume;
+ @OpenWireProperty(version = 1, sequence = 1)
protected boolean close;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected boolean exit;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected boolean faultTolerant;
- protected String connectedBrokers="";
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected boolean resume;
+
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected boolean suspend;
+
+ @OpenWireProperty(version = 6, sequence = 6)
+ protected String connectedBrokers = "";
+
+ @OpenWireProperty(version = 6, sequence = 7)
protected String reconnectTo = "";
- protected byte[] token;
+
+ @OpenWireProperty(version = 6, sequence = 8)
protected boolean rebalanceConnection;
+ @OpenWireProperty(version = 6, sequence = 9)
+ protected byte[] token;
+
@Override
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionError.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionError.java
index d503e6b..2f20735 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionError.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionError.java
@@ -16,16 +16,23 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="16"
*/
+@OpenWireType(typeCode = 16)
public class ConnectionError extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ERROR;
- private ConnectionId connectionId;
+ @OpenWireProperty(version = 1, sequence = 1)
private Throwable exception;
+ @OpenWireProperty(version = 1, sequence = 2)
+ private ConnectionId connectionId;
+
@Override
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionId.java
index 5d4ef10..c607d96 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionId.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="120"
*/
+@OpenWireType(typeCode = 120)
public class ConnectionId implements DataStructure, Comparable<ConnectionId> {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ID;
+ @OpenWireProperty(version = 1, sequence = 1)
protected String value;
public ConnectionId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionInfo.java
index 618fc43..8a30711 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConnectionInfo.java
@@ -16,25 +16,50 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="3"
*/
+@OpenWireType(typeCode = 3)
public class ConnectionInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConnectionId connectionId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected String clientId;
- protected String clientIp;
- protected String userName;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected String password;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected String userName;
+
+ @OpenWireProperty(version = 1, sequence = 5, cached = true)
protected BrokerId[] brokerPath;
+
+ @OpenWireProperty(version = 1, sequence = 6)
protected boolean brokerMasterConnector;
+
+ @OpenWireProperty(version = 1, sequence = 7)
protected boolean manageable;
+
+ @OpenWireProperty(version = 2, sequence = 8)
protected boolean clientMaster = true;
+
+ @OpenWireProperty(version = 6, sequence = 9)
protected boolean faultTolerant = false;
+
+ @OpenWireProperty(version = 6, sequence = 10)
protected boolean failoverReconnect;
+ @OpenWireProperty(version = 8, sequence = 11)
+ protected String clientIp;
+
public ConnectionInfo() {
}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerControl.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerControl.java
index b85d224..5c254c1 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerControl.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerControl.java
@@ -16,23 +16,40 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used by the Broker to control various aspects of a consumer instance.
*
* @openwire:marshaller code="17"
*/
+@OpenWireType(typeCode = 17)
public class ConsumerControl extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_CONTROL;
- protected ConsumerId consumerId;
- protected boolean close;
- protected boolean stop;
- protected boolean start;
- protected boolean flush;
- protected int prefetch;
+ @OpenWireProperty(version = 6, sequence = 1)
protected OpenWireDestination destination;
+ @OpenWireProperty(version = 1, sequence = 2)
+ protected boolean close;
+
+ @OpenWireProperty(version = 1, sequence = 3)
+ protected ConsumerId consumerId;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected int prefetch;
+
+ @OpenWireProperty(version = 2, sequence = 5)
+ protected boolean flush;
+
+ @OpenWireProperty(version = 2, sequence = 6)
+ protected boolean start;
+
+ @OpenWireProperty(version = 2, sequence = 7)
+ protected boolean stop;
+
/**
* @openwire:property version=6
* @return Returns the destination.
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerId.java
index 8556f75..a35470b 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerId.java
@@ -16,19 +16,34 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="122"
*/
+@OpenWireType(typeCode = 122)
public class ConsumerId implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_ID;
+ @OpenWireProperty(version = 1, sequence = 1)
protected String connectionId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected long sessionId;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected long value;
+ @OpenWireExtension
protected transient int hashCode;
+
+ @OpenWireExtension
protected transient String key;
+
+ @OpenWireExtension
protected transient SessionId parentId;
public ConsumerId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerInfo.java
index 0fae7d4..5f426ad 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ConsumerInfo.java
@@ -19,9 +19,14 @@
import java.util.ArrayList;
import java.util.List;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="5"
*/
+@OpenWireType(typeCode = 5)
public class ConsumerInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_INFO;
@@ -31,28 +36,65 @@
public static final byte NETWORK_CONSUMER_PRIORITY = -5;
public static final byte LOW_PRIORITY = -10;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConsumerId consumerId;
- protected OpenWireDestination destination;
- protected int prefetchSize;
- protected int maximumPendingMessageLimit;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected boolean browser;
+
+ @OpenWireProperty(version = 1, sequence = 3, cached = true)
+ protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected int prefetchSize;
+
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected int maximumPendingMessageLimit;
+
+ @OpenWireProperty(version = 1, sequence = 6)
protected boolean dispatchAsync;
+
+ @OpenWireProperty(version = 1, sequence = 7)
protected String selector;
+
+ @OpenWireProperty(version = 10, sequence = 8)
protected String clientId;
+
+ @OpenWireProperty(version = 1, sequence = 9)
protected String subscriptionName;
+
+ @OpenWireProperty(version = 1, sequence = 10)
protected boolean noLocal;
+
+ @OpenWireProperty(version = 1, sequence = 11)
protected boolean exclusive;
+
+ @OpenWireProperty(version = 1, sequence = 12)
protected boolean retroactive;
+
+ @OpenWireProperty(version = 1, sequence = 13)
protected byte priority;
+
+ @OpenWireProperty(version = 1, sequence = 14, cached = true)
protected BrokerId[] brokerPath;
+
+ @OpenWireProperty(version = 1, sequence = 15)
+ protected Object additionalPredicate;
+
+ @OpenWireProperty(version = 1, sequence = 16, serialized = false)
+ protected boolean networkSubscription;
+
+ @OpenWireProperty(version = 1, sequence = 17)
protected boolean optimizedAcknowledge;
+
+ @OpenWireProperty(version = 1, sequence = 18)
protected boolean noRangeAcks;
- // Network connector values should not be serialized.
- protected transient boolean networkSubscription;
- protected transient List<ConsumerId> networkConsumerIds;
+ @OpenWireProperty(version = 4, sequence = 19, serialized = false)
+ protected transient ConsumerId[] networkConsumerPath;
- protected Object additionalPredicate;
+ @OpenWireExtension(serialized = false)
+ protected transient List<ConsumerId> networkConsumerIds;
public ConsumerInfo() {
}
@@ -88,6 +130,12 @@
info.priority = priority;
info.brokerPath = brokerPath;
info.networkSubscription = networkSubscription;
+ if (networkConsumerIds != null) {
+ if (info.networkConsumerIds == null) {
+ info.networkConsumerIds = new ArrayList<ConsumerId>();
+ }
+ info.networkConsumerIds.addAll(networkConsumerIds);
+ }
}
public boolean isDurable() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ControlCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ControlCommand.java
index 546e19c..61feb6e 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ControlCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ControlCommand.java
@@ -16,15 +16,20 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used by the Broker to send a specific named command to the client.
*
* @openwire:marshaller code="14"
*/
+@OpenWireType(typeCode = 14)
public class ControlCommand extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONTROL_COMMAND;
+ @OpenWireProperty(version = 1, sequence = 1)
private String command;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataArrayResponse.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataArrayResponse.java
index 9ae776a..985ca7f 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataArrayResponse.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataArrayResponse.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="33"
*/
+@OpenWireType(typeCode = 33)
public class DataArrayResponse extends Response {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_ARRAY_RESPONSE;
+ @OpenWireProperty(version = 1, sequence = 1)
DataStructure data[];
public DataArrayResponse() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataResponse.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataResponse.java
index af0a16f..71fdfe6 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataResponse.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DataResponse.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="32"
*/
+@OpenWireType(typeCode = 32)
public class DataResponse extends Response {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_RESPONSE;
+ @OpenWireProperty(version = 1, sequence = 1)
DataStructure data;
public DataResponse() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DestinationInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DestinationInfo.java
index 8251482..322aa0b 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DestinationInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DestinationInfo.java
@@ -18,11 +18,15 @@
import java.io.IOException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used to create and destroy destinations on the broker.
*
* @openwire:marshaller code="8"
*/
+@OpenWireType(typeCode = 8)
public class DestinationInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DESTINATION_INFO;
@@ -30,10 +34,19 @@
public static final byte ADD_OPERATION_TYPE = 0;
public static final byte REMOVE_OPERATION_TYPE = 1;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConnectionId connectionId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected byte operationType;
+
+ @OpenWireProperty(version = 1, sequence = 4)
protected long timeout;
+
+ @OpenWireProperty(version = 1, sequence = 5)
protected BrokerId[] brokerPath;
public DestinationInfo() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DiscoveryEvent.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DiscoveryEvent.java
index 590ed5e..188d355 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DiscoveryEvent.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/DiscoveryEvent.java
@@ -16,16 +16,23 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Represents a discovery event containing the details of the service
*
* @openwire:marshaller code="40"
*/
+@OpenWireType(typeCode = 40)
public class DiscoveryEvent implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DISCOVERY_EVENT;
+ @OpenWireProperty(version = 1, sequence = 1)
protected String serviceName;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected String brokerName;
public DiscoveryEvent() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ExceptionResponse.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ExceptionResponse.java
index 07789ac..e99ff81 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ExceptionResponse.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ExceptionResponse.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="31"
*/
+@OpenWireType(typeCode = 31)
public class ExceptionResponse extends Response {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.EXCEPTION_RESPONSE;
+ @OpenWireProperty(version = 1, sequence = 1)
Throwable exception;
public ExceptionResponse() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/FlushCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/FlushCommand.java
index 6625ff7..c238ae6 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/FlushCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/FlushCommand.java
@@ -16,11 +16,14 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* An indication to the transport layer that a flush is required.
*
* @openwire:marshaller code="15"
*/
+@OpenWireType(typeCode = 15)
public class FlushCommand extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.FLUSH_COMMAND;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/IntegerResponse.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/IntegerResponse.java
index f33dc02..0be4fd2 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/IntegerResponse.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/IntegerResponse.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="34"
*/
+@OpenWireType(typeCode = 34)
public class IntegerResponse extends Response {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.INTEGER_RESPONSE;
+ @OpenWireProperty(version = 1, sequence = 1)
int result;
public IntegerResponse() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalQueueAck.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalQueueAck.java
index 4594461..b70d765 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalQueueAck.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalQueueAck.java
@@ -16,14 +16,21 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="52"
*/
+@OpenWireType(typeCode = 52)
public class JournalQueueAck implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_REMOVE;
+ @OpenWireProperty(version = 1, sequence = 1)
OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 2)
MessageAck messageAck;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTopicAck.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTopicAck.java
index 032dff0..e3ea315 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTopicAck.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTopicAck.java
@@ -16,18 +16,33 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="50"
*/
+@OpenWireType(typeCode = 50)
public class JournalTopicAck implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_ACK;
+ @OpenWireProperty(version = 1, sequence = 1)
protected OpenWireDestination destination;
- protected String clientId;
- protected String subscritionName;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected MessageId messageId;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected long messageSequenceId;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected String subscritionName;
+
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected String clientId;
+
+ @OpenWireProperty(version = 1, sequence = 6)
protected TransactionId transactionId;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTrace.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTrace.java
index ebc4746..b7b85b3 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTrace.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTrace.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="53"
*/
+@OpenWireType(typeCode = 53)
public class JournalTrace implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRACE;
+ @OpenWireProperty(version = 1, sequence = 1)
private String message;
public JournalTrace() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTransaction.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTransaction.java
index 8df4ccf..a1ddc4f 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTransaction.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/JournalTransaction.java
@@ -16,9 +16,13 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="54"
*/
+@OpenWireType(typeCode = 54)
public class JournalTransaction implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRANSACTION;
@@ -29,10 +33,15 @@
public static final byte LOCAL_COMMIT = 4;
public static final byte LOCAL_ROLLBACK = 5;
- public byte type;
- public boolean wasPrepared;
+ @OpenWireProperty(version = 1, sequence = 1)
public TransactionId transactionId;
+ @OpenWireProperty(version = 1, sequence = 2)
+ public byte type;
+
+ @OpenWireProperty(version = 1, sequence = 3)
+ public boolean wasPrepared;
+
public JournalTransaction(byte type, TransactionId transactionId, boolean wasPrepared) {
this.type = type;
this.transactionId = transactionId;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/KeepAliveInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/KeepAliveInfo.java
index 270475b..96a68dd 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/KeepAliveInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/KeepAliveInfo.java
@@ -16,9 +16,12 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="10"
*/
+@OpenWireType(typeCode = 10)
public class KeepAliveInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.KEEP_ALIVE_INFO;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LastPartialCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LastPartialCommand.java
index cc49d63..c6540fc 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LastPartialCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LastPartialCommand.java
@@ -16,11 +16,14 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* Represents the end marker of a stream of {@link PartialCommand} instances.
*
* @openwire:marshaller code="61"
*/
+@OpenWireType(typeCode = 61)
public class LastPartialCommand extends PartialCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PARTIAL_LAST_COMMAND;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LocalTransactionId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LocalTransactionId.java
index ed5f5d4..34f71b5 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LocalTransactionId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/LocalTransactionId.java
@@ -16,18 +16,29 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="111"
*
*/
+@OpenWireType(typeCode = 111)
public class LocalTransactionId extends TransactionId implements Comparable<LocalTransactionId> {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_LOCAL_TRANSACTION_ID;
- protected ConnectionId connectionId;
+ @OpenWireProperty(version = 1, sequence = 1)
protected long value;
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
+ protected ConnectionId connectionId;
+
+ @OpenWireExtension
private transient String transactionKey;
+
+ @OpenWireExtension
private transient int hashCode;
public LocalTransactionId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Message.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Message.java
index b691f93..3c6c57b 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Message.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Message.java
@@ -30,6 +30,9 @@
import javax.jms.JMSException;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+import org.apache.activemq.openwire.annotations.OpenWireType;
import org.apache.activemq.openwire.codec.OpenWireFormat;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.apache.activemq.openwire.utils.OpenWireMarshallingSupport;
@@ -43,6 +46,7 @@
*
* @openwire:marshaller
*/
+@OpenWireType(typeCode = 0, marshalAware = true)
public abstract class Message extends BaseCommand implements MarshallAware {
public static final String ORIGINAL_EXPIRATION = "originalExpiration";
@@ -52,43 +56,101 @@
*/
public static final int DEFAULT_MINIMUM_MESSAGE_SIZE = 1024;
- protected MessageId messageId;
- protected OpenWireDestination originalDestination;
- protected TransactionId originalTransactionId;
-
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ProducerId producerId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3, cached = true)
protected TransactionId transactionId;
- protected long expiration;
- protected long timestamp;
- protected long arrival;
- protected long brokerInTime;
- protected long brokerOutTime;
- protected String correlationId;
- protected OpenWireDestination replyTo;
- protected boolean persistent;
- protected String type;
- protected byte priority;
- protected String groupId;
- protected int groupSequence;
- protected ConsumerId targetConsumerId;
- protected boolean compressed;
- protected String userId;
+ @OpenWireProperty(version = 1, sequence = 4, cached = true)
+ protected OpenWireDestination originalDestination;
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected MessageId messageId;
+
+ @OpenWireProperty(version = 1, sequence = 6, cached = true)
+ protected TransactionId originalTransactionId;
+
+ @OpenWireProperty(version = 1, sequence = 7)
+ protected String groupId;
+
+ @OpenWireProperty(version = 1, sequence = 8)
+ protected int groupSequence;
+
+ @OpenWireProperty(version = 1, sequence = 9)
+ protected String correlationId;
+
+ @OpenWireProperty(version = 1, sequence = 10)
+ protected boolean persistent;
+
+ @OpenWireProperty(version = 1, sequence = 11)
+ protected long expiration;
+
+ @OpenWireProperty(version = 1, sequence = 12)
+ protected byte priority;
+
+ @OpenWireProperty(version = 1, sequence = 13)
+ protected OpenWireDestination replyTo;
+
+ @OpenWireProperty(version = 1, sequence = 14)
+ protected long timestamp;
+
+ @OpenWireProperty(version = 1, sequence = 15)
+ protected String type;
+
+ @OpenWireProperty(version = 1, sequence = 16)
protected Buffer content;
+
+ @OpenWireProperty(version = 1, sequence = 17)
protected Buffer marshalledProperties;
+
+ @OpenWireProperty(version = 1, sequence = 18)
protected DataStructure dataStructure;
+
+ @OpenWireProperty(version = 1, sequence = 19, cached = true)
+ protected ConsumerId targetConsumerId;
+
+ @OpenWireProperty(version = 1, sequence = 20)
+ protected boolean compressed;
+
+ @OpenWireProperty(version = 1, sequence = 21)
protected int redeliveryCounter;
- protected int size;
- protected Map<String, Object> properties;
+ @OpenWireProperty(version = 1, sequence = 22, cached = true)
+ private BrokerId[] brokerPath;
+
+ @OpenWireProperty(version = 1, sequence = 23)
+ protected long arrival;
+
+ @OpenWireProperty(version = 1, sequence = 24)
+ protected String userId;
+
+ @OpenWireProperty(version = 1, sequence = 25, serialized = false)
protected transient boolean recievedByDFBridge;
+
+ @OpenWireProperty(version = 2, sequence = 26, cached = true)
protected boolean droppable;
+
+ @OpenWireProperty(version = 3, sequence = 27, cached = true)
+ private BrokerId[] cluster;
+
+ @OpenWireProperty(version = 3, sequence = 28)
+ protected long brokerInTime;
+
+ @OpenWireProperty(version = 3, sequence = 29)
+ protected long brokerOutTime;
+
+ @OpenWireProperty(version = 10, sequence = 30)
protected boolean jmsXGroupFirstForConsumer;
- private BrokerId[] brokerPath;
- private BrokerId[] cluster;
+ @OpenWireExtension(serialized = true)
+ protected int size;
+
+ @OpenWireExtension(serialized = true)
+ protected Map<String, Object> properties;
public abstract Message copy();
public abstract void clearBody() throws JMSException;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageAck.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageAck.java
index 783b048..7c93914 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageAck.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageAck.java
@@ -16,9 +16,14 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="22"
*/
+@OpenWireType(typeCode = 22)
public class MessageAck extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_ACK;
@@ -64,15 +69,31 @@
*/
public static final byte EXPIRED_ACK_TYPE = 6;
- protected byte ackType;
- protected ConsumerId consumerId;
- protected MessageId firstMessageId;
- protected MessageId lastMessageId;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected TransactionId transactionId;
+
+ @OpenWireProperty(version = 1, sequence = 3, cached = true)
+ protected ConsumerId consumerId;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected byte ackType;
+
+ @OpenWireProperty(version = 1, sequence = 5)
+ protected MessageId firstMessageId;
+
+ @OpenWireProperty(version = 1, sequence = 6)
+ protected MessageId lastMessageId;
+
+ @OpenWireProperty(version = 1, sequence = 7)
protected int messageCount;
+
+ @OpenWireProperty(version = 7, sequence = 8)
protected Throwable poisonCause;
+ @OpenWireExtension
protected transient String consumerKey;
public MessageAck() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatch.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatch.java
index 6dfe04d..01b28b4 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatch.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatch.java
@@ -16,16 +16,27 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="21"
*/
+@OpenWireType(typeCode = 21)
public class MessageDispatch extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_DISPATCH;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConsumerId consumerId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected Message message;
+
+ @OpenWireProperty(version = 1, sequence = 4)
protected int redeliveryCounter;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatchNotification.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatchNotification.java
index 91ae1aa..98ed7ac 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatchNotification.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageDispatchNotification.java
@@ -16,18 +16,29 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="90"
*/
+@OpenWireType(typeCode = 90)
public class MessageDispatchNotification extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_DISPATCH_NOTIFICATION;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConsumerId consumerId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
- protected MessageId messageId;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected long deliverySequenceId;
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected MessageId messageId;
+
@Override
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageId.java
index 4f3b13e..dde67de 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessageId.java
@@ -16,20 +16,34 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
/**
* @openwire:marshaller code="110"
*/
+@OpenWireType(typeCode = 110)
public class MessageId implements DataStructure, Comparable<MessageId> {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_ID;
+ @OpenWireProperty(version = 10, sequence = 1)
protected String textView;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected ProducerId producerId;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected long producerSequenceId;
+
+ @OpenWireProperty(version = 1, sequence = 4)
protected long brokerSequenceId;
+ @OpenWireExtension
private transient String key;
+
+ @OpenWireExtension
private transient int hashCode;
public MessageId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessagePull.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessagePull.java
index 29f5c01..b8cd970 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessagePull.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/MessagePull.java
@@ -16,6 +16,10 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used to pull messages on demand, the command can have a time value that indicates
* how long the Broker keeps the pull request open before returning a MessageDispatch
@@ -23,18 +27,35 @@
*
* @openwire:marshaller code="20"
*/
+@OpenWireType(typeCode = 20)
public class MessagePull extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_PULL;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConsumerId consumerId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected long timeout;
- private MessageId messageId;
+
+ @OpenWireProperty(version = 3, sequence = 4)
private String correlationId;
+ @OpenWireProperty(version = 4, sequence = 5)
+ private MessageId messageId;
+
+ @OpenWireExtension
private transient boolean tracked = false;
+ @OpenWireExtension
+ private transient int quantity = 1;
+
+ @OpenWireExtension
+ private transient boolean alwaysSignalDone;
+
@Override
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/NetworkBridgeFilter.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/NetworkBridgeFilter.java
index f39286a..95766cd 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/NetworkBridgeFilter.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/NetworkBridgeFilter.java
@@ -16,20 +16,28 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @openwire:marshaller code="91"
*/
+@OpenWireType(typeCode = 91)
public class NetworkBridgeFilter implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.NETWORK_BRIDGE_FILTER;
static final Logger LOG = LoggerFactory.getLogger(NetworkBridgeFilter.class);
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected BrokerId networkBrokerId;
+
+ @OpenWireProperty(version = 10, sequence = 2)
protected int messageTTL;
+
+ @OpenWireProperty(version = 10, sequence = 3)
protected int consumerTTL;
public NetworkBridgeFilter() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBlobMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBlobMessage.java
index 1c3f191..561793e 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBlobMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBlobMessage.java
@@ -23,24 +23,37 @@
import javax.jms.JMSException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* An implementation of ActiveMQ's BlobMessage for out of band BLOB transfer
*
* openwire:marshaller code="29"
*/
+@OpenWireType(typeCode = 29, version = 3)
public class OpenWireBlobMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_BLOB_MESSAGE;
public static final String BINARY_MIME_TYPE = "application/octet-stream";
+ @OpenWireProperty(version = 3, sequence = 1)
private String remoteBlobUrl;
+
+ @OpenWireProperty(version = 3, sequence = 2, cached = true)
private String mimeType;
- private String name;
+
+ @OpenWireProperty(version = 3, sequence = 3)
private boolean deletedByBroker;
+ @OpenWireExtension
private transient URL url;
+ @OpenWireExtension(serialized = true)
+ private String name;
+
@Override
public OpenWireBlobMessage copy() {
OpenWireBlobMessage copy = new OpenWireBlobMessage();
@@ -97,8 +110,6 @@
/**
* The name of the attachment which can be useful information if transmitting files over
* ActiveMQ
- *
- * @openwire:property version=3 cache=false
*/
public void setName(String name) {
this.name = name;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBytesMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBytesMessage.java
index e7ea14c..33f922c 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBytesMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireBytesMessage.java
@@ -24,6 +24,7 @@
import javax.jms.JMSException;
import javax.jms.MessageNotReadableException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
import org.fusesource.hawtbuf.Buffer;
import org.fusesource.hawtbuf.BufferEditor;
import org.fusesource.hawtbuf.ByteArrayOutputStream;
@@ -36,6 +37,7 @@
*
* openwire:marshaller code=24
*/
+@OpenWireType(typeCode = 24)
public class OpenWireBytesMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_BYTES_MESSAGE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireDestination.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireDestination.java
index 1b3d57f..04bb1f3 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireDestination.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireDestination.java
@@ -33,6 +33,9 @@
import javax.jms.TemporaryTopic;
import javax.jms.Topic;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
import org.apache.activemq.openwire.utils.DefaultUnresolvedDestinationTransformer;
import org.apache.activemq.openwire.utils.UnresolvedDestinationTransformer;
@@ -42,6 +45,7 @@
*
* @openwire:marshaller
*/
+@OpenWireType(typeCode = 0)
public abstract class OpenWireDestination implements Destination, DataStructure, Comparable<OpenWireDestination> {
public static final String PATH_SEPERATOR = ".";
@@ -60,12 +64,22 @@
public static final String TEMP_DESTINATION_NAME_PREFIX = "ID:";
+ @OpenWireProperty(version = 1, sequence = 1)
protected String physicalName;
+ @OpenWireExtension
protected transient OpenWireDestination[] compositeDestinations;
+
+ @OpenWireExtension
protected transient String[] destinationPaths;
+
+ @OpenWireExtension
protected transient boolean isPattern;
+
+ @OpenWireExtension
protected transient int hashValue;
+
+ @OpenWireExtension(serialized = true)
protected Map<String, String> options;
protected static UnresolvedDestinationTransformer unresolvableDestinationTransformer = new DefaultUnresolvedDestinationTransformer();
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMapMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMapMessage.java
index b828aea..656bfce 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMapMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMapMessage.java
@@ -33,6 +33,8 @@
import javax.jms.MessageFormatException;
import javax.jms.MessageNotWriteableException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
import org.apache.activemq.openwire.codec.OpenWireFormat;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.apache.activemq.openwire.utils.OpenWireMarshallingSupport;
@@ -44,10 +46,12 @@
/**
* openwire:marshaller code="25"
*/
+@OpenWireType(typeCode = 25)
public class OpenWireMapMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_MAP_MESSAGE;
+ @OpenWireExtension
protected transient Map<String, Object> map = new HashMap<String, Object>();
private Object readResolve() throws ObjectStreamException {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMessage.java
index 12e1d09..ce39730 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireMessage.java
@@ -26,6 +26,8 @@
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.fusesource.hawtbuf.Buffer;
import org.fusesource.hawtbuf.UTF8Buffer;
@@ -35,11 +37,15 @@
*
* openwire:marshaller code="23"
*/
+@OpenWireType(typeCode = 23)
public class OpenWireMessage extends Message {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_MESSAGE;
+ @OpenWireExtension
protected transient boolean useCompression;
+
+ @OpenWireExtension
protected transient boolean nestedMapAndListAllowed;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireObjectMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireObjectMessage.java
index 4c4a74d..8480234 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireObjectMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireObjectMessage.java
@@ -29,6 +29,8 @@
import javax.jms.JMSException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
import org.apache.activemq.openwire.codec.OpenWireFormat;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.apache.activemq.openwire.utils.ObjectMessageInputStream;
@@ -39,11 +41,13 @@
/**
* openwire:marshaller code="26"
*/
+@OpenWireType(typeCode = 26)
public class OpenWireObjectMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_OBJECT_MESSAGE;
static final ClassLoader ACTIVEMQ_CLASSLOADER = OpenWireObjectMessage.class.getClassLoader();
+ @OpenWireExtension
protected transient Serializable object;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireQueue.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireQueue.java
index 67b87e1..ab03b58 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireQueue.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireQueue.java
@@ -19,10 +19,13 @@
import javax.jms.JMSException;
import javax.jms.Queue;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="100"
*/
+@OpenWireType(typeCode = 100)
public class OpenWireQueue extends OpenWireDestination implements Queue {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_QUEUE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireStreamMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireStreamMessage.java
index fa0660f..d848e0e 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireStreamMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireStreamMessage.java
@@ -26,6 +26,7 @@
import javax.jms.JMSException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.apache.activemq.openwire.utils.OpenWireMarshallingSupport;
import org.fusesource.hawtbuf.Buffer;
@@ -35,6 +36,7 @@
/**
* openwire:marshaller code="27"
*/
+@OpenWireType(typeCode = 27)
public class OpenWireStreamMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_STREAM_MESSAGE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempDestination.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempDestination.java
index f9ba499..9f07ec3 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempDestination.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempDestination.java
@@ -16,6 +16,8 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -24,11 +26,15 @@
*
* @openwire:marshaller
*/
+@OpenWireType(typeCode = 0)
public abstract class OpenWireTempDestination extends OpenWireDestination {
private static final Logger LOG = LoggerFactory.getLogger(OpenWireTempDestination.class);
+ @OpenWireExtension
protected transient String connectionId;
+
+ @OpenWireExtension
protected transient int sequenceId;
public OpenWireTempDestination() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempQueue.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempQueue.java
index 13f4c1b..b3cbed0 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempQueue.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempQueue.java
@@ -19,12 +19,15 @@
import javax.jms.JMSException;
import javax.jms.TemporaryQueue;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* Represents an ActiveMQ Temporary Queue.
*
* @openwire:marshaller code="102"
*/
+@OpenWireType(typeCode = 102)
public class OpenWireTempQueue extends OpenWireTempDestination implements TemporaryQueue {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_TEMP_QUEUE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempTopic.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempTopic.java
index 321bd7a..05a5fe3 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempTopic.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTempTopic.java
@@ -19,9 +19,12 @@
import javax.jms.JMSException;
import javax.jms.TemporaryTopic;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="103"
*/
+@OpenWireType(typeCode = 103)
public class OpenWireTempTopic extends OpenWireTempDestination implements TemporaryTopic {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_TEMP_TOPIC;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTextMessage.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTextMessage.java
index 09c9223..de9d964 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTextMessage.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTextMessage.java
@@ -25,6 +25,8 @@
import javax.jms.JMSException;
import javax.jms.MessageNotWriteableException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
import org.apache.activemq.openwire.codec.OpenWireFormat;
import org.apache.activemq.openwire.utils.ExceptionSupport;
import org.apache.activemq.openwire.utils.OpenWireMarshallingSupport;
@@ -35,10 +37,12 @@
/**
* openwire:marshaller code="28"
*/
+@OpenWireType(typeCode = 28)
public class OpenWireTextMessage extends OpenWireMessage {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_TEXT_MESSAGE;
+ @OpenWireExtension(serialized = true)
protected String text;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTopic.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTopic.java
index 8bf6500..2bf503f 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTopic.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/OpenWireTopic.java
@@ -19,9 +19,12 @@
import javax.jms.JMSException;
import javax.jms.Topic;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="101"
*/
+@OpenWireType(typeCode = 101)
public class OpenWireTopic extends OpenWireDestination implements Topic {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_TOPIC;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/PartialCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/PartialCommand.java
index 030f3a8..6a69c24 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/PartialCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/PartialCommand.java
@@ -16,17 +16,24 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Represents a partial command; a large command that has been split up into
* pieces.
*
* @openwire:marshaller code="60"
*/
+@OpenWireType(typeCode = 60)
public class PartialCommand implements Command {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PARTIAL_COMMAND;
+ @OpenWireProperty(version = 1, sequence = 1)
private int commandId;
+
+ @OpenWireProperty(version = 1, sequence = 1, mandatory = true)
private byte[] data;
public PartialCommand() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerAck.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerAck.java
index b1bda9b..e01a187 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerAck.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerAck.java
@@ -16,6 +16,9 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* A ProducerAck command is sent by a broker to a producer to let it know it has
* received and processed messages that it has produced. The producer will be
@@ -24,11 +27,15 @@
*
* @openwire:marshaller code="19" version="3"
*/
+@OpenWireType(typeCode = 19, version = 3)
public class ProducerAck extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_ACK;
+ @OpenWireProperty(version = 3, sequence = 1)
protected ProducerId producerId;
+
+ @OpenWireProperty(version = 3, sequence = 1)
protected int size;
public ProducerAck() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerId.java
index bd9283e..d934bbf 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerId.java
@@ -16,20 +16,35 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="123"
*
*/
+@OpenWireType(typeCode = 123)
public class ProducerId implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_ID;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected String connectionId;
- protected long sessionId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected long value;
+ @OpenWireProperty(version = 1, sequence = 3)
+ protected long sessionId;
+
+ @OpenWireExtension
protected transient int hashCode;
+
+ @OpenWireExtension
protected transient String key;
+
+ @OpenWireExtension
protected transient SessionId parentId;
public ProducerId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerInfo.java
index 23758b0..878ccba 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ProducerInfo.java
@@ -16,18 +16,31 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="6"
*/
+@OpenWireType(typeCode = 6)
public class ProducerInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ProducerId producerId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3, cached = true)
protected BrokerId[] brokerPath;
+
+ @OpenWireProperty(version = 2, sequence = 4)
protected boolean dispatchAsync;
+
+ @OpenWireProperty(version = 3, sequence = 5)
protected int windowSize;
public ProducerInfo() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveInfo.java
index 9aa4b5e..e739fba 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveInfo.java
@@ -18,16 +18,23 @@
import java.io.IOException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Removes a consumer, producer, session or connection.
*
* @openwire:marshaller code="12"
*/
+@OpenWireType(typeCode = 12)
public class RemoveInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected DataStructure objectId;
+
+ @OpenWireProperty(version = 5, sequence = 2)
protected long lastDeliveredSequenceId;
public RemoveInfo() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveSubscriptionInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveSubscriptionInfo.java
index 5e04db8..1346b79 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveSubscriptionInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/RemoveSubscriptionInfo.java
@@ -16,17 +16,26 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="9"
*/
+@OpenWireType(typeCode = 9)
public class RemoveSubscriptionInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_SUBSCRIPTION_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConnectionId connectionId;
- protected String clientId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected String subscriptionName;
+ @OpenWireProperty(version = 1, sequence = 3)
+ protected String clientId;
+
@Override
public byte getDataStructureType() {
return DATA_STRUCTURE_TYPE;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ReplayCommand.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ReplayCommand.java
index 9d1b4c8..a9b8050 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ReplayCommand.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ReplayCommand.java
@@ -16,6 +16,10 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* A general purpose replay command for some kind of producer where ranges of
* messages are asked to be replayed. This command is typically used over a
@@ -24,16 +28,26 @@
*
* @openwire:marshaller code="65"
*/
+@OpenWireType(typeCode = 65)
public class ReplayCommand extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REPLAY;
- private String producerId;
- private int firstAckNumber;
- private int lastAckNumber;
+ @OpenWireProperty(version = 1, sequence = 1)
private int firstNakNumber;
+
+ @OpenWireProperty(version = 1, sequence = 2)
private int lastNakNumber;
+ @OpenWireExtension(serialized = true)
+ private String producerId;
+
+ @OpenWireExtension(serialized = true)
+ private int firstAckNumber;
+
+ @OpenWireExtension(serialized = true)
+ private int lastAckNumber;
+
public ReplayCommand() {
}
@@ -48,8 +62,6 @@
/**
* Is used to uniquely identify the producer of the sequence
- *
- * @openwire:property version=1 cache=false
*/
public void setProducerId(String producerId) {
this.producerId = producerId;
@@ -62,8 +74,6 @@
/**
* Is used to specify the first sequence number being acknowledged as delivered on the transport
* so that it can be removed from cache
- *
- * @openwire:property version=1
*/
public void setFirstAckNumber(int firstSequenceNumber) {
this.firstAckNumber = firstSequenceNumber;
@@ -76,8 +86,6 @@
/**
* Is used to specify the last sequence number being acknowledged as delivered on the transport
* so that it can be removed from cache
- *
- * @openwire:property version=1
*/
public void setLastAckNumber(int lastSequenceNumber) {
this.lastAckNumber = lastSequenceNumber;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Response.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Response.java
index 15e8508..32102dd 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Response.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/Response.java
@@ -16,12 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="30"
*/
+@OpenWireType(typeCode = 30)
public class Response extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.RESPONSE;
+
+ @OpenWireProperty(version = 1, sequence = 1)
int correlationId;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionId.java
index d30b6b2..34a2b5f 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionId.java
@@ -16,18 +16,31 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="121"
*/
+@OpenWireType(typeCode = 121)
public class SessionId implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_ID;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected String connectionId;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected long value;
+ @OpenWireExtension
protected transient int hashCode;
+
+ @OpenWireExtension
protected transient String key;
+
+ @OpenWireExtension
protected transient ConnectionId parentId;
public SessionId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionInfo.java
index 4064c3f..9b311bc 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SessionInfo.java
@@ -16,13 +16,18 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="4"
*/
+@OpenWireType(typeCode = 4)
public class SessionInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_INFO;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected SessionId sessionId;
public SessionInfo() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ShutdownInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ShutdownInfo.java
index 72f67e0..b2a27c2 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ShutdownInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/ShutdownInfo.java
@@ -16,9 +16,12 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller code="11"
*/
+@OpenWireType(typeCode = 11)
public class ShutdownInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SHUTDOWN_INFO;
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SubscriptionInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SubscriptionInfo.java
index 99fc3bd..899ba86 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SubscriptionInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/SubscriptionInfo.java
@@ -16,20 +16,35 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* Used to represent a durable subscription.
*
* @openwire:marshaller code="55"
*/
+@OpenWireType(typeCode = 55)
public class SubscriptionInfo implements DataStructure {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DURABLE_SUBSCRIPTION_INFO;
- protected OpenWireDestination subscribedDestination;
- protected OpenWireDestination destination;
+ @OpenWireProperty(version = 1, sequence = 1)
protected String clientId;
- protected String subscriptionName;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
+ protected OpenWireDestination destination;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected String selector;
+
+ @OpenWireProperty(version = 1, sequence = 4)
+ protected String subscriptionName;
+
+ @OpenWireProperty(version = 3, sequence = 5)
+ protected OpenWireDestination subscribedDestination;
+
+ @OpenWireProperty(version = 11, sequence = 6)
protected boolean noLocal;
public SubscriptionInfo() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionId.java
index 71be56c..7592a13 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionId.java
@@ -16,9 +16,12 @@
*/
package org.apache.activemq.openwire.commands;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
/**
* @openwire:marshaller
*/
+@OpenWireType(typeCode = 0)
public abstract class TransactionId implements DataStructure {
public abstract boolean isXATransaction();
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionInfo.java
index 698d5e2..223044b 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/TransactionInfo.java
@@ -18,9 +18,13 @@
import java.io.IOException;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
/**
* @openwire:marshaller code="7"
*/
+@OpenWireType(typeCode = 7)
public class TransactionInfo extends BaseCommand {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.TRANSACTION_INFO;
@@ -34,10 +38,15 @@
public static final byte FORGET = 6;
public static final byte END = 7;
- protected byte type;
+ @OpenWireProperty(version = 1, sequence = 1, cached = true)
protected ConnectionId connectionId;
+
+ @OpenWireProperty(version = 1, sequence = 2, cached = true)
protected TransactionId transactionId;
+ @OpenWireProperty(version = 1, sequence = 3)
+ protected byte type;
+
public TransactionInfo() {
}
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/WireFormatInfo.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/WireFormatInfo.java
index f6ceca0..a205aeb 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/WireFormatInfo.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/WireFormatInfo.java
@@ -24,6 +24,9 @@
import java.util.HashMap;
import java.util.Map;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+import org.apache.activemq.openwire.annotations.OpenWireType;
import org.apache.activemq.openwire.codec.OpenWireFormat;
import org.apache.activemq.openwire.utils.OpenWireMarshallingSupport;
import org.fusesource.hawtbuf.Buffer;
@@ -34,16 +37,23 @@
/**
* @openwire:marshaller code="1"
*/
+@OpenWireType(typeCode = 1, marshalAware = true)
public class WireFormatInfo implements Command, MarshallAware {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.WIREFORMAT_INFO;
private static final int MAX_PROPERTY_SIZE = 1024 * 4;
private static final byte MAGIC[] = new byte[] { 'A', 'c', 't', 'i', 'v', 'e', 'M', 'Q' };
+ @OpenWireProperty(version = 1, sequence = 1, size = 8)
protected byte magic[] = MAGIC;
+
+ @OpenWireProperty(version = 1, sequence = 2)
protected int version;
+
+ @OpenWireProperty(version = 1, sequence = 3)
protected Buffer marshalledProperties;
+ @OpenWireExtension
protected transient Map<String, Object> properties;
@Override
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/XATransactionId.java b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/XATransactionId.java
index 8781386..6ed8551 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/commands/XATransactionId.java
+++ b/openwire-core/src/main/java/org/apache/activemq/openwire/commands/XATransactionId.java
@@ -21,23 +21,39 @@
import javax.transaction.xa.Xid;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.apache.activemq.openwire.annotations.OpenWireExtension;
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
import org.fusesource.hawtbuf.DataByteArrayInputStream;
import org.fusesource.hawtbuf.DataByteArrayOutputStream;
/**
* @openwire:marshaller code="112"
*/
+@OpenWireType(typeCode = 112)
public class XATransactionId extends TransactionId implements Xid, Comparable<XATransactionId> {
public static final byte DATA_STRUCTURE_TYPE = CommandTypes.OPENWIRE_XA_TRANSACTION_ID;
+ @OpenWireProperty(version = 1, sequence = 1)
private int formatId;
- private byte[] branchQualifier;
+
+ @OpenWireProperty(version = 1, sequence = 2)
private byte[] globalTransactionId;
+
+ @OpenWireProperty(version = 1, sequence = 3)
+ private byte[] branchQualifier;
+
+ @OpenWireExtension
private transient DataByteArrayOutputStream outputStream;
+
+ @OpenWireExtension
private transient byte[] encodedXidBytes;
+ @OpenWireExtension
private transient int hash;
+
+ @OpenWireExtension
private transient String transactionKey;
public XATransactionId() {
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/utils/CronParser.java b/openwire-core/src/main/java/org/apache/activemq/openwire/utils/CronParser.java
deleted file mode 100644
index 491f26d..0000000
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/utils/CronParser.java
+++ /dev/null
@@ -1,357 +0,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.
- */
-package org.apache.activemq.openwire.utils;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import javax.jms.MessageFormatException;
-
-public class CronParser {
-
- private static final int NUMBER_TOKENS = 5;
- private static final int MINUTES = 0;
- private static final int HOURS = 1;
- private static final int DAY_OF_MONTH = 2;
- private static final int MONTH = 3;
- private static final int DAY_OF_WEEK = 4;
-
- public static long getNextScheduledTime(final String cronEntry, long currentTime) throws MessageFormatException {
-
- long result = 0;
-
- if (cronEntry == null || cronEntry.length() == 0) {
- return result;
- }
-
- // Handle the once per minute case "* * * * *"
- // starting the next event at the top of the minute.
- if (cronEntry.equals("* * * * *")) {
- result = currentTime + 60 * 1000;
- result = result / 60000 * 60000;
- return result;
- }
-
- List<String> list = tokenize(cronEntry);
- List<CronEntry> entries = buildCronEntries(list);
- Calendar working = Calendar.getInstance();
- working.setTimeInMillis(currentTime);
- working.set(Calendar.SECOND, 0);
-
- CronEntry minutes = entries.get(MINUTES);
- CronEntry hours = entries.get(HOURS);
- CronEntry dayOfMonth = entries.get(DAY_OF_MONTH);
- CronEntry month = entries.get(MONTH);
- CronEntry dayOfWeek = entries.get(DAY_OF_WEEK);
-
- // Start at the top of the next minute, cron is only guaranteed to be
- // run on the minute.
- int timeToNextMinute = 60 - working.get(Calendar.SECOND);
- working.add(Calendar.SECOND, timeToNextMinute);
-
- // If its already to late in the day this will roll us over to tomorrow
- // so we'll need to check again when done updating month and day.
- int currentMinutes = working.get(Calendar.MINUTE);
- if (!isCurrent(minutes, currentMinutes)) {
- int nextMinutes = getNext(minutes, currentMinutes);
- working.add(Calendar.MINUTE, nextMinutes);
- }
-
- int currentHours = working.get(Calendar.HOUR_OF_DAY);
- if (!isCurrent(hours, currentHours)) {
- int nextHour = getNext(hours, currentHours);
- working.add(Calendar.HOUR_OF_DAY, nextHour);
- }
-
- // We can roll into the next month here which might violate the cron setting
- // rules so we check once then recheck again after applying the month settings.
- doUpdateCurrentDay(working, dayOfMonth, dayOfWeek);
-
- // Start by checking if we are in the right month, if not then calculations
- // need to start from the beginning of the month to ensure that we don't end
- // up on the wrong day. (Can happen when DAY_OF_WEEK is set and current time
- // is ahead of the day of the week to execute on).
- doUpdateCurrentMonth(working, month);
-
- // Now Check day of week and day of month together since they can be specified
- // together in one entry, if both "day of month" and "day of week" are restricted
- // (not "*"), then either the "day of month" field (3) or the "day of week" field
- // (5) must match the current day or the Calenday must be advanced.
- doUpdateCurrentDay(working, dayOfMonth, dayOfWeek);
-
- // Now we can chose the correct hour and minute of the day in question.
-
- currentHours = working.get(Calendar.HOUR_OF_DAY);
- if (!isCurrent(hours, currentHours)) {
- int nextHour = getNext(hours, currentHours);
- working.add(Calendar.HOUR_OF_DAY, nextHour);
- }
-
- currentMinutes = working.get(Calendar.MINUTE);
- if (!isCurrent(minutes, currentMinutes)) {
- int nextMinutes = getNext(minutes, currentMinutes);
- working.add(Calendar.MINUTE, nextMinutes);
- }
-
- result = working.getTimeInMillis();
-
- if (result <= currentTime) {
- throw new ArithmeticException("Unable to compute next scheduled exection time.");
- }
-
- return result;
- }
-
- protected static long doUpdateCurrentMonth(Calendar working, CronEntry month) throws MessageFormatException {
- int currentMonth = working.get(Calendar.MONTH) + 1;
- if (!isCurrent(month, currentMonth)) {
- int nextMonth = getNext(month, currentMonth);
- working.add(Calendar.MONTH, nextMonth);
-
- // Reset to start of month.
- resetToStartOfDay(working, 1);
-
- return working.getTimeInMillis();
- }
-
- return 0L;
- }
-
- protected static long doUpdateCurrentDay(Calendar working, CronEntry dayOfMonth, CronEntry dayOfWeek) throws MessageFormatException {
-
- int currentDayOfWeek = working.get(Calendar.DAY_OF_WEEK) - 1;
- int currentDayOfMonth = working.get(Calendar.DAY_OF_MONTH);
-
- // Simplest case, both are unrestricted or both match today otherwise
- // result must be the closer of the two if both are set, or the next
- // match to the one that is.
- if (!isCurrent(dayOfWeek, currentDayOfWeek) || !isCurrent(dayOfMonth, currentDayOfMonth)) {
-
- int nextWeekDay = Integer.MAX_VALUE;
- int nextCalendarDay = Integer.MAX_VALUE;
-
- if (!isCurrent(dayOfWeek, currentDayOfWeek)) {
- nextWeekDay = getNext(dayOfWeek, currentDayOfWeek);
- }
-
- if (!isCurrent(dayOfMonth, currentDayOfMonth)) {
- nextCalendarDay = getNext(dayOfMonth, currentDayOfMonth);
- }
-
- if (nextWeekDay < nextCalendarDay) {
- working.add(Calendar.DAY_OF_WEEK, nextWeekDay);
- } else {
- working.add(Calendar.DAY_OF_MONTH, nextCalendarDay);
- }
-
- // Since the day changed, we restart the clock at the start of the day
- // so that the next time will either be at 12am + value of hours and
- // minutes pattern.
- resetToStartOfDay(working, working.get(Calendar.DAY_OF_MONTH));
-
- return working.getTimeInMillis();
- }
-
- return 0L;
- }
-
- public static void validate(final String cronEntry) throws MessageFormatException {
- List<String> list = tokenize(cronEntry);
- List<CronEntry> entries = buildCronEntries(list);
- for (CronEntry e : entries) {
- validate(e);
- }
- }
-
- static void validate(final CronEntry entry) throws MessageFormatException {
- List<Integer> list = entry.currentWhen;
- if (list.isEmpty() || list.get(0).intValue() < entry.start || list.get(list.size() - 1).intValue() > entry.end) {
- throw new MessageFormatException("Invalid token: " + entry);
- }
- }
-
- static int getNext(final CronEntry entry, final int current) throws MessageFormatException {
- int result = 0;
-
- if (entry.currentWhen == null) {
- entry.currentWhen = calculateValues(entry);
- }
-
- List<Integer> list = entry.currentWhen;
- int next = -1;
- for (Integer i : list) {
- if (i.intValue() > current) {
- next = i.intValue();
- break;
- }
- }
- if (next != -1) {
- result = next - current;
- } else {
- int first = list.get(0).intValue();
- result = entry.end + first - entry.start - current;
-
- // Account for difference of one vs zero based indices.
- if (entry.name.equals("DayOfWeek") || entry.name.equals("Month")) {
- result++;
- }
- }
-
- return result;
- }
-
- static boolean isCurrent(final CronEntry entry, final int current) throws MessageFormatException {
- boolean result = entry.currentWhen.contains(new Integer(current));
- return result;
- }
-
- protected static void resetToStartOfDay(Calendar target, int day) {
- target.set(Calendar.DAY_OF_MONTH, day);
- target.set(Calendar.HOUR_OF_DAY, 0);
- target.set(Calendar.MINUTE, 0);
- target.set(Calendar.SECOND, 0);
- }
-
- static List<String> tokenize(String cron) throws IllegalArgumentException {
- StringTokenizer tokenize = new StringTokenizer(cron);
- List<String> result = new ArrayList<String>();
- while (tokenize.hasMoreTokens()) {
- result.add(tokenize.nextToken());
- }
- if (result.size() != NUMBER_TOKENS) {
- throw new IllegalArgumentException("Not a valid cron entry - wrong number of tokens(" + result.size() + "): " + cron);
- }
- return result;
- }
-
- protected static List<Integer> calculateValues(final CronEntry entry) {
- List<Integer> result = new ArrayList<Integer>();
- if (isAll(entry.token)) {
- for (int i = entry.start; i <= entry.end; i++) {
- result.add(i);
- }
- } else if (isAStep(entry.token)) {
- int denominator = getDenominator(entry.token);
- String numerator = getNumerator(entry.token);
- CronEntry ce = new CronEntry(entry.name, numerator, entry.start, entry.end);
- List<Integer> list = calculateValues(ce);
- for (Integer i : list) {
- if (i.intValue() % denominator == 0) {
- result.add(i);
- }
- }
- } else if (isAList(entry.token)) {
- StringTokenizer tokenizer = new StringTokenizer(entry.token, ",");
- while (tokenizer.hasMoreTokens()) {
- String str = tokenizer.nextToken();
- CronEntry ce = new CronEntry(entry.name, str, entry.start, entry.end);
- List<Integer> list = calculateValues(ce);
- result.addAll(list);
- }
- } else if (isARange(entry.token)) {
- int index = entry.token.indexOf('-');
- int first = Integer.parseInt(entry.token.substring(0, index));
- int last = Integer.parseInt(entry.token.substring(index + 1));
- for (int i = first; i <= last; i++) {
- result.add(i);
- }
- } else {
- int value = Integer.parseInt(entry.token);
- result.add(value);
- }
- Collections.sort(result);
- return result;
- }
-
- protected static boolean isARange(String token) {
- return token != null && token.indexOf('-') >= 0;
- }
-
- protected static boolean isAStep(String token) {
- return token != null && token.indexOf('/') >= 0;
- }
-
- protected static boolean isAList(String token) {
- return token != null && token.indexOf(',') >= 0;
- }
-
- protected static boolean isAll(String token) {
- return token != null && token.length() == 1 && (token.charAt(0) == '*' || token.charAt(0) == '?');
- }
-
- protected static int getDenominator(final String token) {
- int result = 0;
- int index = token.indexOf('/');
- String str = token.substring(index + 1);
- result = Integer.parseInt(str);
- return result;
- }
-
- protected static String getNumerator(final String token) {
- int index = token.indexOf('/');
- String str = token.substring(0, index);
- return str;
- }
-
- static List<CronEntry> buildCronEntries(List<String> tokens) {
-
- List<CronEntry> result = new ArrayList<CronEntry>();
-
- CronEntry minutes = new CronEntry("Minutes", tokens.get(MINUTES), 0, 60);
- minutes.currentWhen = calculateValues(minutes);
- result.add(minutes);
- CronEntry hours = new CronEntry("Hours", tokens.get(HOURS), 0, 24);
- hours.currentWhen = calculateValues(hours);
- result.add(hours);
- CronEntry dayOfMonth = new CronEntry("DayOfMonth", tokens.get(DAY_OF_MONTH), 1, 31);
- dayOfMonth.currentWhen = calculateValues(dayOfMonth);
- result.add(dayOfMonth);
- CronEntry month = new CronEntry("Month", tokens.get(MONTH), 1, 12);
- month.currentWhen = calculateValues(month);
- result.add(month);
- CronEntry dayOfWeek = new CronEntry("DayOfWeek", tokens.get(DAY_OF_WEEK), 0, 6);
- dayOfWeek.currentWhen = calculateValues(dayOfWeek);
- result.add(dayOfWeek);
-
- return result;
- }
-
- static class CronEntry {
-
- final String name;
- final String token;
- final int start;
- final int end;
-
- List<Integer> currentWhen;
-
- CronEntry(String name, String token, int start, int end) {
- this.name = name;
- this.token = token;
- this.start = start;
- this.end = end;
- }
-
- @Override
- public String toString() {
- return this.name + ":" + token;
- }
- }
-}
diff --git a/openwire-core/src/test/java/org/apache/activemq/openwire/commands/OpenWireTextMessageTest.java b/openwire-core/src/test/java/org/apache/activemq/openwire/commands/OpenWireTextMessageTest.java
index c92f92c..d4a3811 100644
--- a/openwire-core/src/test/java/org/apache/activemq/openwire/commands/OpenWireTextMessageTest.java
+++ b/openwire-core/src/test/java/org/apache/activemq/openwire/commands/OpenWireTextMessageTest.java
@@ -28,10 +28,7 @@
import javax.jms.MessageNotReadableException;
import javax.jms.MessageNotWriteableException;
-import org.apache.activemq.openwire.commands.CommandTypes;
-import org.apache.activemq.openwire.commands.Message;
-import org.apache.activemq.openwire.commands.OpenWireTextMessage;
-import org.apache.activemq.util.MarshallingSupport;
+import org.apache.activemq.openwire.utils.MarshallingSupport;
import org.fusesource.hawtbuf.Buffer;
import org.fusesource.hawtbuf.ByteArrayOutputStream;
import org.junit.Test;
diff --git a/openwire-core/src/test/java/org/apache/activemq/openwire/ide/OpenWireCodecGenerator.java b/openwire-core/src/test/java/org/apache/activemq/openwire/ide/OpenWireCodecGenerator.java
deleted file mode 100644
index e066fe7..0000000
--- a/openwire-core/src/test/java/org/apache/activemq/openwire/ide/OpenWireCodecGenerator.java
+++ /dev/null
@@ -1,121 +0,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.
- */
-package org.apache.activemq.openwire.ide;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.generator.GeneratorTask;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility class for running the OpenWire source generator from within an
- * IDE or as part of a test.
- */
-public class OpenWireCodecGenerator {
-
- private static final Logger LOG = LoggerFactory.getLogger(OpenWireCodecGenerator.class);
-
- private final GeneratorTask generator = new GeneratorTask();
-
- private int baseVersion = 10;
- private int maxVersion = 10;
-
- private File sourceDir;
- private File targetDir;
-
- /**
- * @param args
- * @throws IOException
- */
- public static void main(String[] args) throws IOException {
-
- OpenWireCodecGenerator runner = new OpenWireCodecGenerator();
-
- runner.setBaseVersion(10);
- runner.setMaxVersion(10);
-
- File sourceDir = new File("./src/main/java/io/neutronjms/openwire/commands").getCanonicalFile();
- File targetDir = new File("./target/generated-sources/openwire").getCanonicalFile();
-
- if (!sourceDir.exists()) {
- throw new IOException("Source dir does not exist. " + sourceDir);
- }
-
- if (!targetDir.exists()) {
- targetDir.createNewFile();
- if (!targetDir.exists()) {
- throw new IOException("Source dir does not exist. " + targetDir);
- }
- }
-
- runner.setSourceDir(sourceDir);
- runner.setTargetDir(targetDir);
-
- runner.generate();
- }
-
- /**
- * Runs the OpenWire generator using the configured generation values.
- */
- public void generate() {
- generator.setFromVersion(getBaseVersion());
- generator.setToVersion(getMaxVersion());
- generator.setSourceDir(getSourceDir());
- generator.setTargetDir(getTargetDir());
-
- try {
- generator.execute();
- } catch (RuntimeException e) {
- LOG.warn("Caught exception while executing generator: ", e);
- throw e;
- }
- }
-
- public int getBaseVersion() {
- return baseVersion;
- }
-
- public void setBaseVersion(int version) {
- this.baseVersion = version;
- }
-
- public int getMaxVersion() {
- return maxVersion;
- }
-
- public void setMaxVersion(int version) {
- this.maxVersion = version;
- }
-
- public File getSourceDir() {
- return sourceDir;
- }
-
- public void setSourceDir(File sourceDir) {
- this.sourceDir = sourceDir;
- }
-
- public File getTargetDir() {
- return targetDir;
- }
-
- public void setTargetDir(File targetDir) {
- this.targetDir = targetDir;
- }
-}
diff --git a/openwire-core/src/test/java/org/apache/activemq/openwire/utils/CronParserTest.java b/openwire-core/src/test/java/org/apache/activemq/openwire/utils/CronParserTest.java
deleted file mode 100644
index 907b524..0000000
--- a/openwire-core/src/test/java/org/apache/activemq/openwire/utils/CronParserTest.java
+++ /dev/null
@@ -1,363 +0,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.
- */
-package org.apache.activemq.openwire.utils;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Calendar;
-import java.util.List;
-
-import javax.jms.MessageFormatException;
-
-import org.apache.activemq.openwire.utils.CronParser;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CronParserTest {
-
- private static final Logger LOG = LoggerFactory.getLogger(CronParserTest.class);
-
- @Test
- public void testgetNextTimeDayOfWeek() throws MessageFormatException {
-
- // using an absolute date so that result will be absolute - Monday 15 Nov 2010
- Calendar current = Calendar.getInstance();
- current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
- LOG.debug("start:" + current.getTime());
-
- String test = "* * * * 5";
- long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- Calendar result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(0,result.get(Calendar.HOUR));
- // expecting Friday 19th
- assertEquals(19,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.NOVEMBER,result.get(Calendar.MONTH));
- assertEquals(2010,result.get(Calendar.YEAR));
- }
-
- @Test
- public void testgetNextTimeDayOfWeekVariant() throws MessageFormatException {
-
- // using an absolute date so that result will be absolute - Monday 7 March 2011
- Calendar current = Calendar.getInstance();
- current.set(2011, Calendar.MARCH, 7, 9, 15, 30);
- LOG.debug("start:" + current.getTime());
-
- String test = "50 20 * * 5";
- long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- Calendar result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(50,result.get(Calendar.MINUTE));
- assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
- // expecting Friday 11th
- assertEquals(11,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.FRIDAY,result.get(Calendar.DAY_OF_WEEK));
- assertEquals(Calendar.MARCH,result.get(Calendar.MONTH));
- assertEquals(2011,result.get(Calendar.YEAR));
-
- // Match to the day of week, but to late to run, should just a week forward.
- current = Calendar.getInstance();
- current.set(2011, Calendar.MARCH, 11, 22, 0, 30);
- LOG.debug("update:" + current.getTime());
-
- next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- //assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(50,result.get(Calendar.MINUTE));
- assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
- // expecting Friday 18th
- assertEquals(18,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.FRIDAY,result.get(Calendar.DAY_OF_WEEK));
- assertEquals(Calendar.MARCH,result.get(Calendar.MONTH));
- assertEquals(2011,result.get(Calendar.YEAR));
- }
-
- @Test
- public void testgetNextTimeMonthVariant() throws MessageFormatException {
-
- // using an absolute date so that result will be absolute - Monday 7 March 2011
- Calendar current = Calendar.getInstance();
- current.set(2011, Calendar.MARCH, 7, 9, 15, 30);
- LOG.debug("start:" + current.getTime());
-
- String test = "0 20 * 4,5 0";
- long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- Calendar result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
- // expecting Sunday 3rd of April
- assertEquals(Calendar.APRIL,result.get(Calendar.MONTH));
- assertEquals(3,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
- assertEquals(2011,result.get(Calendar.YEAR));
-
- current = Calendar.getInstance();
- current.set(2011, Calendar.APRIL, 30, 22, 0, 30);
- LOG.debug("update:" + current.getTime());
-
- next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
- // expecting Sunday 1st of May
- assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
- assertEquals(Calendar.MAY,result.get(Calendar.MONTH));
- assertEquals(2011,result.get(Calendar.YEAR));
-
- // Move past last time and see if reschedule to next year works.
- current = Calendar.getInstance();
- current.set(2011, Calendar.MAY, 30, 22, 0, 30);
- LOG.debug("update:" + current.getTime());
-
- next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(20,result.get(Calendar.HOUR_OF_DAY));
- // expecting Sunday 1st of April - 2012
- assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.SUNDAY,result.get(Calendar.DAY_OF_WEEK));
- assertEquals(Calendar.APRIL,result.get(Calendar.MONTH));
- assertEquals(2012,result.get(Calendar.YEAR));
- }
-
- @Test
- public void testgetNextTimeMonth() throws MessageFormatException {
-
- // using an absolute date so that result will be absolute - Monday 15 Nov 2010
- Calendar current = Calendar.getInstance();
- current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
- LOG.debug("start:" + current.getTime());
-
- String test = "* * * 12 *";
- long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- Calendar result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(0,result.get(Calendar.HOUR_OF_DAY));
- assertEquals(1,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.DECEMBER,result.get(Calendar.MONTH));
- assertEquals(2010,result.get(Calendar.YEAR));
- }
-
- @Test
- public void testgetNextTimeDays() throws MessageFormatException {
-
- // using an absolute date so that result will be absolute - Monday 15 Nov 2010
- Calendar current = Calendar.getInstance();
- current.set(2010, Calendar.NOVEMBER, 15, 9, 15, 30);
- LOG.debug("start:" + current.getTime());
-
- String test = "* * 16 * *";
- long next = CronParser.getNextScheduledTime(test, current.getTimeInMillis());
-
- Calendar result = Calendar.getInstance();
- result.setTimeInMillis(next);
- LOG.debug("next:" + result.getTime());
-
- assertEquals(0,result.get(Calendar.SECOND));
- assertEquals(0,result.get(Calendar.MINUTE));
- assertEquals(0,result.get(Calendar.HOUR));
- assertEquals(16,result.get(Calendar.DAY_OF_MONTH));
- assertEquals(Calendar.NOVEMBER,result.get(Calendar.MONTH));
- assertEquals(2010,result.get(Calendar.YEAR));
- }
-
- @Test
- public void testgetNextTimeMinutes() throws MessageFormatException {
- String test = "30 * * * *";
- long current = 20*60*1000;
- Calendar calender = Calendar.getInstance();
- calender.setTimeInMillis(current);
- LOG.debug("start:" + calender.getTime());
- long next = CronParser.getNextScheduledTime(test, current);
-
- calender.setTimeInMillis(next);
- LOG.debug("next:" + calender.getTime());
- long result = next - current;
- assertEquals(60*10*1000,result);
- }
-
- @Test
- public void testgetNextTimeHours() throws MessageFormatException {
- String test = "* 1 * * *";
-
- Calendar calender = Calendar.getInstance();
- calender.set(1972, 2, 2, 17, 10, 0);
- long current = calender.getTimeInMillis();
- long next = CronParser.getNextScheduledTime(test, current);
-
- calender.setTimeInMillis(next);
- long result = next - current;
- long expected = 60*1000*60*8 + 60 * 1000;
- assertEquals(expected,result);
- }
-
- @Test
- public void testgetNextTimeHoursZeroMin() throws MessageFormatException {
- String test = "0 1 * * *";
-
- Calendar calender = Calendar.getInstance();
- calender.set(1972, 2, 2, 17, 10, 0);
- long current = calender.getTimeInMillis();
- long next = CronParser.getNextScheduledTime(test, current);
-
- calender.setTimeInMillis(next);
- long result = next - current;
- long expected = 60*1000*60*7 + 60*1000*50;
- assertEquals(expected,result);
- }
-
- @Test
- public void testValidate() {
- try {
- CronParser.validate("30 08 10 06 ? ");
- CronParser.validate("30 08 ? 06 5 ");
- CronParser.validate("30 08 ? 06 * ");
- CronParser.validate("* * * * * ");
- CronParser.validate("* * * * 1-6 ");
- CronParser.validate("* * * * 1,2,5 ");
- CronParser.validate("*/10 0-4,8-12 * * 1-2,3-6/2 ");
-
- } catch (Exception e) {
- fail("Should be valid ");
- }
-
- try {
- CronParser.validate("61 08 10 06 * ");
- fail("Should not be valid ");
- } catch (Exception e) {
- }
- try {
- CronParser.validate("61 08 06 * ");
- fail("Should not be valid ");
- } catch (Exception e) {
- }
- }
-
- @Test
- public void testGetNextCommaSeparated() throws MessageFormatException {
- String token = "3,5,7";
- // test minimum values
- int next = CronParser.getNext(createEntry(token, 1, 10), 3);
- assertEquals(2, next);
- next = CronParser.getNext(createEntry(token, 1, 10), 8);
- assertEquals(4, next);
- next = CronParser.getNext(createEntry(token, 1, 10), 1);
- assertEquals(2, next);
- }
-
- @Test
- public void testGetNextRange() throws MessageFormatException {
- String token = "3-5";
- // test minimum values
- int next = CronParser.getNext(createEntry(token, 1, 10), 3);
- assertEquals(1, next);
- next = CronParser.getNext(createEntry(token, 1, 10), 5);
- assertEquals(7, next);
- next = CronParser.getNext(createEntry(token, 1, 10), 6);
- assertEquals(6, next);
- next = CronParser.getNext(createEntry(token, 1, 10), 1);
- assertEquals(2, next);
- }
-
- @Test
- public void testGetNextExact() throws MessageFormatException {
- String token = "3";
- int next = CronParser.getNext(createEntry(token, 0, 10), 2);
- assertEquals(1, next);
- next = CronParser.getNext(createEntry(token, 0, 10), 3);
- assertEquals(10, next);
- next = CronParser.getNext(createEntry(token, 0, 10), 1);
- assertEquals(2, next);
- }
-
- @Test
- public void testTokenize() {
- String test = "*/5 * * * *";
- List<String> list = CronParser.tokenize(test);
- assertEquals(list.size(), 5);
-
- test = "*/5 * * * * *";
- try {
- list = CronParser.tokenize(test);
- fail("Should have throw an exception");
- } catch (Throwable e) {
- }
-
- test = "*/5 * * * *";
- try {
- list = CronParser.tokenize(test);
- fail("Should have throw an exception");
- } catch (Throwable e) {
- }
-
- test = "0 1 2 3 4";
- list = CronParser.tokenize(test);
- assertEquals(list.size(), 5);
-
- assertEquals(list.get(0), "0");
- assertEquals(list.get(1), "1");
- assertEquals(list.get(2), "2");
- assertEquals(list.get(3), "3");
- assertEquals(list.get(4), "4");
- }
-
- public void testGetNextScheduledTime() {
- fail("Not yet implemented");
- }
-
- CronParser.CronEntry createEntry(String str, int start, int end) {
- return new CronParser.CronEntry("test", str, start, end);
- }
-
-}
diff --git a/openwire-core/src/test/java/org/apache/activemq/openwire/utils/MarshallingSupport.java b/openwire-core/src/test/java/org/apache/activemq/openwire/utils/MarshallingSupport.java
new file mode 100644
index 0000000..0bd38ce
--- /dev/null
+++ b/openwire-core/src/test/java/org/apache/activemq/openwire/utils/MarshallingSupport.java
@@ -0,0 +1,76 @@
+/*
+ * 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.utils;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * Support functions for dealing with data in OpenWire.
+ */
+public class MarshallingSupport {
+
+ public static void writeUTF8(DataOutput dataOut, String text) throws IOException {
+
+ if (text != null) {
+ int strlen = text.length();
+ int utflen = 0;
+ char[] charr = new char[strlen];
+ int c = 0;
+ int count = 0;
+
+ text.getChars(0, strlen, charr, 0);
+
+ for (int i = 0; i < strlen; i++) {
+ c = charr[i];
+ if ((c >= 0x0001) && (c <= 0x007F)) {
+ utflen++;
+ } else if (c > 0x07FF) {
+ utflen += 3;
+ } else {
+ utflen += 2;
+ }
+ }
+ // TODO diff: Sun code - removed
+ byte[] bytearr = new byte[utflen + 4]; // TODO diff: Sun code
+ bytearr[count++] = (byte) ((utflen >>> 24) & 0xFF); // TODO diff:
+ // Sun code
+ bytearr[count++] = (byte) ((utflen >>> 16) & 0xFF); // TODO diff:
+ // Sun code
+ bytearr[count++] = (byte) ((utflen >>> 8) & 0xFF);
+ bytearr[count++] = (byte) ((utflen >>> 0) & 0xFF);
+ for (int i = 0; i < strlen; i++) {
+ c = charr[i];
+ if ((c >= 0x0001) && (c <= 0x007F)) {
+ bytearr[count++] = (byte) c;
+ } else if (c > 0x07FF) {
+ bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
+ bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F));
+ bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
+ } else {
+ bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
+ bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
+ }
+ }
+ dataOut.write(bytearr);
+
+ } else {
+ dataOut.writeInt(-1);
+ }
+ }
+
+}
diff --git a/openwire-generator/pom.xml b/openwire-generator/pom.xml
index 1cde472..6a84089 100644
--- a/openwire-generator/pom.xml
+++ b/openwire-generator/pom.xml
@@ -33,55 +33,32 @@
<dependencies>
<!-- =================================== -->
- <!-- Required Dependencies -->
+ <!-- Required Dependencies -->
<!-- =================================== -->
<dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>openwire-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.reflections</groupId>
+ <artifactId>reflections</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>groovy</groupId>
- <artifactId>gram</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>1.0-jsr-04</version>
- </dependency>
- <dependency>
- <groupId>annogen</groupId>
- <artifactId>annogen</artifactId>
- <version>0.1.0</version>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
+ <groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.6.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
- <profiles>
- <profile>
- <id>default-tools.jar</id>
- <activation>
- <property>
- <name>java.vendor</name>
- <value>Sun Microsystems Inc.</value>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>com.sun</groupId>
- <artifactId>tools</artifactId>
- <version>1.6.0</version>
- <scope>system</scope>
- <systemPath>${java.home}/../lib/tools.jar</systemPath>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
<build>
<plugins>
<plugin>
@@ -92,4 +69,5 @@
</plugin>
</plugins>
</build>
+
</project>
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/AbstractGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/AbstractGenerator.java
new file mode 100644
index 0000000..f9594b6
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/AbstractGenerator.java
@@ -0,0 +1,70 @@
+/*
+ * 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.generator;
+
+import java.io.PrintWriter;
+
+/**
+ * Base class that provides useful default implementations if Generator
+ * related tasks.
+ */
+public abstract class AbstractGenerator implements Generator {
+
+ private String baseDir;
+
+ /**
+ * @return the baseDir where the generator should operate.
+ */
+ @Override
+ public String getBaseDir() {
+ return baseDir;
+ }
+
+ /**
+ * @param baseDir
+ * the base directory to use as the root of the generation process.
+ */
+ @Override
+ public void setBaseDir(String baseDir) {
+ this.baseDir = baseDir;
+ }
+
+ /**
+ * Writes the common Apache 2.0 license used in all generated source content.
+ *
+ * @param out
+ * A PrintWriter instance to write the license to.
+ */
+ public static void writeApacheLicense(PrintWriter out) {
+ out.println("/*");
+ out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
+ out.println(" * contributor license agreements. See the NOTICE file distributed with");
+ out.println(" * this work for additional information regarding copyright ownership.");
+ out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
+ out.println(" * (the \"License\"); you may not use this file except in compliance with");
+ out.println(" * the License. You may obtain a copy of the License at");
+ out.println(" *");
+ out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
+ out.println(" *");
+ out.println(" * Unless required by applicable law or agreed to in writing, software");
+ out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
+ out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
+ out.println(" * See the License for the specific language governing permissions and");
+ out.println(" * limitations under the License.");
+ out.println(" */");
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generator.java
new file mode 100644
index 0000000..787cd07
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generator.java
@@ -0,0 +1,32 @@
+/*
+ * 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.generator;
+
+import java.util.List;
+
+/**
+ * Interface used for all Generator types.
+ */
+public interface Generator {
+
+ public void run(List<OpenWireTypeDescriptor> typeDescriptors) throws Exception;
+
+ public void setBaseDir(String baseDir);
+
+ public String getBaseDir();
+
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorTask.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorTask.java
index 24573d1..cf0a8bd 100644
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorTask.java
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorTask.java
@@ -16,191 +16,98 @@
*/
package org.apache.activemq.openwire.generator;
-import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
-import org.codehaus.jam.JamService;
-import org.codehaus.jam.JamServiceFactory;
-import org.codehaus.jam.JamServiceParams;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The main task that controls the OpenWire code generation routines.
*/
public class GeneratorTask extends Task {
- protected int fromVersion = 1;
- protected int toVersion = 1;
- protected boolean rangedGenerate = true;
- protected File sourceDir = new File("./src/main/java");
- protected File targetDir = new File("./src/main/java");
- protected boolean generateMarshalers = true;
- protected boolean generateTests = false;
- protected String commandsPackage;
- protected String codecPackageRoot;
+ private static final Logger LOG = LoggerFactory.getLogger(GeneratorTask.class);
+
+ private String baseDir = "./src/main/java";
public static void main(String[] args) {
Project project = new Project();
project.init();
+
GeneratorTask generator = new GeneratorTask();
generator.setProject(project);
- if (args.length > 0) {
- generator.fromVersion = Integer.parseInt(args[0]);
- }
+ try {
+ if (args.length >= 1) {
+ generator.setBaseDir(args[1]);
+ }
- if (args.length > 0) {
- generator.toVersion = Integer.parseInt(args[0]);
+ generator.execute();
+ } catch (Exception e) {
+ System.out.println("Error generating source:");
+ e.printStackTrace();
}
-
- if (args.length > 1) {
- generator.sourceDir = new File(args[1]);
- }
-
- if (args.length > 2) {
- generator.targetDir = new File(args[1]);
- }
-
- if (args.length > 3) {
- generator.commandsPackage = args[2];
- }
-
- if (args.length > 4) {
- generator.codecPackageRoot = args[3];
- }
-
- generator.execute();
}
+ //----- Perform the generation by finding generators ---------------------//
+
@Override
public void execute() throws BuildException {
+
+ LOG.info("===========================================================");
+ LOG.info("Running OpenWire Generator");
+ LOG.info("===========================================================");
+ LOG.info("Base Diractory = {}", getBaseDir());
+
try {
- System.out.println("======================================================");
- System.out.println("OpenWire Generator: Command source files in: ");
- System.out.println("" + sourceDir);
- System.out.println("======================================================");
+ List<OpenWireTypeDescriptor> descriptors = new ArrayList<OpenWireTypeDescriptor>();
- JamServiceFactory jamServiceFactory = JamServiceFactory.getInstance();
- JamServiceParams params = jamServiceFactory.createServiceParams();
- File[] dirs = new File[] { sourceDir };
- params.includeSourcePattern(dirs, "**/*.java");
- JamService jam = jamServiceFactory.createService(params);
-
- if (generateMarshalers) {
- if (!isRangedGenerate()) {
- runMarshalerGenerateScript(jam, fromVersion);
- if (toVersion != fromVersion) {
- runMarshalerGenerateScript(jam, toVersion);
- }
- } else {
- for (int i = fromVersion; i <= toVersion; ++i) {
- runMarshalerGenerateScript(jam, i);
- }
- }
+ Set<Class<?>> openWireTypes = GeneratorUtils.findOpenWireTypes();
+ for (Class<?> openWireType : openWireTypes) {
+ LOG.info("Found OpenWire Type: {}", openWireType.getSimpleName());
+ descriptors.add(new OpenWireTypeDescriptor(openWireType));
}
- if (generateTests) {
- if (!isRangedGenerate()) {
- runTestGenerateScript(jam, fromVersion);
- if (toVersion != fromVersion) {
- runTestGenerateScript(jam, toVersion);
- }
- } else {
- for (int i = fromVersion; i <= toVersion; ++i) {
- runTestGenerateScript(jam, i);
- }
- }
+ List<Generator> generators = getOpenWireGenerators();
+
+ for (Generator generator : generators) {
+ generator.setBaseDir(getBaseDir());
+
+ generator.run(descriptors);
}
-
- } catch (Exception e) {
- throw new BuildException(e);
+ } catch (Exception ex) {
+ throw new BuildException(ex);
+ } finally {
+ LOG.info("===========================================================");
}
}
- protected void runMarshalerGenerateScript(JamService jam, int version) throws Exception {
- System.out.println("======================================================");
- System.out.println(" Generating Marshallers for OpenWire version: " + version);
- System.out.println("======================================================");
- MarshallingGenerator script = new MarshallingGenerator();
- runScript(script, jam, version);
+ /**
+ * Returns the active generators to run with. Can be overridden by an extension.
+ *
+ * @return list of generators to use.
+ */
+ protected List<Generator> getOpenWireGenerators() {
+ return Generators.BUILTIN;
}
- protected void runTestGenerateScript(JamService jam, int version) throws Exception {
- System.out.println("======================================================");
- System.out.println(" Generating Test Cases for OpenWire version: " + version);
- System.out.println("======================================================");
- TestsGenerator script = new TestsGenerator();
- runScript(script, jam, version);
+ /**
+ * @return the baseDir
+ */
+ public String getBaseDir() {
+ return baseDir;
}
- protected void runScript(MultiSourceGenerator script, JamService jam, int version) throws Exception {
- script.setJam(jam);
- script.setTargetDir(targetDir.getCanonicalPath());
- script.setOpenwireVersion(version);
- if (commandsPackage != null) {
- script.setCommandsPackage(commandsPackage);
- }
- if (codecPackageRoot != null) {
- script.setCodecPackageRoot(codecPackageRoot);
- }
- script.run();
- }
-
- public int getFromVersion() {
- return fromVersion;
- }
-
- public void setFromVersion(int version) {
- this.fromVersion = version;
- }
-
- public int getToVersion() {
- return toVersion;
- }
-
- public void setToVersion(int version) {
- this.toVersion = version;
- }
-
- public File getSourceDir() {
- return sourceDir;
- }
-
- public void setSourceDir(File sourceDir) {
- this.sourceDir = sourceDir;
- }
-
- public File getTargetDir() {
- return targetDir;
- }
-
- public void setTargetDir(File targetDir) {
- this.targetDir = targetDir;
- }
-
- public boolean isGenerateMarshalers() {
- return generateMarshalers;
- }
-
- public void setGenerateMarshalers(boolean generateMarshalers) {
- this.generateMarshalers = generateMarshalers;
- }
-
- public boolean isGenerateTests() {
- return generateTests;
- }
-
- public void setGenerateTests(boolean generateTests) {
- this.generateTests = generateTests;
- }
-
- public boolean isRangedGenerate() {
- return this.rangedGenerate;
- }
-
- public void setRangedGenerate(boolean rangedGenerate) {
- this.rangedGenerate = rangedGenerate;
+ /**
+ * @param baseDir the baseDir to set
+ */
+ public void setBaseDir(String baseDir) {
+ this.baseDir = baseDir;
}
}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorUtils.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorUtils.java
new file mode 100644
index 0000000..0c27511
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/GeneratorUtils.java
@@ -0,0 +1,211 @@
+/*
+ * 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.generator;
+
+import static org.reflections.ReflectionUtils.getAllMethods;
+import static org.reflections.ReflectionUtils.withModifier;
+import static org.reflections.ReflectionUtils.withParametersCount;
+import static org.reflections.ReflectionUtils.withPrefix;
+
+import java.io.File;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Set;
+
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+import org.apache.activemq.openwire.annotations.OpenWireType;
+import org.reflections.ReflectionUtils;
+import org.reflections.Reflections;
+
+import com.google.common.base.Predicates;
+
+/**
+ * Collection of useful methods when generating OpenWire types.
+ */
+public class GeneratorUtils {
+
+ public static final String OPENWIRE_TYPES_PACKAGE = "org.apache.activemq.openwire.commands";
+ public static final Reflections REFLECTIONS = new Reflections(OPENWIRE_TYPES_PACKAGE);
+
+ /**
+ * Returns the set of OpenWire types annotated with the OpenWireType marker.
+ *
+ * @return a set of class objects representing all the annotated OpenWire types.
+ *
+ * @throws Exception if an error occurs reading the types.
+ */
+ public static Set<Class<?>> findOpenWireTypes() throws Exception {
+ final Reflections reflections = new Reflections(OPENWIRE_TYPES_PACKAGE);
+
+ final Set<Class<?>> protocolTypes =
+ reflections.getTypesAnnotatedWith(OpenWireType.class);
+
+ return protocolTypes;
+ }
+
+ /**
+ * Given an OpenWire protocol object, find and return all the fields in the object
+ * that are annotated with the OpenWireProperty marker.
+ *
+ * @param openWireType
+ * the OpenWire protocol object to query for property values.
+ *
+ * @return a {@code Set<Field>} containing the annotated properties from the given object.
+ *
+ * @throws Exception if an error occurs while scanning for properties.
+ */
+ public static Set<Field> finalOpenWireProperties(Class<?> openWireType) throws Exception {
+ @SuppressWarnings("unchecked")
+ final Set<Field> properties =
+ ReflectionUtils.getAllFields(openWireType, ReflectionUtils.withAnnotation(OpenWireProperty.class));
+
+ return properties;
+ }
+
+ /**
+ * Attempt to locate the get method for the given property contained in the target OpenWire
+ * type.
+ *
+ * @param openWireType
+ * The OpenWire type to search.
+ * @param property
+ * The property whose get method must be located.
+ *
+ * @return the name of the get method for the given property.
+ *
+ * @throws Exception if an error occurs finding the get method.
+ */
+ @SuppressWarnings("unchecked")
+ public static Method findGetMethodForProperty(Class<?> openWireType, OpenWirePropertyDescriptor property) throws Exception {
+
+ if (property.getType().equals(boolean.class)) {
+ Set<Method> getters = getAllMethods(openWireType,
+ Predicates.and(
+ withModifier(Modifier.PUBLIC),
+ withPrefix("is"),
+ withParametersCount(0)));
+
+ // Found an isX method, use that.
+ if (!getters.isEmpty()) {
+ for (Method method : getters) {
+ if (method.getName().equalsIgnoreCase("is" + property.getPropertyName())) {
+ return method;
+ }
+ }
+ }
+ }
+
+ Set<Method> getters = getAllMethods(openWireType,
+ Predicates.and(
+ withModifier(Modifier.PUBLIC),
+ withPrefix("get"),
+ withParametersCount(0)));
+
+ // Found an getX method, use that.
+ if (!getters.isEmpty()) {
+ for (Method method : getters) {
+ if (method.getName().equalsIgnoreCase("get" + property.getPropertyName())) {
+ return method;
+ }
+ }
+ }
+
+ throw new IllegalArgumentException("Property class has invalid bean method names.");
+ }
+
+ /**
+ * Attempt to locate the set method for the given property contained in the target OpenWire
+ * type.
+ *
+ * @param openWireType
+ * The OpenWire type to search.
+ * @param property
+ * The property whose set method must be located.
+ *
+ * @return the name of the set method for the given property.
+ *
+ * @throws Exception if an error occurs finding the set method.
+ */
+ @SuppressWarnings("unchecked")
+ public static Method findSetMethodForProperty(Class<?> openWireType, OpenWirePropertyDescriptor property) throws Exception {
+
+ Set<Method> setters = getAllMethods(openWireType,
+ Predicates.and(
+ withModifier(Modifier.PUBLIC),
+ withPrefix("set"),
+ withParametersCount(1)));
+
+ // Found an getX method, use that.
+ if (!setters.isEmpty()) {
+ for (Method method : setters) {
+ if (method.getName().equalsIgnoreCase("set" + property.getPropertyName())) {
+ return method;
+ }
+ }
+ }
+
+ throw new IllegalArgumentException("Property class has invalid bean method names.");
+ }
+
+ /**
+ * Construct a File instance that points to the targeted output folder
+ *
+ * @param base
+ * The base directory to start from.
+ * @param targetPackage
+ * The name of the java package where the generated code will go.
+ *
+ * @return a new File object that points to the output folder.
+ *
+ * @throws Exception if an error occurs.
+ */
+ public static File createDestination(String base, String targetPackage) throws Exception {
+ targetPackage = targetPackage.replace(".", File.separator);
+
+ final File outputFolder = new File(base, targetPackage);
+ if (!outputFolder.exists()) {
+ outputFolder.mkdirs();
+ }
+
+ return outputFolder;
+ }
+
+ /**
+ * Returns the capitalize version of the given string. If the string is empty, does
+ * not start with a letter, or is the first letter is already upper case then the
+ * original String is returned.
+ *
+ * @param value
+ * The String value to capitalize.
+ *
+ * @return the given value with the first letter capitalized.
+ */
+ public static String capitalize(final String value) {
+ if (value == null || value.isEmpty()) {
+ return value;
+ }
+
+ char entry = value.charAt(0);
+
+ if (!Character.isLetter(entry) || Character.isUpperCase(entry)) {
+ return value;
+ }
+
+ return Character.toUpperCase(entry) + value.substring(1);
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generators.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generators.java
new file mode 100644
index 0000000..83ef59a
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/Generators.java
@@ -0,0 +1,36 @@
+/*
+ * 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.generator;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.activemq.openwire.generator.builtin.UniversalMarshallerFactoryGenerator;
+import org.apache.activemq.openwire.generator.builtin.UniversalMarshallerGenerator;
+
+/**
+ * Directory of all generators in this library.
+ */
+public class Generators {
+
+ public static List<Generator> BUILTIN = new ArrayList<Generator>();
+
+ static {
+ BUILTIN.add(new UniversalMarshallerGenerator());
+ BUILTIN.add(new UniversalMarshallerFactoryGenerator());
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MarshallingGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MarshallingGenerator.java
deleted file mode 100644
index b03c603..0000000
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MarshallingGenerator.java
+++ /dev/null
@@ -1,712 +0,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.
- */
-package org.apache.activemq.openwire.generator;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JPackage;
-import org.codehaus.jam.JProperty;
-
-/**
- * Generates the binary marshalers for the OpenWire commands.
- */
-public class MarshallingGenerator extends MultiSourceGenerator {
-
- protected List<JClass> concreteClasses = new ArrayList<JClass>();
- protected File factoryFile;
- protected String factoryFileName = "MarshallerFactory";
- protected String indent = " ";
-
- private final String packagePrefixPath = codecPackageRoot.replace('.', '/');
-
- public MarshallingGenerator() {
- this.targetDir = "src/main/java";
- }
-
- @Override
- public Object run() {
- if (destDir == null) {
- destDir = new File(getTargetDir() + "/" + packagePrefixPath + "/v" + getOpenwireVersion());
- }
- Object answer = super.run();
- //processFactory();
- return answer;
- }
-
- @Override
- protected void generateFile(PrintWriter out) throws Exception {
-
- generateLicence(out);
- out.println("");
- out.println("package " + getCodecPackageRoot() + ".v" + getOpenwireVersion() + ";");
- out.println("");
- out.println("import java.io.DataInput;");
- out.println("import java.io.DataOutput;");
- out.println("import java.io.IOException;");
- out.println("");
- out.println("import " + getCodecPackageRoot() + ".*;");
- out.println("import " + getCommandsPackage() + ".*;");
- out.println("");
-
- for (JPackage pkg : getJclass().getImportedPackages()) {
- for (JClass clazz : pkg.getClasses()) {
- out.println("import " + clazz.getQualifiedName() + ";");
- }
- }
-
- out.println("");
- out.println("/**");
- out.println(" * Marshalling code for Open Wire for " + getClassName() + "");
- out.println(" *");
- out.println(" * NOTE!: This file is auto generated - do not modify!");
- out.println(" *");
- out.println(" */");
- out.println("public " + getAbstractClassText() + "class " + getClassName() + " extends " + getBaseClass() + " {");
- out.println("");
-
- if (!isAbstractClass()) {
-
- out.println(" /**");
- out.println(" * Return the type of Data Structure we marshal");
- out.println(" * @return short representation of the type data structure");
- out.println(" */");
- out.println(" public byte getDataStructureType() {");
- out.println(" return " + getJclass().getSimpleName() + ".DATA_STRUCTURE_TYPE;");
- out.println(" }");
- out.println(" ");
- out.println(" /**");
- out.println(" * @return a new object instance");
- out.println(" */");
- out.println(" public DataStructure createObject() {");
- out.println(" return new " + getJclass().getSimpleName() + "();");
- out.println(" }");
- out.println("");
- }
-
- out.println(" /**");
- out.println(" * Un-marshal an object instance from the data input stream");
- out.println(" *");
- out.println(" * @param o the object to un-marshal");
- out.println(" * @param dataIn the data input stream to build the object from");
- out.println(" * @throws IOException");
- out.println(" */");
- out.println(" public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {");
- out.println(" super.tightUnmarshal(wireFormat, o, dataIn, bs);");
-
- if (!getProperties().isEmpty()) {
- out.println("");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
- }
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.beforeUnmarshall(wireFormat);");
- out.println(" ");
- }
-
- generateTightUnmarshalBody(out);
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.afterUnmarshall(wireFormat);");
- }
-
- out.println("");
- out.println(" }");
- out.println("");
- out.println("");
- out.println(" /**");
- out.println(" * Write the booleans that this object uses to a BooleanStream");
- out.println(" */");
- out.println(" public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {");
-
- if (!getProperties().isEmpty()) {
- out.println("");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
- }
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.beforeMarshall(wireFormat);");
- }
-
- out.println("");
- out.println(" int rc = super.tightMarshal1(wireFormat, o, bs);");
- int baseSize = generateTightMarshal1Body(out);
-
- out.println("");
- out.println(" return rc + " + baseSize + ";");
- out.println(" }");
- out.println("");
- out.println(" /**");
- out.println(" * Write a object instance to data output stream");
- out.println(" *");
- out.println(" * @param o the instance to be marshaled");
- out.println(" * @param dataOut the output stream");
- out.println(" * @throws IOException thrown if an error occurs");
- out.println(" */");
- out.println(" public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {");
- out.println(" super.tightMarshal2(wireFormat, o, dataOut, bs);");
- if (!getProperties().isEmpty()) {
- out.println("");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
- }
-
- generateTightMarshal2Body(out);
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.afterMarshall(wireFormat);");
- }
-
- out.println("");
- out.println(" }");
- out.println("");
- out.println(" /**");
- out.println(" * Un-marshal an object instance from the data input stream");
- out.println(" *");
- out.println(" * @param o the object to un-marshal");
- out.println(" * @param dataIn the data input stream to build the object from");
- out.println(" * @throws IOException");
- out.println(" */");
- out.println(" public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {");
- out.println(" super.looseUnmarshal(wireFormat, o, dataIn);");
-
- if (!getProperties().isEmpty()) {
- out.println("");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
- }
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.beforeUnmarshall(wireFormat);");
- out.println(" ");
- }
-
- generateLooseUnmarshalBody(out);
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.afterUnmarshall(wireFormat);");
- }
-
- out.println("");
- out.println(" }");
- out.println("");
- out.println("");
- out.println(" /**");
- out.println(" * Write the booleans that this object uses to a BooleanStream");
- out.println(" */");
- out.println(" public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {");
-
- if (!getProperties().isEmpty()) {
- out.println("");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ")o;");
- }
-
- if (isMarshallerAware()) {
- out.println("");
- out.println(" info.beforeMarshall(wireFormat);");
- }
-
- out.println("");
- out.println(" super.looseMarshal(wireFormat, o, dataOut);");
-
- generateLooseMarshalBody(out);
-
- out.println("");
- out.println(" }");
- out.println("}");
- }
-
- private void generateLicence(PrintWriter out) {
- out.println("/**");
- out.println(" *");
- out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
- out.println(" * contributor license agreements. See the NOTICE file distributed with");
- out.println(" * this work for additional information regarding copyright ownership.");
- out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
- out.println(" * (the \"License\"); you may not use this file except in compliance with");
- out.println(" * the License. You may obtain a copy of the License at");
- out.println(" *");
- out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
- out.println(" *");
- out.println(" * Unless required by applicable law or agreed to in writing, software");
- out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
- out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
- out.println(" * See the License for the specific language governing permissions and");
- out.println(" * limitations under the License.");
- out.println(" */");
- }
-
- protected void processFactory() {
- if (factoryFile == null) {
- factoryFile = new File(destDir, factoryFileName + filePostFix);
- }
- PrintWriter out = null;
- try {
- out = new PrintWriter(new FileWriter(factoryFile));
- generateFactory(out);
- } catch (Exception e) {
- throw new RuntimeException(e);
- } finally {
- if (out != null) {
- out.close();
- }
- }
- }
-
- protected void generateFactory(PrintWriter out) {
- generateLicence(out);
- out.println("");
- out.println("package " + getCodecPackageRoot() + ".v" + getOpenwireVersion() + ";");
- out.println("");
- out.println("import " + getCodecPackageRoot() + ".DataStreamMarshaller;");
- out.println("import " + getCodecPackageRoot() + ".OpenWireFormat;");
- out.println("");
- out.println("/**");
- out.println(" * MarshallerFactory for Open Wire Format.");
- out.println(" *");
- out.println(" *");
- out.println(" * NOTE!: This file is auto generated - do not modify!");
- out.println(" * ");
- out.println(" */");
- out.println("public class MarshallerFactory {");
- out.println("");
- out.println(" /**");
- out.println(" * Creates a Map of command type -> Marshallers");
- out.println(" */");
- out.println(" static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];");
- out.println(" static {");
- out.println("");
-
- List<JClass> list = new ArrayList<JClass>(getConcreteClasses());
- Collections.sort(list, new Comparator<JClass>() {
- @Override
- public int compare(JClass o1, JClass o2) {
- return o1.getSimpleName().compareTo(o2.getSimpleName());
- }
- });
-
- for (Iterator<JClass> iter = list.iterator(); iter.hasNext();) {
- JClass jclass = iter.next();
- out.println(" add(new " + jclass.getSimpleName() + "Marshaller());");
- }
-
- out.println("");
- out.println(" }");
- out.println("");
- out.println(" static private void add(DataStreamMarshaller dsm) {");
- out.println(" marshaller[dsm.getDataStructureType()] = dsm;");
- out.println(" }");
- out.println(" ");
- out.println(" static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {");
- out.println(" return marshaller;");
- out.println(" }");
- out.println("}");
- }
-
- @Override
- protected void processClass(JClass jclass) {
- super.processClass(jclass);
-
- if (!jclass.isAbstract()) {
- concreteClasses.add(jclass);
- }
- }
-
- @Override
- protected String getClassName(JClass jclass) {
- return super.getClassName(jclass) + "Marshaller";
- }
-
- @Override
- protected String getBaseClassName(JClass jclass) {
- String answer = "BaseDataStreamMarshaller";
- JClass superclass = jclass.getSuperclass();
- if (superclass != null) {
- String superName = superclass.getSimpleName();
- if (!superName.equals("Object") && !superName.equals("JNDIBaseStorable") && !superName.equals("DataStructureSupport")) {
- answer = superName + "Marshaller";
- }
- }
- return answer;
- }
-
- @Override
- protected void initialiseManuallyMaintainedClasses() {
- }
-
- protected void generateTightUnmarshalBody(PrintWriter out) {
- for (JProperty property : getProperties()) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- JAnnotationValue size = annotation.getValue("size");
- JClass propertyType = property.getType();
- String propertyTypeName = propertyType.getSimpleName();
-
- if (propertyType.isArrayType() && !propertyTypeName.equals("byte[]")) {
- generateTightUnmarshalBodyForArrayProperty(out, property, size);
- } else {
- generateTightUnmarshalBodyForProperty(out, property, size);
- }
- }
- }
-
- protected void generateTightUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
- String setter = property.getSetter().getSimpleName();
- String type = property.getType().getSimpleName();
-
- if (type.equals("boolean")) {
- out.println(" info." + setter + "(bs.readBoolean());");
- } else if (type.equals("byte")) {
- out.println(" info." + setter + "(dataIn.readByte());");
- } else if (type.equals("char")) {
- out.println(" info." + setter + "(dataIn.readChar());");
- } else if (type.equals("short")) {
- out.println(" info." + setter + "(dataIn.readShort());");
- } else if (type.equals("int")) {
- out.println(" info." + setter + "(dataIn.readInt());");
- } else if (type.equals("long")) {
- out.println(" info." + setter + "(tightUnmarshalLong(wireFormat, dataIn, bs));");
- } else if (type.equals("String")) {
- out.println(" info." + setter + "(tightUnmarshalString(dataIn, bs));");
- } else if (type.equals("byte[]")) {
- if (size != null) {
- out.println(" info." + setter + "(tightUnmarshalConstByteArray(dataIn, bs, " + size.asInt() + "));");
- } else {
- out.println(" info." + setter + "(tightUnmarshalByteArray(dataIn, bs));");
- }
- } else if (type.equals("ByteSequence")) {
- out.println(" info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));");
- } else if (isThrowable(property.getType())) {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalThrowable(wireFormat, dataIn, bs));");
- } else if (isCachedProperty(property)) {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalCachedObject(wireFormat, dataIn, bs));");
- } else {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") tightUnmarsalNestedObject(wireFormat, dataIn, bs));");
- }
- }
-
- protected void generateTightUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
- JClass propertyType = property.getType();
- String arrayType = propertyType.getArrayComponentType().getQualifiedName();
- String setter = property.getSetter().getSimpleName();
- out.println();
- if (size != null) {
- out.println(" {");
- out.println(" " + arrayType + " value[] = new " + arrayType + "[" + size.asInt() + "];");
- out.println(" " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
- out.println(" value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
- out.println(" }");
- out.println(" info." + setter + "(value);");
- out.println(" }");
- } else {
- out.println(" if (bs.readBoolean()) {");
- out.println(" short size = dataIn.readShort();");
- out.println(" " + arrayType + " value[] = new " + arrayType + "[size];");
- out.println(" for( int i=0; i < size; i++ ) {");
- out.println(" value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
- out.println(" }");
- out.println(" info." + setter + "(value);");
- out.println(" }");
- out.println(" else {");
- out.println(" info." + setter + "(null);");
- out.println(" }");
- }
- }
-
- protected int generateTightMarshal1Body(PrintWriter out) {
- int baseSize = 0;
- for (JProperty property : getProperties()) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- JAnnotationValue size = annotation.getValue("size");
- JClass propertyType = property.getType();
- String type = propertyType.getSimpleName();
- String getter = "info." + property.getGetter().getSimpleName() + "()";
-
- if (type.equals("boolean")) {
- out.println(" bs.writeBoolean(" + getter + ");");
- } else if (type.equals("byte")) {
- baseSize += 1;
- } else if (type.equals("char")) {
- baseSize += 2;
- } else if (type.equals("short")) {
- baseSize += 2;
- } else if (type.equals("int")) {
- baseSize += 4;
- } else if (type.equals("long")) {
- out.println(" rc+=tightMarshalLong1(wireFormat, " + getter + ", bs);");
- } else if (type.equals("String")) {
- out.println(" rc += tightMarshalString1(" + getter + ", bs);");
- } else if (type.equals("byte[]")) {
- if (size == null) {
- out.println(" rc += tightMarshalByteArray1(" + getter + ", bs);");
- } else {
- out.println(" rc += tightMarshalConstByteArray1(" + getter + ", bs, " + size.asInt() + ");");
- }
- } else if (type.equals("ByteSequence")) {
- out.println(" rc += tightMarshalByteSequence1(" + getter + ", bs);");
- } else if (propertyType.isArrayType()) {
- if (size != null) {
- out.println(" rc += tightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size.asInt() + ");");
- } else {
- out.println(" rc += tightMarshalObjectArray1(wireFormat, " + getter + ", bs);");
- }
- } else if (isThrowable(propertyType)) {
- out.println(" rc += tightMarshalThrowable1(wireFormat, " + getter + ", bs);");
- } else {
- if (isCachedProperty(property)) {
- out.println(" rc += tightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
- } else {
- out.println(" rc += tightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
- }
- }
- }
- return baseSize;
- }
-
- protected void generateTightMarshal2Body(PrintWriter out) {
- for (JProperty property : getProperties()) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- JAnnotationValue size = annotation.getValue("size");
- JClass propertyType = property.getType();
- String type = propertyType.getSimpleName();
- String getter = "info." + property.getGetter().getSimpleName() + "()";
-
- if (type.equals("boolean")) {
- out.println(" bs.readBoolean();");
- } else if (type.equals("byte")) {
- out.println(" dataOut.writeByte(" + getter + ");");
- } else if (type.equals("char")) {
- out.println(" dataOut.writeChar(" + getter + ");");
- } else if (type.equals("short")) {
- out.println(" dataOut.writeShort(" + getter + ");");
- } else if (type.equals("int")) {
- out.println(" dataOut.writeInt(" + getter + ");");
- } else if (type.equals("long")) {
- out.println(" tightMarshalLong2(wireFormat, " + getter + ", dataOut, bs);");
- } else if (type.equals("String")) {
- out.println(" tightMarshalString2(" + getter + ", dataOut, bs);");
- } else if (type.equals("byte[]")) {
- if (size != null) {
- out.println(" tightMarshalConstByteArray2(" + getter + ", dataOut, bs, " + size.asInt() + ");");
- } else {
- out.println(" tightMarshalByteArray2(" + getter + ", dataOut, bs);");
- }
- } else if (type.equals("ByteSequence")) {
- out.println(" tightMarshalByteSequence2(" + getter + ", dataOut, bs);");
- } else if (propertyType.isArrayType()) {
- if (size != null) {
- out.println(" tightMarshalObjectArrayConstSize2(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
- } else {
- out.println(" tightMarshalObjectArray2(wireFormat, " + getter + ", dataOut, bs);");
- }
- } else if (isThrowable(propertyType)) {
- out.println(" tightMarshalThrowable2(wireFormat, " + getter + ", dataOut, bs);");
- } else {
- if (isCachedProperty(property)) {
- out.println(" tightMarshalCachedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
- } else {
- out.println(" tightMarshalNestedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
- }
- }
- }
- }
-
- protected void generateLooseMarshalBody(PrintWriter out) {
- for (JProperty property : getProperties()) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- JAnnotationValue size = annotation.getValue("size");
- JClass propertyType = property.getType();
- String type = propertyType.getSimpleName();
- String getter = "info." + property.getGetter().getSimpleName() + "()";
-
- if (type.equals("boolean")) {
- out.println(" dataOut.writeBoolean(" + getter + ");");
- } else if (type.equals("byte")) {
- out.println(" dataOut.writeByte(" + getter + ");");
- } else if (type.equals("char")) {
- out.println(" dataOut.writeChar(" + getter + ");");
- } else if (type.equals("short")) {
- out.println(" dataOut.writeShort(" + getter + ");");
- } else if (type.equals("int")) {
- out.println(" dataOut.writeInt(" + getter + ");");
- } else if (type.equals("long")) {
- out.println(" looseMarshalLong(wireFormat, " + getter + ", dataOut);");
- } else if (type.equals("String")) {
- out.println(" looseMarshalString(" + getter + ", dataOut);");
- } else if (type.equals("byte[]")) {
- if (size != null) {
- out.println(" looseMarshalConstByteArray(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
- } else {
- out.println(" looseMarshalByteArray(wireFormat, " + getter + ", dataOut);");
- }
- } else if (type.equals("ByteSequence")) {
- out.println(" looseMarshalByteSequence(wireFormat, " + getter + ", dataOut);");
- } else if (propertyType.isArrayType()) {
- if (size != null) {
- out.println(" looseMarshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, " + size.asInt() + ");");
- } else {
- out.println(" looseMarshalObjectArray(wireFormat, " + getter + ", dataOut);");
- }
- } else if (isThrowable(propertyType)) {
- out.println(" looseMarshalThrowable(wireFormat, " + getter + ", dataOut);");
- } else {
- if (isCachedProperty(property)) {
- out.println(" looseMarshalCachedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
- } else {
- out.println(" looseMarshalNestedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
- }
- }
- }
- }
-
- protected void generateLooseUnmarshalBody(PrintWriter out) {
- for (JProperty property : getProperties()) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- JAnnotationValue size = annotation.getValue("size");
- JClass propertyType = property.getType();
- String propertyTypeName = propertyType.getSimpleName();
-
- if (propertyType.isArrayType() && !propertyTypeName.equals("byte[]")) {
- generateLooseUnmarshalBodyForArrayProperty(out, property, size);
- } else {
- generateLooseUnmarshalBodyForProperty(out, property, size);
- }
- }
- }
-
- protected void generateLooseUnmarshalBodyForProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
- String setter = property.getSetter().getSimpleName();
- String type = property.getType().getSimpleName();
-
- if (type.equals("boolean")) {
- out.println(" info." + setter + "(dataIn.readBoolean());");
- } else if (type.equals("byte")) {
- out.println(" info." + setter + "(dataIn.readByte());");
- } else if (type.equals("char")) {
- out.println(" info." + setter + "(dataIn.readChar());");
- } else if (type.equals("short")) {
- out.println(" info." + setter + "(dataIn.readShort());");
- } else if (type.equals("int")) {
- out.println(" info." + setter + "(dataIn.readInt());");
- } else if (type.equals("long")) {
- out.println(" info." + setter + "(looseUnmarshalLong(wireFormat, dataIn));");
- } else if (type.equals("String")) {
- out.println(" info." + setter + "(looseUnmarshalString(dataIn));");
- } else if (type.equals("byte[]")) {
- if (size != null) {
- out.println(" info." + setter + "(looseUnmarshalConstByteArray(dataIn, " + size.asInt() + "));");
- } else {
- out.println(" info." + setter + "(looseUnmarshalByteArray(dataIn));");
- }
- } else if (type.equals("ByteSequence")) {
- out.println(" info." + setter + "(looseUnmarshalByteSequence(dataIn));");
- } else if (isThrowable(property.getType())) {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalThrowable(wireFormat, dataIn));");
- } else if (isCachedProperty(property)) {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalCachedObject(wireFormat, dataIn));");
- } else {
- out.println(" info." + setter + "((" + property.getType().getQualifiedName() + ") looseUnmarsalNestedObject(wireFormat, dataIn));");
- }
- }
-
- protected void generateLooseUnmarshalBodyForArrayProperty(PrintWriter out, JProperty property, JAnnotationValue size) {
- JClass propertyType = property.getType();
- String arrayType = propertyType.getArrayComponentType().getQualifiedName();
- String setter = property.getSetter().getSimpleName();
- out.println();
- if (size != null) {
- out.println(" {");
- out.println(" " + arrayType + " value[] = new " + arrayType + "[" + size.asInt() + "];");
- out.println(" " + "for( int i=0; i < " + size.asInt() + "; i++ ) {");
- out.println(" value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
- out.println(" }");
- out.println(" info." + setter + "(value);");
- out.println(" }");
- } else {
- out.println(" if (dataIn.readBoolean()) {");
- out.println(" short size = dataIn.readShort();");
- out.println(" " + arrayType + " value[] = new " + arrayType + "[size];");
- out.println(" for( int i=0; i < size; i++ ) {");
- out.println(" value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
- out.println(" }");
- out.println(" info." + setter + "(value);");
- out.println(" }");
- out.println(" else {");
- out.println(" info." + setter + "(null);");
- out.println(" }");
- }
- }
-
- /**
- * Returns whether or not the given annotation has a mandatory flag on it or
- * not
- */
- protected String getMandatoryFlag(JAnnotation annotation) {
- JAnnotationValue value = annotation.getValue("mandatory");
- if (value != null) {
- String text = value.asString();
- if (text != null && text.equalsIgnoreCase("true")) {
- return "true";
- }
- }
- return "false";
- }
-
- public List<JClass> getConcreteClasses() {
- return concreteClasses;
- }
-
- public void setConcreteClasses(List<JClass> concreteClasses) {
- this.concreteClasses = concreteClasses;
- }
-
- public File getFactoryFile() {
- return factoryFile;
- }
-
- public void setFactoryFile(File factoryFile) {
- this.factoryFile = factoryFile;
- }
-
- public String getFactoryFileName() {
- return factoryFileName;
- }
-
- public void setFactoryFileName(String factoryFileName) {
- this.factoryFileName = factoryFileName;
- }
-
- public String getIndent() {
- return indent;
- }
-
- public void setIndent(String indent) {
- this.indent = indent;
- }
-}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MultiSourceGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MultiSourceGenerator.java
deleted file mode 100644
index 1a0bcd3..0000000
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/MultiSourceGenerator.java
+++ /dev/null
@@ -1,265 +0,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.
- */
-package org.apache.activemq.openwire.generator;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.FixCRLF;
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-
-/**
- *
- */
-public abstract class MultiSourceGenerator extends OpenWireGenerator {
-
- protected Set<String> manuallyMaintainedClasses = new HashSet<String>();
- protected File destDir;
- protected File destFile;
-
- protected JClass jclass;
- protected JClass superclass;
- protected String simpleName;
- protected String className;
- protected String baseClass;
- protected StringBuffer buffer;
-
- protected String targetDir;
-
- public MultiSourceGenerator() {
- initialiseManuallyMaintainedClasses();
- }
-
- public Object run() {
- if (destDir == null) {
- throw new IllegalArgumentException("No destDir defined!");
- }
- System.out.println(getClass().getName() + " generating files in: " + destDir);
- destDir.mkdirs();
- buffer = new StringBuffer();
-
- JamClassIterator iter = getClasses();
- while (iter.hasNext()) {
- try {
- jclass = iter.nextClass();
- if (isValidClass(jclass)) {
- processClass(jclass);
- }
- } catch (Exception e) {
- System.err.println("Unable to process: " + jclass);
- e.printStackTrace();
- }
- }
- return null;
- }
-
- /**
- * Returns all the valid properties available on the current class
- */
- public List<JProperty> getProperties() {
- List<JProperty> answer = new ArrayList<JProperty>();
- JProperty[] properties = jclass.getDeclaredProperties();
- for (int i = 0; i < properties.length; i++) {
- JProperty property = properties[i];
- if (isValidProperty(property)) {
- answer.add(property);
- }
- }
- return answer;
- }
-
- protected boolean isValidClass(JClass jclass) {
- JAnnotation annotation = jclass.getAnnotation("openwire:marshaller");
- if (annotation == null) {
- return false;
- }
-
- if (!includeInThisVersion(annotation)) {
- return false;
- }
-
- return !manuallyMaintainedClasses.contains(jclass.getSimpleName());
- }
-
- protected void processClass(JClass jclass) {
- simpleName = jclass.getSimpleName();
- superclass = jclass.getSuperclass();
-
- System.out.println(getClass().getName() + " processing class: " + simpleName);
-
- className = getClassName(jclass);
- destFile = new File(destDir, className + filePostFix);
- baseClass = getBaseClassName(jclass);
-
- PrintWriter out = null;
- try {
- out = new PrintWriter(new FileWriter(destFile));
- generateFile(out);
- } catch (Exception e) {
- throw new RuntimeException(e);
- } finally {
- if (out != null) {
- out.close();
- }
- }
-
- // Use the FixCRLF Ant Task to make sure the file has consistent
- // newlines so that SVN does not complain on checkin.
- Project project = new Project();
- project.init();
- FixCRLF fixCRLF = new FixCRLF();
- fixCRLF.setProject(project);
- fixCRLF.setSrcdir(destFile.getParentFile());
- fixCRLF.setIncludes(destFile.getName());
- fixCRLF.execute();
- }
-
- protected abstract void generateFile(PrintWriter out) throws Exception;
-
- protected String getBaseClassName(JClass jclass) {
- String answer = "BaseDataStructure";
- if (superclass != null) {
- String name = superclass.getSimpleName();
- if (name != null && !name.equals("Object")) {
- answer = name;
- }
- }
- return answer;
- }
-
- protected String getClassName(JClass jclass) {
- return jclass.getSimpleName();
- }
-
- public boolean isAbstractClass() {
- return jclass != null && jclass.isAbstract();
- }
-
- public String getAbstractClassText() {
- return isAbstractClass() ? "abstract " : "";
- }
-
- public boolean isMarshallerAware() {
- return isMarshallAware(jclass);
- }
-
- protected void initialiseManuallyMaintainedClasses() {
- String[] names = {
- "OpenWireDestination",
- "OpenWireTempDestination",
- "OpenWireQueue",
- "OpenWireTopic",
- "OpenWireTempQueue",
- "OpenWireTempTopic",
- "OpenWireMessage",
- "OpenWireTextMessage",
- "OpenWireMapMessage",
- "OpenWireBytesMessage",
- "OpenWireStreamMessage",
- "OpenWireBlobMessage",
- "OpenWireObjectMessage",
- "BaseCommand",
- "DataStructureSupport",
- "WireFormatInfo"
- };
-
- for (int i = 0; i < names.length; i++) {
- manuallyMaintainedClasses.add(names[i]);
- }
- }
-
- public String getBaseClass() {
- return baseClass;
- }
-
- public void setBaseClass(String baseClass) {
- this.baseClass = baseClass;
- }
-
- public String getClassName() {
- return className;
- }
-
- public void setClassName(String className) {
- this.className = className;
- }
-
- public File getDestDir() {
- return destDir;
- }
-
- public void setDestDir(File destDir) {
- this.destDir = destDir;
- }
-
- public File getDestFile() {
- return destFile;
- }
-
- public void setDestFile(File destFile) {
- this.destFile = destFile;
- }
-
- public JClass getJclass() {
- return jclass;
- }
-
- public void setJclass(JClass jclass) {
- this.jclass = jclass;
- }
-
- public Set<String> getManuallyMaintainedClasses() {
- return manuallyMaintainedClasses;
- }
-
- public void setManuallyMaintainedClasses(Set<String> manuallyMaintainedClasses) {
- this.manuallyMaintainedClasses = manuallyMaintainedClasses;
- }
-
- public String getSimpleName() {
- return simpleName;
- }
-
- public void setSimpleName(String simpleName) {
- this.simpleName = simpleName;
- }
-
- public JClass getSuperclass() {
- return superclass;
- }
-
- public void setSuperclass(JClass superclass) {
- this.superclass = superclass;
- }
-
- public String getTargetDir() {
- return targetDir;
- }
-
- public void setTargetDir(String sourceDir) {
- this.targetDir = sourceDir;
- }
-}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireGenerator.java
deleted file mode 100644
index dfd9a61..0000000
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireGenerator.java
+++ /dev/null
@@ -1,178 +0,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.
- */
-package org.apache.activemq.openwire.generator;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JAnnotationValue;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JField;
-import org.codehaus.jam.JMethod;
-import org.codehaus.jam.JProperty;
-import org.codehaus.jam.JamClassIterator;
-import org.codehaus.jam.JamService;
-
-/**
- *
- */
-public abstract class OpenWireGenerator {
-
- protected int openwireVersion;
- protected String filePostFix = ".java";
- protected JamService jam;
-
- protected String commandsPackage = "org.apache.activemq.openwire.commands";
- protected String codecPackageRoot = "org.apache.activemq.openwire.codec";
-
- public boolean isValidProperty(JProperty it) {
- JMethod getter = it.getGetter();
- JMethod setter = it.getSetter();
-
- if (getter == null || setter == null || getter.isStatic()) {
- return false;
- }
-
- JAnnotation annotation = getter.getAnnotation("openwire:property");
- if (annotation == null) {
- return false;
- }
-
- return true;
- }
-
- public boolean includeInThisVersion(JAnnotation annotation) {
- JAnnotationValue value = annotation.getValue("version");
- if (value != null && value.asInt() <= getOpenwireVersion()) {
- return true;
- }
-
- return false;
- }
-
- public boolean isCachedProperty(JProperty it) {
- JMethod getter = it.getGetter();
- if (!isValidProperty(it)) {
- return false;
- }
- JAnnotationValue value = getter.getAnnotation("openwire:property").getValue("cache");
- return value != null && value.asBoolean();
- }
-
- public boolean isAbstract(JClass j) {
- JField[] fields = j.getFields();
- for (int i = 0; i < fields.length; i++) {
- JField field = fields[i];
- if (field.isStatic() && field.isPublic() && field.isFinal() && field.getSimpleName().equals("DATA_STRUCTURE_TYPE")) {
- return false;
- }
- }
- return true;
- }
-
- public boolean isThrowable(JClass j) {
- if (j.getQualifiedName().equals(Throwable.class.getName())) {
- return true;
- }
- return j.getSuperclass() != null && isThrowable(j.getSuperclass());
- }
-
- public boolean isMarshallAware(JClass j) {
- if (filePostFix.endsWith("java")) {
- JClass[] interfaces = j.getInterfaces();
- for (int i = 0; i < interfaces.length; i++) {
- if (interfaces[i].getQualifiedName().equals("org.apache.activemq.command.MarshallAware")) {
- return true;
- }
- }
- return false;
- } else {
- String simpleName = j.getSimpleName();
- return simpleName.equals("ActiveMQMessage") || simpleName.equals("WireFormatInfo");
- }
- }
-
- public JamService getJam() {
- return jam;
- }
-
- public JamClassIterator getClasses() {
- return getJam().getClasses();
- }
-
- public int getOpenwireVersion() {
- return openwireVersion;
- }
-
- public void setOpenwireVersion(int openwireVersion) {
- this.openwireVersion = openwireVersion;
- }
-
- public String getCommandsPackage() {
- return commandsPackage;
- }
-
- public void setCommandsPackage(String commandsPacakge) {
- this.commandsPackage = commandsPacakge;
- }
-
- public String getCodecPackageRoot() {
- return codecPackageRoot;
- }
-
- public void setCodecPackageRoot(String codecPackageRoot) {
- this.codecPackageRoot = codecPackageRoot;
- }
-
- public String getOpenWireOpCode(JClass element) {
- if (element != null) {
- JAnnotation annotation = element.getAnnotation("openwire:marshaller");
- return stringValue(annotation, "code", "0");
- }
- return "0";
- }
-
- protected String stringValue(JAnnotation annotation, String name) {
- return stringValue(annotation, name, null);
- }
-
- protected String stringValue(JAnnotation annotation, String name, String defaultValue) {
- if (annotation != null) {
- JAnnotationValue value = annotation.getValue(name);
- if (value != null) {
- return value.asString();
- }
- }
- return defaultValue;
- }
-
- public void setJam(JamService jam) {
- this.jam = jam;
- }
-
- public String decapitalize(String text) {
- if (text == null) {
- return null;
- }
- return text.substring(0, 1).toLowerCase() + text.substring(1);
- }
-
- public String capitalize(String text) {
- if (text == null) {
- return null;
- }
- return text.substring(0, 1).toUpperCase() + text.substring(1);
- }
-}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWirePropertyDescriptor.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWirePropertyDescriptor.java
new file mode 100644
index 0000000..24b6698
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWirePropertyDescriptor.java
@@ -0,0 +1,139 @@
+/*
+ if (getType().equals(boolean.class)) {
+ return "is" + capitalize(getPropertyName());
+ } else {
+ return "get" + capitalize(getPropertyName());
+ }
+ * 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.generator;
+
+import java.lang.reflect.Field;
+
+import org.apache.activemq.openwire.annotations.OpenWireProperty;
+
+/**
+ * Wraps a property of an OpenWire protocol type to provide support
+ * for generating code to handle that property.
+ */
+public class OpenWirePropertyDescriptor implements Comparable<OpenWirePropertyDescriptor> {
+
+ private final Class<?> openWireType;
+ private final Field openWireProperty;
+ private final OpenWireProperty propertyAnnotation;
+
+ private final String getterName;
+ private final String setterName;
+
+ public OpenWirePropertyDescriptor(Class<?> openWireType, Field openWireProperty) throws Exception {
+ this.openWireType = openWireType;
+ this.openWireProperty = openWireProperty;
+ this.propertyAnnotation = openWireProperty.getAnnotation(OpenWireProperty.class);
+
+ this.setterName = GeneratorUtils.findSetMethodForProperty(this.openWireType, this).getName();
+ this.getterName = GeneratorUtils.findGetMethodForProperty(this.openWireType, this).getName();
+ }
+
+ /**
+ * @return the declared name of this property.
+ */
+ public String getPropertyName() {
+ return openWireProperty.getName();
+ }
+
+ /**
+ * @return the first OpenWire version this property appeared in
+ */
+ public int getVersion() {
+ return propertyAnnotation.version();
+ }
+
+ /**
+ * @return the position in the marshaling process this type should occupy.
+ */
+ public int getMarshalingSequence() {
+ return propertyAnnotation.sequence();
+ }
+
+ /**
+ * @return the defined size attribute for this property.
+ */
+ public int getSize() {
+ return propertyAnnotation.size();
+ }
+
+ /**
+ * @return
+ */
+ public boolean isCached() {
+ return propertyAnnotation.cached();
+ }
+
+ /**
+ * @return true if the field is an array type.
+ */
+ public boolean isArray() {
+ return openWireProperty.getType().isArray();
+ }
+
+ /**
+ * @return true if this property is {@link Throwable} or a descendant of {@link Throwable}.
+ */
+ public boolean isThrowable() {
+ return isThrowable(getType());
+ }
+
+ /**
+ * @return the Class that represents this properties type.
+ */
+ public Class<?> getType() {
+ return openWireProperty.getType();
+ }
+
+ /**
+ * @return the name of this property
+ */
+ public String getTypeName() {
+ return openWireProperty.getType().getSimpleName();
+ }
+
+ /**
+ * @return the name of the set method in the OpenWireType that handles this property.
+ */
+ public String getSetterName() {
+ return setterName;
+ }
+
+ /**
+ * @return the name of the get method in the OpenWireType that handles this property.
+ */
+ public String getGetterName() {
+ return getterName;
+ }
+
+ private static boolean isThrowable(Class<?> type) {
+ if (type.getCanonicalName().equals(Throwable.class.getName())) {
+ return true;
+ }
+
+ return type.getSuperclass() != null && isThrowable(type.getSuperclass());
+ }
+
+ @Override
+ public int compareTo(OpenWirePropertyDescriptor other) {
+ return Integer.compare(getMarshalingSequence(), other.getMarshalingSequence());
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireTypeDescriptor.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireTypeDescriptor.java
new file mode 100644
index 0000000..d0c1352
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/OpenWireTypeDescriptor.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.openwire.generator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.activemq.openwire.annotations.OpenWireType;
+
+/**
+ * Wrapper used to describe all the elements of an OpenWire type.
+ */
+public class OpenWireTypeDescriptor {
+
+ private final Class<?> openWireType;
+ private final OpenWireType typeAnnotation;
+ private final List<OpenWirePropertyDescriptor> properties;
+
+ public OpenWireTypeDescriptor(Class<?> openWireType) throws Exception {
+ this.openWireType = openWireType;
+ this.typeAnnotation = openWireType.getAnnotation(OpenWireType.class);
+
+ List<OpenWirePropertyDescriptor> properties = new ArrayList<OpenWirePropertyDescriptor>();
+
+ Set<Field> fields = GeneratorUtils.finalOpenWireProperties(openWireType);
+ for (Field field : fields) {
+ // Only track fields from the given type and not its super types.
+ if (field.getDeclaringClass().equals(openWireType)) {
+ properties.add(new OpenWirePropertyDescriptor(openWireType, field));
+ }
+ }
+
+ // Ensure ordering my marshaler sequence.
+ Collections.sort(properties);
+
+ this.properties = Collections.unmodifiableList(properties);
+ }
+
+ /**
+ * @return the name of the OpenWire protocol type being wrapped.
+ */
+ public String getTypeName() {
+ return openWireType.getSimpleName();
+ }
+
+ /**
+ * @return the name of the package this type is contained in.
+ */
+ public String getPackageName() {
+ return openWireType.getPackage().getName();
+ }
+
+ /**
+ * @return the name of the super class of this object.
+ */
+ public String getSuperClass() {
+ Class<?> superClass = openWireType.getSuperclass();
+ if (superClass == null) {
+ superClass = Object.class;
+ }
+
+ return superClass.getSimpleName();
+ }
+
+ /**
+ * @return the first version this type was introduced in.
+ */
+ public int getVersion() {
+ return typeAnnotation.version();
+ }
+
+ /**
+ * @return true if the type requires awareness of the marshaling process.
+ */
+ public boolean isMarshalAware() {
+ return typeAnnotation.marshalAware();
+ }
+
+ /**
+ * @return the unique OpenWire type code of this instance.
+ */
+ public int getTypeCode() {
+ return typeAnnotation.typeCode();
+ }
+
+ /**
+ * @return true if the OpenWire type is an abstract base of other types.
+ */
+ public boolean isAbstract() {
+ return Modifier.isAbstract(openWireType.getModifiers());
+ }
+
+ /**
+ * @return true if this type has properties to marshal and unmarshal.
+ */
+ public boolean hasProperties() {
+ return !properties.isEmpty();
+ }
+
+ /**
+ * @return the properties of this described OpenWire type.
+ */
+ public List<OpenWirePropertyDescriptor> getProperties() {
+ return properties;
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestDataGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestDataGenerator.java
deleted file mode 100644
index 6951a91..0000000
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestDataGenerator.java
+++ /dev/null
@@ -1,66 +0,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.
- */
-package org.apache.activemq.openwire.generator;
-
-/**
- * A simple helper class to help auto-generate test data when code generating test cases
- *
- *
- */
-public class TestDataGenerator {
- private int stringCounter;
-
- private boolean boolCounter;
- private byte byteCounter;
- private char charCounter = 'a';
- private short shortCounter;
- private int intCounter;
- private long longCounter;
-
- public String createByte() {
- return "(byte) " + (++byteCounter);
- }
-
- public String createChar() {
- return "'" + (charCounter++) + "'";
- }
-
- public String createShort() {
- return "(short) " + (++shortCounter);
- }
-
- public int createInt() {
- return ++intCounter;
- }
-
- public long createLong() {
- return ++longCounter;
- }
-
- public String createString(String property) {
- return property + ":" + (++stringCounter);
- }
-
- public boolean createBool() {
- boolCounter = !boolCounter;
- return boolCounter;
- }
-
- public String createByteArray(String property) {
- return "\"" + createString(property) + "\".getBytes()";
- }
-}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestsGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestsGenerator.java
deleted file mode 100644
index 5e7e6f9..0000000
--- a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/TestsGenerator.java
+++ /dev/null
@@ -1,198 +0,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.
- */
-package org.apache.activemq.openwire.generator;
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.util.List;
-
-import org.codehaus.jam.JAnnotation;
-import org.codehaus.jam.JClass;
-import org.codehaus.jam.JPackage;
-import org.codehaus.jam.JProperty;
-
-/**
- * Generates the test classes for the OpenWire marshalers.
- */
-public class TestsGenerator extends MultiSourceGenerator {
-
- public TestsGenerator() {
- this.targetDir = "src/test/java";
- }
-
- @Override
- public Object run() {
- if (destDir == null) {
- destDir = new File(targetDir + "/io/openwire/codec/v" + getOpenwireVersion());
- }
- return super.run();
- }
-
- @Override
- protected String getClassName(JClass jclass) {
- if (isAbstract(jclass)) {
- return super.getClassName(jclass) + "TestSupport";
- } else {
- return super.getClassName(jclass) + "Test";
- }
- }
-
- @Override
- protected String getBaseClassName(JClass jclass) {
- String answer = "DataFileGeneratorTestSupport";
- if (superclass != null) {
- String name = superclass.getSimpleName();
- if (name != null && !name.equals("JNDIBaseStorable") && !name.equals("DataStructureSupport") && !name.equals("Object")) {
- answer = name + "Test";
- if (isAbstract(getJclass().getSuperclass())) {
- answer += "Support";
- }
- }
- }
- return answer;
- }
-
- private void generateLicence(PrintWriter out) {
- out.println("/**");
- out.println(" *");
- out.println(" * Licensed to the Apache Software Foundation (ASF) under one or more");
- out.println(" * contributor license agreements. See the NOTICE file distributed with");
- out.println(" * this work for additional information regarding copyright ownership.");
- out.println(" * The ASF licenses this file to You under the Apache License, Version 2.0");
- out.println(" * (the \"License\"); you may not use this file except in compliance with");
- out.println(" * the License. You may obtain a copy of the License at");
- out.println(" *");
- out.println(" * http://www.apache.org/licenses/LICENSE-2.0");
- out.println(" *");
- out.println(" * Unless required by applicable law or agreed to in writing, software");
- out.println(" * distributed under the License is distributed on an \"AS IS\" BASIS,");
- out.println(" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
- out.println(" * See the License for the specific language governing permissions and");
- out.println(" * limitations under the License.");
- out.println(" */");
- }
-
- @Override
- protected void generateFile(PrintWriter out) {
-
- generateLicence(out);
-
- out.println("package " + getCodecPackageRoot() + ".v" + openwireVersion + ";");
- out.println("");
- out.println("import java.io.DataInputStream;");
- out.println("import java.io.DataOutputStream;");
- out.println("import java.io.IOException;");
- out.println("");
- out.println("import " + getCodecPackageRoot() + ".*;");
- out.println("import " + getCommandsPackage() + ".*;");
- out.println("");
-
- for (JPackage pkg : getJclass().getImportedPackages()) {
- for (JClass clazz : pkg.getClasses()) {
- out.println("import " + clazz.getQualifiedName() + ";");
- }
- }
-
- out.println("");
- out.println("/**");
- out.println(" * Test case for the OpenWire marshalling for " + jclass.getSimpleName() + "");
- out.println(" *");
- out.println(" * NOTE!: This file is auto generated - do not modify!");
- out.println(" * ");
- out.println(" */");
- out.println("public " + getAbstractClassText() + "class " + className + " extends " + baseClass + " {");
- out.println("");
- if (!isAbstractClass()) {
- out.println("");
- out.println(" public static " + jclass.getSimpleName() + "Test SINGLETON = new " + jclass.getSimpleName() + "Test();");
- out.println("");
- out.println(" public Object createObject() throws Exception {");
- out.println(" " + jclass.getSimpleName() + " info = new " + jclass.getSimpleName() + "();");
- out.println(" populateObject(info);");
- out.println(" return info;");
- out.println(" }");
- }
- out.println("");
- out.println(" protected void populateObject(Object object) throws Exception {");
- out.println(" super.populateObject(object);");
- out.println(" " + getJclass().getSimpleName() + " info = (" + getJclass().getSimpleName() + ") object;");
- out.println("");
-
- TestDataGenerator generator = new TestDataGenerator();
-
- List<JProperty> properties = getProperties();
- for (JProperty property : properties) {
- JAnnotation annotation = property.getAnnotation("openwire:property");
- String size = stringValue(annotation, "size");
- String testSize = stringValue(annotation, "testSize");
- String type = property.getType().getSimpleName();
- String propertyName = property.getSimpleName();
- if ("-1".equals(testSize)) {
- continue;
- }
-
- String setterName = property.getSetter().getSimpleName();
-
- if (type.equals("boolean")) {
- out.println(" info." + setterName + "(" + generator.createBool() + ");");
- } else if (type.equals("byte")) {
- out.println(" info." + setterName + "(" + generator.createByte() + ");");
- } else if (type.equals("char")) {
- out.println(" info." + setterName + "(" + generator.createChar() + ");");
- } else if (type.equals("short")) {
- out.println(" info." + setterName + "(" + generator.createShort() + ");");
- } else if (type.equals("int")) {
- out.println(" info." + setterName + "(" + generator.createInt() + ");");
- } else if (type.equals("long")) {
- out.println(" info." + setterName + "(" + generator.createLong() + ");");
- } else if (type.equals("byte[]")) {
- out.println(" info." + setterName + "(" + generator.createByteArray(propertyName) + ");");
- } else if (type.equals("String")) {
- out.println(" info." + setterName + "(\"" + generator.createString(propertyName) + "\");");
- } else if (type.equals("ByteSequence")) {
- out.println(" {");
- out.println(" byte data[] = " + generator.createByteArray(propertyName) + ";");
- out.println(" info." + setterName + "(new org.apache.activemq.util.ByteSequence(data,0,data.length));");
- out.println("}");
- } else if (type.equals("Throwable")) {
- out.println(" info." + setterName + "(createThrowable(\"" + generator.createString(propertyName) + "\"));");
- } else {
- if (property.getType().isArrayType()) {
- String arrayType = property.getType().getArrayComponentType().getSimpleName();
- if (size == null) {
- size = "2";
- }
- if (arrayType == jclass.getSimpleName()) {
- size = "0";
- }
- out.println(" {");
- out.println(" " + arrayType + " value[] = new " + arrayType + "[" + size + "];");
- out.println(" for( int i=0; i < " + size + "; i++ ) {");
- out.println(" value[i] = create" + arrayType + "(\"" + generator.createString(propertyName) + "\");");
- out.println(" }");
- out.println(" info." + setterName + "(value);");
- out.println(" }");
- } else {
- out.println(" info." + setterName + "(create" + type + "(\"" + generator.createString(propertyName) + "\"));");
- }
- }
- }
-
- out.println(" }");
- out.println("}");
- }
-}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerFactoryGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerFactoryGenerator.java
new file mode 100644
index 0000000..591c9c3
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerFactoryGenerator.java
@@ -0,0 +1,147 @@
+/*
+ * 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.generator.builtin;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.apache.activemq.openwire.generator.AbstractGenerator;
+import org.apache.activemq.openwire.generator.GeneratorUtils;
+import org.apache.activemq.openwire.generator.OpenWireTypeDescriptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Generates a MarshallerFactory instance that can be used to create the
+ * codec configuration in the OpenWireFormat object.
+ */
+public class UniversalMarshallerFactoryGenerator extends AbstractGenerator {
+
+ private static final Logger LOG = LoggerFactory.getLogger(UniversalMarshallerFactoryGenerator.class);
+
+ private final String codecBase = "org.apache.activemq.openwire.codec";
+ private final String codecPackage = codecBase + ".universal";
+ private String factoryFileName = "MarshallerFactory";
+
+ @Override
+ public void run(List<OpenWireTypeDescriptor> typeDescriptors) throws Exception {
+ final File outputFolder = GeneratorUtils.createDestination(getBaseDir(), codecPackage);
+ LOG.info("Output location for generated marshaler factory is: {}", outputFolder.getAbsolutePath());
+
+ final File factoryFile = new File(outputFolder, getFactoryFileName() + ".java");
+ LOG.debug("Generating marshaller Factory: {}", factoryFile);
+
+ try (PrintWriter out = new PrintWriter(new FileWriter(factoryFile));) {
+ writeApacheLicense(out);
+ writePreamble(out);
+ writeClassDefinition(out);
+ writeFactoryImplementation(out, typeDescriptors);
+ writeClassClosure(out);
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ //----- Factory creation methods -----------------------------------------//
+
+ private void writePreamble(PrintWriter out) {
+ out.println("package " + getCodecPackage() + ";");
+ out.println("");
+ out.println("import " + getCodecPackageBase() + ".DataStreamMarshaller;");
+ out.println("import " + getCodecPackageBase() + ".OpenWireFormat;");
+ out.println("");
+ }
+
+ private void writeClassDefinition(PrintWriter out) {
+
+ out.println("/**");
+ out.println(" * Marshalling Factory for the Universal OpenWire Codec package.");
+ out.println(" *");
+ out.println(" * NOTE!: This file is auto generated - do not modify!");
+ out.println(" *");
+ out.println(" */");
+ out.println("public class " + getFactoryFileName() + "{");
+ out.println("");
+ }
+
+ private void writeFactoryImplementation(PrintWriter out, List<OpenWireTypeDescriptor> typeDescriptors) {
+
+ out.println(" /**");
+ out.println(" * Creates a Map of command type -> Marshallers");
+ out.println(" */");
+ out.println(" static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256];");
+ out.println(" static {");
+ out.println("");
+
+ List<OpenWireTypeDescriptor> sorted = new ArrayList<OpenWireTypeDescriptor>(typeDescriptors);
+ Collections.sort(sorted, new Comparator<OpenWireTypeDescriptor>() {
+ @Override
+ public int compare(OpenWireTypeDescriptor o1, OpenWireTypeDescriptor o2) {
+ return o1.getTypeName().compareTo(o2.getTypeName());
+ }
+ });
+
+ for (final OpenWireTypeDescriptor openWireType : sorted) {
+ if (!openWireType.isAbstract()) {
+ out.println(" add(new " + openWireType.getTypeName() + "Marshaller());");
+ }
+ }
+
+ out.println(" }");
+ out.println("");
+ out.println(" static private void add(DataStreamMarshaller dsm) {");
+ out.println(" marshaller[dsm.getDataStructureType()] = dsm;");
+ out.println(" }");
+ out.println("");
+ out.println(" static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) {");
+ out.println(" return marshaller;");
+ out.println(" }");
+ }
+
+ private void writeClassClosure(PrintWriter out) {
+ out.println("}");
+ }
+
+ //----- Public Property access methods -----------------------------------//
+
+ /**
+ * @return the base codec package name where the OpenWire marshalers support code lives.
+ */
+ public String getCodecPackageBase() {
+ return codecBase;
+ }
+
+ /**
+ * @return the package name where the OpenWire marshalers are written.
+ */
+ public String getCodecPackage() {
+ return codecPackage;
+ }
+
+ public String getFactoryFileName() {
+ return factoryFileName;
+ }
+
+ public void setFactoryFileName(String factoryFileName) {
+ this.factoryFileName = factoryFileName;
+ }
+}
diff --git a/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerGenerator.java b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerGenerator.java
new file mode 100644
index 0000000..2d0bec4
--- /dev/null
+++ b/openwire-generator/src/main/java/org/apache/activemq/openwire/generator/builtin/UniversalMarshallerGenerator.java
@@ -0,0 +1,660 @@
+/*
+ * 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.generator.builtin;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.activemq.openwire.generator.AbstractGenerator;
+import org.apache.activemq.openwire.generator.GeneratorUtils;
+import org.apache.activemq.openwire.generator.OpenWirePropertyDescriptor;
+import org.apache.activemq.openwire.generator.OpenWireTypeDescriptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Generator that create a set of OpenWire command marshalers that can
+ * handle all OpenWire versions.
+ */
+public class UniversalMarshallerGenerator extends AbstractGenerator {
+
+ private static final Logger LOG = LoggerFactory.getLogger(UniversalMarshallerGenerator.class);
+
+ private final String codecBase = "org.apache.activemq.openwire.codec";
+ private final String codecPackage = codecBase + ".universal";
+
+ @Override
+ public void run(List<OpenWireTypeDescriptor> typeDescriptors) throws Exception {
+ final File outputFolder = GeneratorUtils.createDestination(getBaseDir(), codecPackage);
+ LOG.info("Output location for generated marshalers is: {}", outputFolder.getAbsolutePath());
+
+ for (final OpenWireTypeDescriptor openWireType : typeDescriptors) {
+ LOG.debug("Generating marshaller for type: {}", openWireType.getTypeName());
+ processClass(openWireType, outputFolder);
+ }
+ }
+
+ /**
+ * @return the base codec package name where the OpenWire marshalers support code lives.
+ */
+ public String getCodecPackageBase() {
+ return codecBase;
+ }
+
+ /**
+ * @return the package name where the OpenWire marshalers are written.
+ */
+ public String getCodecPackage() {
+ return codecPackage;
+ }
+
+ //----- Implementation ---------------------------------------------------//
+
+ protected void processClass(OpenWireTypeDescriptor openWireType, File outputFolder) throws Exception {
+ final File marshalerFile = new File(outputFolder, getClassName(openWireType) + ".java");
+
+ try (PrintWriter out = new PrintWriter(new FileWriter(marshalerFile));) {
+ LOG.debug("Output file: {}", marshalerFile.getAbsolutePath());
+ writeApacheLicense(out);
+ writePreamble(out, openWireType);
+ writeClassDefinition(out, openWireType);
+ writeTypeSupportMethods(out, openWireType);
+
+ writeTightUnmarshal(out, openWireType);
+ writeTightMarshal1(out, openWireType);
+ writeTightMarshal2(out, openWireType);
+
+ writeLooseMarshal(out, openWireType);
+ writeLooseUnmarshal(out, openWireType);
+
+ writeClassClosure(out, openWireType);
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private void writePreamble(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println("package " + getCodecPackage() + ";");
+ out.println("");
+
+ Set<String> languageTypes = new HashSet<String>();
+
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final Class<?> type = property.getType();
+ if (type.getCanonicalName().startsWith("java.util")) {
+ languageTypes.add(type.getCanonicalName());
+ } else if (type.getCanonicalName().startsWith("org.fusesource.")) {
+ languageTypes.add(type.getCanonicalName());
+ }
+ }
+
+ for (String languageType : languageTypes) {
+ out.println("import " + languageType + ";");
+ }
+ out.println("import java.io.DataInput;");
+ out.println("import java.io.DataOutput;");
+ out.println("import java.io.IOException;");
+ out.println("");
+ out.println("import " + getCodecPackageBase() + ".*;");
+ out.println("import " + openWireType.getPackageName() + ".*;");
+ out.println("");
+ }
+
+ private void writeClassDefinition(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ final String abstractModifier = openWireType.isAbstract() ? "abstract " : "";
+ final String className = getClassName(openWireType);
+ final String baseClassName = getBaseClassName(openWireType);
+
+ out.println("/**");
+ out.println(" * Marshalling code for Open Wire for " + openWireType.getTypeName() + "");
+ out.println(" *");
+ out.println(" * NOTE!: This file is auto generated - do not modify!");
+ out.println(" *");
+ out.println(" */");
+ out.println("public " + abstractModifier + "class " + className + " extends " + baseClassName + " {");
+ out.println("");
+ }
+
+ private void writeTypeSupportMethods(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ if (!openWireType.isAbstract()) {
+ out.println(" /**");
+ out.println(" * Return the type of Data Structure handled by this Marshaler");
+ out.println(" *");
+ out.println(" * @return short representation of the type data structure");
+ out.println(" */");
+ out.println(" public byte getDataStructureType() {");
+ out.println(" return " + openWireType.getTypeName() + ".DATA_STRUCTURE_TYPE;");
+ out.println(" }");
+ out.println(" ");
+ out.println(" /**");
+ out.println(" * @return a new instance of the managed type.");
+ out.println(" */");
+ out.println(" public DataStructure createObject() {");
+ out.println(" return new " + openWireType.getTypeName() + "();");
+ out.println(" }");
+ out.println("");
+ }
+ }
+
+ private void writeTightUnmarshal(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println(" /**");
+ out.println(" * Un-marshal an object instance from the data input stream");
+ out.println(" *");
+ out.println(" * @param wireFormat the OpenWireFormat instance to use");
+ out.println(" * @param target the object to un-marshal");
+ out.println(" * @param dataIn the data input stream to build the object from");
+ out.println(" * @param bs the boolean stream where the type's booleans were marshaled");
+ out.println(" *");
+ out.println(" * @throws IOException if an error occurs while reading the data");
+ out.println(" */");
+ out.println(" public void tightUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn, BooleanStream bs) throws IOException {");
+ out.println(" super.tightUnmarshal(wireFormat, target, dataIn, bs);");
+
+ if (openWireType.hasProperties()) {
+ out.println("");
+ out.println(" " + openWireType.getTypeName() + " info = (" + openWireType.getTypeName() + ") target;");
+ if (isOpenWireVersionNeeded(openWireType)) {
+ out.println(" int version = wireFormat.getVersion();");
+ }
+ out.println("");
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println(" info.beforeUnmarshall(wireFormat);");
+ }
+
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final int size = property.getSize();
+ final String typeName = property.getTypeName();
+ final String setter = property.getSetterName();
+
+ String indent = " ";
+ if (property.getVersion() > 1) {
+ indent = indent + " ";
+ out.println(" if (version >= " + property.getVersion() + ") {");
+ }
+
+ if (property.isArray() && !typeName.equals("byte[]")) {
+ final String arrayType = property.getType().getComponentType().getSimpleName();
+
+ if (size > 0) {
+ out.println(indent + "{");
+ out.println(indent + " " + arrayType + " value[] = new " + arrayType + "[" + size + "];");
+ out.println(indent + " " + "for (int i = 0; i < " + size + "; i++) {");
+ out.println(indent + " value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
+ out.println(indent + " }");
+ out.println(indent + " info." + setter + "(value);");
+ out.println(indent + "}");
+ } else {
+ out.println(indent + "if (bs.readBoolean()) {");
+ out.println(indent + " short size = dataIn.readShort();");
+ out.println(indent + " " + arrayType + " value[] = new " + arrayType + "[size];");
+ out.println(indent + " for (int i = 0; i < size; i++) {");
+ out.println(indent + " value[i] = (" + arrayType + ") tightUnmarsalNestedObject(wireFormat,dataIn, bs);");
+ out.println(indent + " }");
+ out.println(indent + " info." + setter + "(value);");
+ out.println(indent + "} else {");
+ out.println(indent + " info." + setter + "(null);");
+ out.println(indent + "}");
+ }
+ } else {
+ if (typeName.equals("boolean")) {
+ out.println(indent + "info." + setter + "(bs.readBoolean());");
+ } else if (typeName.equals("byte")) {
+ out.println(indent + "info." + setter + "(dataIn.readByte());");
+ } else if (typeName.equals("char")) {
+ out.println(indent + "info." + setter + "(dataIn.readChar());");
+ } else if (typeName.equals("short")) {
+ out.println(indent + "info." + setter + "(dataIn.readShort());");
+ } else if (typeName.equals("int")) {
+ out.println(indent + "info." + setter + "(dataIn.readInt());");
+ } else if (typeName.equals("long")) {
+ out.println(indent + "info." + setter + "(tightUnmarshalLong(wireFormat, dataIn, bs));");
+ } else if (typeName.equals("String")) {
+ out.println(indent + "info." + setter + "(tightUnmarshalString(dataIn, bs));");
+ } else if (typeName.equals("byte[]")) {
+ if (size >= 0) {
+ out.println(indent + "info." + setter + "(tightUnmarshalConstByteArray(dataIn, bs, " + size + "));");
+ } else {
+ out.println(indent + "info." + setter + "(tightUnmarshalByteArray(dataIn, bs));");
+ }
+ } else if (typeName.equals("Buffer")) {
+ out.println(indent + "info." + setter + "(tightUnmarshalByteSequence(dataIn, bs));");
+ } else if (property.isThrowable()) {
+ out.println(indent + "info." + setter + "((" + property.getTypeName() + ") tightUnmarsalThrowable(wireFormat, dataIn, bs));");
+ } else if (property.isCached()) {
+ out.println(indent + "info." + setter + "((" + property.getTypeName() + ") tightUnmarsalCachedObject(wireFormat, dataIn, bs));");
+ } else {
+ out.println(indent + "info." + setter + "((" + property.getTypeName() + ") tightUnmarsalNestedObject(wireFormat, dataIn, bs));");
+ }
+ }
+
+ if (property.getVersion() > 1) {
+ out.println(" }");
+ }
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println("");
+ out.println(" info.afterUnmarshall(wireFormat);");
+ }
+
+ out.println(" }");
+ out.println("");
+ }
+
+ private void writeTightMarshal1(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println(" /**");
+ out.println(" * Write the booleans that this object uses to a BooleanStream");
+ out.println(" *");
+ out.println(" * @param wireFormat the OpenWireFormat instance to use");
+ out.println(" * @param source the object to marshal");
+ out.println(" * @param bs the boolean stream where the type's booleans are written");
+ out.println(" *");
+ out.println(" * @throws IOException if an error occurs while writing the data");
+ out.println(" */");
+ out.println(" public int tightMarshal1(OpenWireFormat wireFormat, Object source, BooleanStream bs) throws IOException {");
+
+ if (openWireType.hasProperties()) {
+ out.println(" " + openWireType.getTypeName() + " info = (" + openWireType.getTypeName() + ") source;");
+ if (isOpenWireVersionNeeded(openWireType)) {
+ out.println(" int version = wireFormat.getVersion();");
+ }
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println("");
+ out.println(" info.beforeMarshall(wireFormat);");
+ }
+
+ out.println("");
+ out.println(" int rc = super.tightMarshal1(wireFormat, source, bs);");
+
+ int baseSize = 0;
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final int size = property.getSize();
+ final String typeName = property.getTypeName();
+ final String getter = "info." + property.getGetterName() + "()";
+
+ String indent = " ";
+ if (property.getVersion() > 1) {
+ indent = indent + " ";
+ out.println(" if (version >= " + property.getVersion() + ") {");
+ }
+
+ if (typeName.equals("boolean")) {
+ out.println(indent + "bs.writeBoolean(" + getter + ");");
+ } else if (typeName.equals("byte")) {
+ baseSize += 1;
+ } else if (typeName.equals("char")) {
+ baseSize += 2;
+ } else if (typeName.equals("short")) {
+ baseSize += 2;
+ } else if (typeName.equals("int")) {
+ baseSize += 4;
+ } else if (typeName.equals("long")) {
+ out.println(indent + "rc += tightMarshalLong1(wireFormat, " + getter + ", bs);");
+ } else if (typeName.equals("String")) {
+ out.println(indent + "rc += tightMarshalString1(" + getter + ", bs);");
+ } else if (typeName.equals("byte[]")) {
+ if (size > 0) {
+ out.println(indent + "rc += tightMarshalConstByteArray1(" + getter + ", bs, " + size + ");");
+ } else {
+ out.println(indent + "rc += tightMarshalByteArray1(" + getter + ", bs);");
+ }
+ } else if (typeName.equals("Buffer")) {
+ out.println(indent + "rc += tightMarshalByteSequence1(" + getter + ", bs);");
+ } else if (property.isArray()) {
+ if (size > 0) {
+ out.println(indent + "rc += tightMarshalObjectArrayConstSize1(wireFormat, " + getter + ", bs, " + size + ");");
+ } else {
+ out.println(indent + "rc += tightMarshalObjectArray1(wireFormat, " + getter + ", bs);");
+ }
+ } else if (property.isThrowable()) {
+ out.println(indent + "rc += tightMarshalThrowable1(wireFormat, " + getter + ", bs);");
+ } else {
+ if (property.isCached()) {
+ out.println(indent + "rc += tightMarshalCachedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
+ } else {
+ out.println(indent + "rc += tightMarshalNestedObject1(wireFormat, (DataStructure)" + getter + ", bs);");
+ }
+ }
+
+ if (property.getVersion() > 1) {
+ out.println(" }");
+ }
+ }
+
+ out.println("");
+ out.println(" return rc + " + baseSize + ";");
+ out.println(" }");
+ out.println("");
+ }
+
+ private void writeTightMarshal2(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println(" /**");
+ out.println(" * Write a object instance to data output stream");
+ out.println(" *");
+ out.println(" * @param wireFormat the OpenWireFormat instance to use");
+ out.println(" * @param source the object to marshal");
+ out.println(" * @param dataOut the DataOut where the properties are written");
+ out.println(" * @param bs the boolean stream where the type's booleans are written");
+ out.println(" *");
+ out.println(" * @throws IOException if an error occurs while writing the data");
+ out.println(" */");
+ out.println(" public void tightMarshal2(OpenWireFormat wireFormat, Object source, DataOutput dataOut, BooleanStream bs) throws IOException {");
+ out.println(" super.tightMarshal2(wireFormat, source, dataOut, bs);");
+
+ if (openWireType.hasProperties()) {
+ out.println("");
+ out.println(" " + openWireType.getTypeName() + " info = (" + openWireType.getTypeName() + ") source;");
+ if (isOpenWireVersionNeeded(openWireType)) {
+ out.println(" int version = wireFormat.getVersion();");
+ }
+ out.println("");
+ }
+
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final int size = property.getSize();
+ final String typeName = property.getTypeName();
+ final String getter = "info." + property.getGetterName() + "()";
+
+ String indent = " ";
+ if (property.getVersion() > 1) {
+ indent = indent + " ";
+ out.println(" if (version >= " + property.getVersion() + ") {");
+ }
+
+ if (typeName.equals("boolean")) {
+ out.println(indent + "bs.readBoolean();");
+ } else if (typeName.equals("byte")) {
+ out.println(indent + "dataOut.writeByte(" + getter + ");");
+ } else if (typeName.equals("char")) {
+ out.println(indent + "dataOut.writeChar(" + getter + ");");
+ } else if (typeName.equals("short")) {
+ out.println(indent + "dataOut.writeShort(" + getter + ");");
+ } else if (typeName.equals("int")) {
+ out.println(indent + "dataOut.writeInt(" + getter + ");");
+ } else if (typeName.equals("long")) {
+ out.println(indent + "tightMarshalLong2(wireFormat, " + getter + ", dataOut, bs);");
+ } else if (typeName.equals("String")) {
+ out.println(indent + "tightMarshalString2(" + getter + ", dataOut, bs);");
+ } else if (typeName.equals("byte[]")) {
+ if (size > 0) {
+ out.println(indent + "tightMarshalConstByteArray2(" + getter + ", dataOut, bs, " + size + ");");
+ } else {
+ out.println(indent + "tightMarshalByteArray2(" + getter + ", dataOut, bs);");
+ }
+ } else if (typeName.equals("Buffer")) {
+ out.println(indent + "tightMarshalByteSequence2(" + getter + ", dataOut, bs);");
+ } else if (property.isArray()) {
+ if (size > 0) {
+ out.println(indent + "tightMarshalObjectArrayConstSize2(wireFormat, " + getter + ", dataOut, bs, " + size + ");");
+ } else {
+ out.println(indent + "tightMarshalObjectArray2(wireFormat, " + getter + ", dataOut, bs);");
+ }
+ } else if (property.isThrowable()) {
+ out.println(indent + "tightMarshalThrowable2(wireFormat, " + getter + ", dataOut, bs);");
+ } else {
+ if (property.isCached()) {
+ out.println(indent + "tightMarshalCachedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
+ } else {
+ out.println(indent + "tightMarshalNestedObject2(wireFormat, (DataStructure)" + getter + ", dataOut, bs);");
+ }
+ }
+
+ if (property.getVersion() > 1) {
+ out.println(" }");
+ }
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println("");
+ out.println(" info.afterMarshall(wireFormat);");
+ }
+
+ out.println(" }");
+ out.println("");
+ }
+
+ private void writeLooseUnmarshal(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println(" /**");
+ out.println(" * Un-marshal an object instance from the data input stream");
+ out.println(" *");
+ out.println(" * @param target the object to un-marshal");
+ out.println(" * @param dataIn the data input stream to build the object from");
+ out.println(" *");
+ out.println(" * @throws IOException if an error occurs while writing the data");
+ out.println(" */");
+ out.println(" public void looseUnmarshal(OpenWireFormat wireFormat, Object target, DataInput dataIn) throws IOException {");
+ out.println(" super.looseUnmarshal(wireFormat, target, dataIn);");
+
+ if (openWireType.hasProperties()) {
+ out.println("");
+ out.println(" " + openWireType.getTypeName() + " info = (" + openWireType.getTypeName() + ") target;");
+ if (isOpenWireVersionNeeded(openWireType)) {
+ out.println(" int version = wireFormat.getVersion();");
+ }
+ out.println("");
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println(" info.beforeUnmarshall(wireFormat);");
+ }
+
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final int size = property.getSize();
+ final String typeName = property.getTypeName();
+ final String setter = property.getSetterName();
+
+ String indent = " ";
+ if (property.getVersion() > 1) {
+ indent = indent + " ";
+ out.println(" if (version >= " + property.getVersion() + ") {");
+ }
+
+ if (property.isArray() && !typeName.equals("byte[]")) {
+ final String arrayType = property.getType().getComponentType().getSimpleName();
+
+ if (size > 0) {
+ out.println(indent + "{");
+ out.println(indent + " " + arrayType + " value[] = new " + arrayType + "[" + size + "];");
+ out.println(indent + " " + "for (int i = 0; i < " + size + "; i++) {");
+ out.println(indent + " value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
+ out.println(indent + " }");
+ out.println(indent + " info." + setter + "(value);");
+ out.println(indent + "}");
+ } else {
+ out.println(indent + "if (dataIn.readBoolean()) {");
+ out.println(indent + " short size = dataIn.readShort();");
+ out.println(indent + " " + arrayType + " value[] = new " + arrayType + "[size];");
+ out.println(indent + " for (int i = 0; i < size; i++) {");
+ out.println(indent + " value[i] = (" + arrayType + ") looseUnmarsalNestedObject(wireFormat,dataIn);");
+ out.println(indent + " }");
+ out.println(indent + " info." + setter + "(value);");
+ out.println(indent + "} else {");
+ out.println(indent + " info." + setter + "(null);");
+ out.println(indent + "}");
+ }
+ } else {
+ if (typeName.equals("boolean")) {
+ out.println(indent + "info." + setter + "(dataIn.readBoolean());");
+ } else if (typeName.equals("byte")) {
+ out.println(indent + "info." + setter + "(dataIn.readByte());");
+ } else if (typeName.equals("char")) {
+ out.println(indent + "info." + setter + "(dataIn.readChar());");
+ } else if (typeName.equals("short")) {
+ out.println(indent + "info." + setter + "(dataIn.readShort());");
+ } else if (typeName.equals("int")) {
+ out.println(indent + "info." + setter + "(dataIn.readInt());");
+ } else if (typeName.equals("long")) {
+ out.println(indent + "info." + setter + "(looseUnmarshalLong(wireFormat, dataIn));");
+ } else if (typeName.equals("String")) {
+ out.println(indent + "info." + setter + "(looseUnmarshalString(dataIn));");
+ } else if (typeName.equals("byte[]")) {
+ if (size > 0) {
+ out.println(indent + "info." + setter + "(looseUnmarshalConstByteArray(dataIn, " + size + "));");
+ } else {
+ out.println(indent + "info." + setter + "(looseUnmarshalByteArray(dataIn));");
+ }
+ } else if (typeName.equals("Buffer")) {
+ out.println(indent + "info." + setter + "(looseUnmarshalByteSequence(dataIn));");
+ } else if (property.isThrowable()) {
+ out.println(indent + "info." + setter + "((" + typeName + ") looseUnmarsalThrowable(wireFormat, dataIn));");
+ } else if (property.isCached()) {
+ out.println(indent + "info." + setter + "((" + typeName + ") looseUnmarsalCachedObject(wireFormat, dataIn));");
+ } else {
+ out.println(indent + "info." + setter + "((" + typeName + ") looseUnmarsalNestedObject(wireFormat, dataIn));");
+ }
+ }
+
+ if (property.getVersion() > 1) {
+ out.println(" }");
+ }
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println("");
+ out.println(" info.afterUnmarshall(wireFormat);");
+ }
+
+ out.println(" }");
+ }
+
+ private void writeLooseMarshal(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println(" /**");
+ out.println(" * Write the object to the output using loose marshaling.");
+ out.println(" *");
+ out.println(" * @throws IOException if an error occurs while writing the data");
+ out.println(" */");
+ out.println(" public void looseMarshal(OpenWireFormat wireFormat, Object source, DataOutput dataOut) throws IOException {");
+
+ if (openWireType.hasProperties()) {
+ out.println(" " + openWireType.getTypeName() + " info = (" + openWireType.getTypeName() + ") source;");
+ if (isOpenWireVersionNeeded(openWireType)) {
+ out.println(" int version = wireFormat.getVersion();");
+ }
+ out.println("");
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println(" info.beforeMarshall(wireFormat);");
+ }
+
+ out.println(" super.looseMarshal(wireFormat, source, dataOut);");
+
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ final int size = property.getSize();
+ final String typeName = property.getTypeName();
+ final String getter = "info." + property.getGetterName() + "()";
+
+ String indent = " ";
+ if (property.getVersion() > 1) {
+ indent = indent + " ";
+ out.println(" if (version >= " + property.getVersion() + ") {");
+ }
+
+ if (typeName.equals("boolean")) {
+ out.println(indent + "dataOut.writeBoolean(" + getter + ");");
+ } else if (typeName.equals("byte")) {
+ out.println(indent + "dataOut.writeByte(" + getter + ");");
+ } else if (typeName.equals("char")) {
+ out.println(indent + "dataOut.writeChar(" + getter + ");");
+ } else if (typeName.equals("short")) {
+ out.println(indent + "dataOut.writeShort(" + getter + ");");
+ } else if (typeName.equals("int")) {
+ out.println(indent + "dataOut.writeInt(" + getter + ");");
+ } else if (typeName.equals("long")) {
+ out.println(indent + "looseMarshalLong(wireFormat, " + getter + ", dataOut);");
+ } else if (typeName.equals("String")) {
+ out.println(indent + "looseMarshalString(" + getter + ", dataOut);");
+ } else if (typeName.equals("byte[]")) {
+ if (size > 0) {
+ out.println(indent + "looseMarshalConstByteArray(wireFormat, " + getter + ", dataOut, " + size + ");");
+ } else {
+ out.println(indent + "looseMarshalByteArray(wireFormat, " + getter + ", dataOut);");
+ }
+ } else if (typeName.equals("Buffer")) {
+ out.println(indent + "looseMarshalByteSequence(wireFormat, " + getter + ", dataOut);");
+ } else if (property.isArray()) {
+ if (size > 0) {
+ out.println(indent + "looseMarshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, " + size + ");");
+ } else {
+ out.println(indent + "looseMarshalObjectArray(wireFormat, " + getter + ", dataOut);");
+ }
+ } else if (property.isThrowable()) {
+ out.println(indent + "looseMarshalThrowable(wireFormat, " + getter + ", dataOut);");
+ } else {
+ if (property.isCached()) {
+ out.println(indent + "looseMarshalCachedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
+ } else {
+ out.println(indent + "looseMarshalNestedObject(wireFormat, (DataStructure)" + getter + ", dataOut);");
+ }
+ }
+
+ if (property.getVersion() > 1) {
+ out.println(" }");
+ }
+ }
+
+ if (openWireType.isMarshalAware()) {
+ out.println("");
+ out.println(" info.afterMarshall(wireFormat);");
+ }
+
+ out.println(" }");
+ out.println("");
+ }
+
+ private void writeClassClosure(PrintWriter out, OpenWireTypeDescriptor openWireType) {
+ out.println("}");
+ }
+
+ //----- Helper Methods for Code Generation -------------------------------//
+
+ private boolean isOpenWireVersionNeeded(OpenWireTypeDescriptor openWireType) {
+ for (final OpenWirePropertyDescriptor property : openWireType.getProperties()) {
+ if (property.getVersion() > 1) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private String getClassName(OpenWireTypeDescriptor openWireType) {
+ return openWireType.getTypeName() + "Marshaller";
+ }
+
+ private String getBaseClassName(OpenWireTypeDescriptor openWireType) {
+ String answer = "BaseDataStreamMarshaller";
+
+ final String superName = openWireType.getSuperClass();
+ if (!superName.equals("Object") &&
+ !superName.equals("JNDIBaseStorable") &&
+ !superName.equals("DataStructureSupport")) {
+
+ answer = superName + "Marshaller";
+ }
+
+ return answer;
+ }
+}
diff --git a/openwire-generator/src/main/resources/log4j.properties b/openwire-generator/src/main/resources/log4j.properties
new file mode 100644
index 0000000..5da64b0
--- /dev/null
+++ b/openwire-generator/src/main/resources/log4j.properties
@@ -0,0 +1,35 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, out, stdout
+
+log4j.logger.org.apache.activemq.openwire=DEBUG
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.FileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+log4j.appender.out.file=target/activemq-test.log
+log4j.appender.out.append=true
diff --git a/openwire-generator/src/test/java/org/apache/activenq/openwire/generator/IDERunner.java b/openwire-generator/src/test/java/org/apache/activenq/openwire/generator/IDERunner.java
new file mode 100644
index 0000000..cc2a16b
--- /dev/null
+++ b/openwire-generator/src/test/java/org/apache/activenq/openwire/generator/IDERunner.java
@@ -0,0 +1,34 @@
+/*
+ * 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.activenq.openwire.generator;
+
+import org.apache.activemq.openwire.generator.GeneratorTask;
+
+/**
+ * Runs the Generator Task from the IDE, output to target.
+ */
+public class IDERunner {
+
+ public static void main(String[] args) throws Exception {
+
+ GeneratorTask task = new GeneratorTask();
+
+ task.setBaseDir("./target/generated-sources/openwire");
+
+ task.execute();
+ }
+}
diff --git a/openwire-interop-tests/pom.xml b/openwire-interop-tests/pom.xml
index be6174f..0a8ff01 100644
--- a/openwire-interop-tests/pom.xml
+++ b/openwire-interop-tests/pom.xml
@@ -43,11 +43,15 @@
<groupId>org.apache.activemq</groupId>
<artifactId>openwire-legacy</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.fusesource.hawtbuf</groupId>
+ <artifactId>hawtbuf</artifactId>
+ </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
@@ -58,10 +62,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.fusesource.hawtbuf</groupId>
- <artifactId>hawtbuf</artifactId>
- </dependency>
<!-- Pull in ActiveMQ for compatibility testing -->
<dependency>
@@ -76,18 +76,6 @@
<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>
</project>
diff --git a/openwire-legacy/pom.xml b/openwire-legacy/pom.xml
index 8d61ac9..f5b974d 100644
--- a/openwire-legacy/pom.xml
+++ b/openwire-legacy/pom.xml
@@ -40,10 +40,6 @@
<artifactId>openwire-core</artifactId>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.fusesource.hawtbuf</groupId>
<artifactId>hawtbuf</artifactId>
</dependency>
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BaseCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BaseCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BaseCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BaseCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/BrokerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionErrorMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionErrorMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionErrorMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionErrorMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConnectionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ConsumerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ControlCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ControlCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ControlCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ControlCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataArrayResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataArrayResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataArrayResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataArrayResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataStructureSupportMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataStructureSupportMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DataStructureSupportMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DataStructureSupportMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DestinationInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DestinationInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DestinationInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DestinationInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DiscoveryEventMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DiscoveryEventMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/DiscoveryEventMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/DiscoveryEventMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ExceptionResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ExceptionResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ExceptionResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ExceptionResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/FlushCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/FlushCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/FlushCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/FlushCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/IntegerResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/IntegerResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/IntegerResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/IntegerResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalQueueAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalQueueAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalQueueAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalQueueAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTopicAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTopicAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTopicAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTopicAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTraceMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTraceMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTraceMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTraceMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTransactionMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTransactionMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTransactionMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/JournalTransactionMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/KeepAliveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/KeepAliveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/KeepAliveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/KeepAliveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/LastPartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/LastPartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/LastPartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/LastPartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/LocalTransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/LocalTransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/LocalTransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/LocalTransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MarshallerFactory.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MarshallerFactory.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MarshallerFactory.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MarshallerFactory.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchNotificationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchNotificationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchNotificationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageDispatchNotificationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/MessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/NetworkBridgeFilterMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/NetworkBridgeFilterMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/NetworkBridgeFilterMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/NetworkBridgeFilterMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireBytesMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireBytesMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireBytesMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireBytesMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMapMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMapMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMapMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMapMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireObjectMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireObjectMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireObjectMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireObjectMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireStreamMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireStreamMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireStreamMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireStreamMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTempTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTextMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTextMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTextMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTextMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/OpenWireTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/PartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/PartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/PartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/PartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ProducerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveSubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveSubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveSubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/RemoveSubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ReplayCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ReplayCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ReplayCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ReplayCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SessionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SessionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SessionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SessionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SessionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SessionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SessionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SessionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ShutdownInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ShutdownInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/ShutdownInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/ShutdownInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/SubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/SubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/TransactionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/WireFormatInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/WireFormatInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/WireFormatInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/WireFormatInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/XATransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/XATransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v1/XATransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/XATransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BaseCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BaseCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BaseCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BaseCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/BrokerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionErrorMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionErrorMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionErrorMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionErrorMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConnectionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ConsumerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ControlCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ControlCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ControlCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ControlCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DataArrayResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DataArrayResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DataArrayResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DataArrayResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DataResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DataResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DataResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DataResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DestinationInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DestinationInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DestinationInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DestinationInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DiscoveryEventMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DiscoveryEventMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/DiscoveryEventMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/DiscoveryEventMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ExceptionResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ExceptionResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ExceptionResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ExceptionResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/FlushCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/FlushCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/FlushCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/FlushCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/IntegerResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/IntegerResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/IntegerResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/IntegerResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalQueueAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalQueueAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalQueueAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalQueueAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTopicAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTopicAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTopicAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTopicAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTraceMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTraceMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTraceMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTraceMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTransactionMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTransactionMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTransactionMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/JournalTransactionMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/KeepAliveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/KeepAliveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/KeepAliveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/KeepAliveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/LastPartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/LastPartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/LastPartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/LastPartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/LocalTransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/LocalTransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/LocalTransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/LocalTransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MarshallerFactory.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MarshallerFactory.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MarshallerFactory.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MarshallerFactory.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchNotificationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchNotificationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchNotificationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageDispatchNotificationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessagePullMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessagePullMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/MessagePullMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/MessagePullMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/NetworkBridgeFilterMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/NetworkBridgeFilterMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/NetworkBridgeFilterMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/NetworkBridgeFilterMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBlobMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBlobMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBlobMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBlobMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBytesMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBytesMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBytesMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireBytesMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMapMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMapMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMapMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMapMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireObjectMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireObjectMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireObjectMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireObjectMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireStreamMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireStreamMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireStreamMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireStreamMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTempTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTextMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTextMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTextMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTextMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/PartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/PartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/PartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/PartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ProducerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveSubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveSubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveSubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/RemoveSubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ReplayCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ReplayCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ReplayCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ReplayCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SessionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SessionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SessionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SessionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SessionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SessionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SessionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SessionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ShutdownInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ShutdownInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/ShutdownInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/ShutdownInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/SubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/SubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/TransactionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/WireFormatInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/WireFormatInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/WireFormatInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/WireFormatInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/XATransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/XATransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v10/XATransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/XATransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BaseCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BaseCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BaseCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BaseCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/BrokerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionErrorMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionErrorMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionErrorMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionErrorMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConnectionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ConsumerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ControlCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ControlCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ControlCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ControlCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DataArrayResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DataArrayResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DataArrayResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DataArrayResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DataResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DataResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DataResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DataResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DestinationInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DestinationInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DestinationInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DestinationInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DiscoveryEventMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DiscoveryEventMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/DiscoveryEventMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/DiscoveryEventMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ExceptionResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ExceptionResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ExceptionResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ExceptionResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/FlushCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/FlushCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/FlushCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/FlushCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/IntegerResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/IntegerResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/IntegerResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/IntegerResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalQueueAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalQueueAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalQueueAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalQueueAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTopicAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTopicAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTopicAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTopicAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTraceMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTraceMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTraceMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTraceMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTransactionMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTransactionMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTransactionMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/JournalTransactionMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/KeepAliveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/KeepAliveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/KeepAliveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/KeepAliveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/LastPartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/LastPartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/LastPartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/LastPartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/LocalTransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/LocalTransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/LocalTransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/LocalTransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MarshallerFactory.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MarshallerFactory.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MarshallerFactory.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MarshallerFactory.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchNotificationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchNotificationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchNotificationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageDispatchNotificationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessagePullMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessagePullMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/MessagePullMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/MessagePullMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/NetworkBridgeFilterMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/NetworkBridgeFilterMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/NetworkBridgeFilterMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/NetworkBridgeFilterMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBlobMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBlobMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBlobMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBlobMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBytesMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBytesMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBytesMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBytesMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMapMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMapMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMapMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMapMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireObjectMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireObjectMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireObjectMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireObjectMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireStreamMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireStreamMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireStreamMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireStreamMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTempTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTextMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTextMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTextMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTextMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/PartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/PartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/PartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/PartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ProducerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveSubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveSubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveSubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/RemoveSubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ReplayCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ReplayCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ReplayCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ReplayCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SessionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SessionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SessionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SessionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SessionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SessionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SessionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SessionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ShutdownInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ShutdownInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/ShutdownInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/ShutdownInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/SubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/SubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/TransactionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/WireFormatInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/WireFormatInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/WireFormatInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/WireFormatInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/XATransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/XATransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v11/XATransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/XATransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BaseCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BaseCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BaseCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BaseCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/BrokerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionErrorMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionErrorMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionErrorMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionErrorMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConnectionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerControlMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerControlMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerControlMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerControlMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ConsumerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ControlCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ControlCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ControlCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ControlCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DataArrayResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DataArrayResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DataArrayResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DataArrayResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DataResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DataResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DataResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DataResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DestinationInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DestinationInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DestinationInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DestinationInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DiscoveryEventMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DiscoveryEventMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/DiscoveryEventMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/DiscoveryEventMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ExceptionResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ExceptionResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ExceptionResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ExceptionResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/FlushCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/FlushCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/FlushCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/FlushCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/IntegerResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/IntegerResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/IntegerResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/IntegerResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalQueueAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalQueueAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalQueueAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalQueueAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTopicAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTopicAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTopicAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTopicAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTraceMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTraceMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTraceMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTraceMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTransactionMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTransactionMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTransactionMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/JournalTransactionMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/KeepAliveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/KeepAliveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/KeepAliveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/KeepAliveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/LastPartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/LastPartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/LastPartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/LastPartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/LocalTransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/LocalTransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/LocalTransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/LocalTransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MarshallerFactory.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MarshallerFactory.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MarshallerFactory.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MarshallerFactory.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchNotificationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchNotificationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchNotificationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageDispatchNotificationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessagePullMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessagePullMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/MessagePullMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/MessagePullMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java
similarity index 99%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java
index 989ec67..bdfdede 100644
--- a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java
+++ b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/NetworkBridgeFilterMarshaller.java
Binary files differ
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBlobMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBlobMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBlobMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBlobMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBytesMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBytesMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBytesMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireBytesMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMapMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMapMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMapMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMapMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireObjectMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireObjectMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireObjectMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireObjectMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireStreamMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireStreamMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireStreamMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireStreamMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempDestinationMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempDestinationMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempDestinationMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempDestinationMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempQueueMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempQueueMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempQueueMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempQueueMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTempTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTextMessageMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTextMessageMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTextMessageMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTextMessageMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTopicMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTopicMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTopicMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/OpenWireTopicMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/PartialCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/PartialCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/PartialCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/PartialCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerAckMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerAckMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerAckMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerAckMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ProducerInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveSubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveSubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveSubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/RemoveSubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ReplayCommandMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ReplayCommandMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ReplayCommandMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ReplayCommandMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ResponseMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ResponseMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ResponseMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ResponseMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SessionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SessionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SessionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SessionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SessionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SessionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SessionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SessionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ShutdownInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ShutdownInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/ShutdownInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/ShutdownInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SubscriptionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SubscriptionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/SubscriptionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/SubscriptionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionIdMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/TransactionInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/WireFormatInfoMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/WireFormatInfoMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/WireFormatInfoMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/WireFormatInfoMarshaller.java
diff --git a/openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/XATransactionIdMarshaller.java b/openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/XATransactionIdMarshaller.java
similarity index 100%
rename from openwire-core/src/main/java/org/apache/activemq/openwire/codec/v9/XATransactionIdMarshaller.java
rename to openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v9/XATransactionIdMarshaller.java
diff --git a/pom.xml b/pom.xml
index 8171a6e..5135a68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,14 +38,17 @@
<target-version>1.7</target-version>
<!-- Dependency Versions for this Project -->
+ <ant-version>1.9.6</ant-version>
<junit-version>4.12</junit-version>
- <slf4j-version>1.7.12</slf4j-version>
+ <slf4j-version>1.7.13</slf4j-version>
<hawtbuf-version>1.11</hawtbuf-version>
<activemq-version>5.12.1</activemq-version>
<jetty-version>8.1.15.v20140411</jetty-version>
<mockito-version>1.10.19</mockito-version>
+ <reflections-version>0.9.10</reflections-version>
<!-- Maven Plugin Version for this Project -->
+ <maven-antrun-plugin-version>1.3</maven-antrun-plugin-version>
<maven-surefire-plugin-version>2.18.1</maven-surefire-plugin-version>
<maven-assembly-plugin-version>2.4</maven-assembly-plugin-version>
<maven-release-plugin-version>2.4.1</maven-release-plugin-version>
@@ -109,21 +112,20 @@
<module>openwire-legacy</module>
<module>openwire-interop-tests</module>
<module>openwire-website</module>
+ <module>openwire-annotations</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
- <artifactId>openwire-core</artifactId>
+ <artifactId>openwire-annotations</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>openwire-core</artifactId>
<version>${project.version}</version>
- <scope>test</scope>
- <type>test-jar</type>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
@@ -137,6 +139,11 @@
</dependency>
<dependency>
+ <groupId>org.reflections</groupId>
+ <artifactId>reflections</artifactId>
+ <version>${reflections-version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.1.1</version>
@@ -148,10 +155,10 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
<version>${mockito-version}</version>
- <scope>test</scope>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -169,6 +176,11 @@
<version>${hawtbuf-version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>${ant-version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin-version}</version>
@@ -215,6 +227,11 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin-version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${maven-antrun-plugin-version}</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>