You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2009/06/01 20:37:54 UTC
svn commit: r780773 [8/31] - in /activemq/sandbox/activemq-flow:
activemq-client/ activemq-client/src/main/java/org/
activemq-client/src/main/java/org/apache/
activemq-client/src/main/java/org/apache/activemq/
activemq-client/src/main/java/org/apache/a...
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQBytesMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQBytesMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ ActiveMQDestination info = (ActiveMQDestination)o;
+ info.setPhysicalName(tightUnmarshalString(dataIn, bs));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ ActiveMQDestination info = (ActiveMQDestination)o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ rc += tightMarshalString1(info.getPhysicalName(), bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ ActiveMQDestination info = (ActiveMQDestination)o;
+ tightMarshalString2(info.getPhysicalName(), dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ ActiveMQDestination info = (ActiveMQDestination)o;
+ info.setPhysicalName(looseUnmarshalString(dataIn));
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ ActiveMQDestination info = (ActiveMQDestination)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ looseMarshalString(info.getPhysicalName(), dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQMapMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQMapMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQMapMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQMessageMarshaller extends MessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQObjectMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQQueue.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQQueue();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQStreamMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQStreamMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller {
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQTempQueue;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQTempQueue.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQTempQueue();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQTempTopic;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQTempTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQTempTopic();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQTextMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQTextMessage.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQTextMessage();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java Mon Jun 1 18:37:41 2009
@@ -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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller {
+
+ /**
+ * Return the type of Data Structure we marshal
+ * @return short representation of the type data structure
+ */
+ public byte getDataStructureType() {
+ return ActiveMQTopic.DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @return a new object instance
+ */
+ public DataStructure createObject() {
+ return new ActiveMQTopic();
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+
+ return rc + 0;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ super.looseMarshal(wireFormat, o, dataOut);
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,118 @@
+/**
+ * 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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.command.BaseCommand;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
+
+
+
+/**
+ * Marshalling code for Open Wire Format for BaseCommandMarshaller
+ *
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the modify the groovy scripts in the
+ * under src/gram/script and then use maven openwire:generate to regenerate
+ * this file.
+ *
+ * @version $Revision$
+ */
+public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller {
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
+ super.tightUnmarshal(wireFormat, o, dataIn, bs);
+
+ BaseCommand info = (BaseCommand)o;
+ info.setCommandId(dataIn.readInt());
+ info.setResponseRequired(bs.readBoolean());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+
+ BaseCommand info = (BaseCommand)o;
+
+ int rc = super.tightMarshal1(wireFormat, o, bs);
+ bs.writeBoolean(info.isResponseRequired());
+
+ return rc + 4;
+ }
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param o the instance to be marshaled
+ * @param dataOut the output stream
+ * @throws IOException thrown if an error occurs
+ */
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
+ super.tightMarshal2(wireFormat, o, dataOut, bs);
+
+ BaseCommand info = (BaseCommand)o;
+ dataOut.writeInt(info.getCommandId());
+ bs.readBoolean();
+
+ }
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param o the object to un-marshal
+ * @param dataIn the data input stream to build the object from
+ * @throws IOException
+ */
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ super.looseUnmarshal(wireFormat, o, dataIn);
+
+ BaseCommand info = (BaseCommand)o;
+ info.setCommandId(dataIn.readInt());
+ info.setResponseRequired(dataIn.readBoolean());
+
+ }
+
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ */
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+
+ BaseCommand info = (BaseCommand)o;
+
+ super.looseMarshal(wireFormat, o, dataOut);
+ dataOut.writeInt(info.getCommandId());
+ dataOut.writeBoolean(info.isResponseRequired());
+
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java?rev=780773&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java (added)
+++ activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java Mon Jun 1 18:37:41 2009
@@ -0,0 +1,645 @@
+/**
+ * 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.v1;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.DataStreamMarshaller;
+import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.activemq.util.ByteSequence;
+
+public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
+
+ public static final Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR;
+
+ static {
+ Constructor constructor = null;
+ try {
+ constructor = StackTraceElement.class.getConstructor(new Class[] {String.class, String.class,
+ String.class, int.class});
+ } catch (Throwable e) {
+ }
+ STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor;
+ }
+
+ public abstract byte getDataStructureType();
+
+ public abstract DataStructure createObject();
+
+ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
+ return 0;
+ }
+
+ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs)
+ throws IOException {
+ }
+
+ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs)
+ throws IOException {
+ }
+
+ public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException {
+ if (o == 0) {
+ bs.writeBoolean(false);
+ bs.writeBoolean(false);
+ return 0;
+ } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
+ bs.writeBoolean(false);
+ bs.writeBoolean(true);
+ return 2;
+ } else if ((o & 0xFFFFFFFF00000000L) == 0) {
+ bs.writeBoolean(true);
+ bs.writeBoolean(false);
+ return 4;
+ } else {
+ bs.writeBoolean(true);
+ bs.writeBoolean(true);
+ return 8;
+ }
+ }
+
+ public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs)
+ throws IOException {
+ if (bs.readBoolean()) {
+ if (bs.readBoolean()) {
+ dataOut.writeLong(o);
+ } else {
+ dataOut.writeInt((int)o);
+ }
+ } else {
+ if (bs.readBoolean()) {
+ dataOut.writeShort((int)o);
+ }
+ }
+ }
+
+ public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
+ throws IOException {
+ if (bs.readBoolean()) {
+ if (bs.readBoolean()) {
+ return dataIn.readLong();
+ } else {
+ return toLong(dataIn.readInt());
+ }
+ } else {
+ if (bs.readBoolean()) {
+ return toLong(dataIn.readShort());
+ } else {
+ return 0;
+ }
+ }
+ }
+
+ protected long toLong(short value) {
+ // lets handle negative values
+ long answer = value;
+ return answer & 0xffffL;
+ }
+
+ protected long toLong(int value) {
+ // lets handle negative values
+ long answer = value;
+ return answer & 0xffffffffL;
+ }
+
+ protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn,
+ BooleanStream bs) throws IOException {
+ return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
+ }
+
+ protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
+ throws IOException {
+ return wireFormat.tightMarshalNestedObject1(o, bs);
+ }
+
+ protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
+ BooleanStream bs) throws IOException {
+ wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
+ }
+
+ protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn,
+ BooleanStream bs) throws IOException {
+ if (wireFormat.isCacheEnabled()) {
+ if (bs.readBoolean()) {
+ short index = dataIn.readShort();
+ DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs);
+ wireFormat.setInUnmarshallCache(index, object);
+ return object;
+ } else {
+ short index = dataIn.readShort();
+ return wireFormat.getFromUnmarshallCache(index);
+ }
+ } else {
+ return wireFormat.tightUnmarshalNestedObject(dataIn, bs);
+ }
+ }
+
+ protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs)
+ throws IOException {
+ if (wireFormat.isCacheEnabled()) {
+ Short index = wireFormat.getMarshallCacheIndex(o);
+ bs.writeBoolean(index == null);
+ if (index == null) {
+ int rc = wireFormat.tightMarshalNestedObject1(o, bs);
+ wireFormat.addToMarshallCache(o);
+ return 2 + rc;
+ } else {
+ return 2;
+ }
+ } else {
+ return wireFormat.tightMarshalNestedObject1(o, bs);
+ }
+ }
+
+ protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut,
+ BooleanStream bs) throws IOException {
+ if (wireFormat.isCacheEnabled()) {
+ Short index = wireFormat.getMarshallCacheIndex(o);
+ if (bs.readBoolean()) {
+ dataOut.writeShort(index.shortValue());
+ wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
+ } else {
+ dataOut.writeShort(index.shortValue());
+ }
+ } else {
+ wireFormat.tightMarshalNestedObject2(o, dataOut, bs);
+ }
+ }
+
+ protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs)
+ throws IOException {
+ if (bs.readBoolean()) {
+ String clazz = tightUnmarshalString(dataIn, bs);
+ String message = tightUnmarshalString(dataIn, bs);
+ Throwable o = createThrowable(clazz, message);
+ if (wireFormat.isStackTraceEnabled()) {
+ if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
+ StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
+ for (int i = 0; i < ss.length; i++) {
+ try {
+ ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
+ .newInstance(new Object[] {tightUnmarshalString(dataIn, bs),
+ tightUnmarshalString(dataIn, bs),
+ tightUnmarshalString(dataIn, bs),
+ new Integer(dataIn.readInt())});
+ } catch (IOException e) {
+ throw e;
+ } catch (Throwable e) {
+ }
+ }
+ o.setStackTrace(ss);
+ } else {
+ short size = dataIn.readShort();
+ for (int i = 0; i < size; i++) {
+ tightUnmarshalString(dataIn, bs);
+ tightUnmarshalString(dataIn, bs);
+ tightUnmarshalString(dataIn, bs);
+ dataIn.readInt();
+ }
+ }
+ o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs));
+
+ }
+ return o;
+ } else {
+ return null;
+ }
+ }
+
+ private Throwable createThrowable(String className, String message) {
+ try {
+ Class clazz = Class.forName(className, false, BaseDataStreamMarshaller.class.getClassLoader());
+ Constructor constructor = clazz.getConstructor(new Class[] {String.class});
+ return (Throwable)constructor.newInstance(new Object[] {message});
+ } catch (Throwable e) {
+ return new Throwable(className + ": " + message);
+ }
+ }
+
+ protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs)
+ throws IOException {
+ if (o == null) {
+ bs.writeBoolean(false);
+ return 0;
+ } else {
+ int rc = 0;
+ bs.writeBoolean(true);
+ rc += tightMarshalString1(o.getClass().getName(), bs);
+ rc += tightMarshalString1(o.getMessage(), bs);
+ if (wireFormat.isStackTraceEnabled()) {
+ rc += 2;
+ StackTraceElement[] stackTrace = o.getStackTrace();
+ for (int i = 0; i < stackTrace.length; i++) {
+ StackTraceElement element = stackTrace[i];
+ rc += tightMarshalString1(element.getClassName(), bs);
+ rc += tightMarshalString1(element.getMethodName(), bs);
+ rc += tightMarshalString1(element.getFileName(), bs);
+ rc += 4;
+ }
+ rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs);
+ }
+ return rc;
+ }
+ }
+
+ protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut,
+ BooleanStream bs) throws IOException {
+ if (bs.readBoolean()) {
+ tightMarshalString2(o.getClass().getName(), dataOut, bs);
+ tightMarshalString2(o.getMessage(), dataOut, bs);
+ if (wireFormat.isStackTraceEnabled()) {
+ StackTraceElement[] stackTrace = o.getStackTrace();
+ dataOut.writeShort(stackTrace.length);
+ for (int i = 0; i < stackTrace.length; i++) {
+ StackTraceElement element = stackTrace[i];
+ tightMarshalString2(element.getClassName(), dataOut, bs);
+ tightMarshalString2(element.getMethodName(), dataOut, bs);
+ tightMarshalString2(element.getFileName(), dataOut, bs);
+ dataOut.writeInt(element.getLineNumber());
+ }
+ tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs);
+ }
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException {
+ if (bs.readBoolean()) {
+ if (bs.readBoolean()) {
+ int size = dataIn.readShort();
+ byte data[] = new byte[size];
+ dataIn.readFully(data);
+ // Yes deprecated, but we know what we are doing.
+ // This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
+ return new String(data, 0);
+ } else {
+ return dataIn.readUTF();
+ }
+ } else {
+ return null;
+ }
+ }
+
+ protected int tightMarshalString1(String value, BooleanStream bs) throws IOException {
+ bs.writeBoolean(value != null);
+ if (value != null) {
+
+ int strlen = value.length();
+ int utflen = 0;
+ char[] charr = new char[strlen];
+ int c = 0;
+ boolean isOnlyAscii = true;
+
+ value.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;
+ isOnlyAscii = false;
+ } else {
+ isOnlyAscii = false;
+ utflen += 2;
+ }
+ }
+
+ if (utflen >= Short.MAX_VALUE) {
+ throw new IOException("Encountered a String value that is too long to encode.");
+ }
+ bs.writeBoolean(isOnlyAscii);
+ return utflen + 2;
+
+ } else {
+ return 0;
+ }
+ }
+
+ protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException {
+ if (bs.readBoolean()) {
+ // If we verified it only holds ascii values
+ if (bs.readBoolean()) {
+ dataOut.writeShort(value.length());
+ dataOut.writeBytes(value);
+ } else {
+ dataOut.writeUTF(value);
+ }
+ }
+ }
+
+ protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects,
+ BooleanStream bs) throws IOException {
+ if (objects != null) {
+ int rc = 0;
+ bs.writeBoolean(true);
+ rc += 2;
+ for (int i = 0; i < objects.length; i++) {
+ rc += tightMarshalNestedObject1(wireFormat, objects[i], bs);
+ }
+ return rc;
+ } else {
+ bs.writeBoolean(false);
+ return 0;
+ }
+ }
+
+ protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects,
+ DataOutput dataOut, BooleanStream bs) throws IOException {
+ if (bs.readBoolean()) {
+ dataOut.writeShort(objects.length);
+ for (int i = 0; i < objects.length; i++) {
+ tightMarshalNestedObject2(wireFormat, objects[i], dataOut, bs);
+ }
+ }
+ }
+
+ protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException {
+ return i;
+ }
+
+ protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i)
+ throws IOException {
+ dataOut.write(data, 0, i);
+ }
+
+ protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i)
+ throws IOException {
+ byte data[] = new byte[i];
+ dataIn.readFully(data);
+ return data;
+ }
+
+ protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException {
+ bs.writeBoolean(data != null);
+ if (data != null) {
+ return data.length + 4;
+ } else {
+ return 0;
+ }
+ }
+
+ protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs)
+ throws IOException {
+ if (bs.readBoolean()) {
+ dataOut.writeInt(data.length);
+ dataOut.write(data);
+ }
+ }
+
+ protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException {
+ byte rc[] = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+ return rc;
+ }
+
+ protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException {
+ bs.writeBoolean(data != null);
+ if (data != null) {
+ return data.getLength() + 4;
+ } else {
+ return 0;
+ }
+ }
+
+ protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs)
+ throws IOException {
+ if (bs.readBoolean()) {
+ dataOut.writeInt(data.getLength());
+ dataOut.write(data.getData(), data.getOffset(), data.getLength());
+ }
+ }
+
+ protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException {
+ ByteSequence rc = null;
+ if (bs.readBoolean()) {
+ int size = dataIn.readInt();
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ return new ByteSequence(t, 0, size);
+ }
+ return rc;
+ }
+
+ //
+ // The loose marshaling logic
+ //
+
+ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
+ }
+
+ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
+ }
+
+ public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException {
+ dataOut.writeLong(o);
+ }
+
+ public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException {
+ return dataIn.readLong();
+ }
+
+ protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn)
+ throws IOException {
+ return wireFormat.looseUnmarshalNestedObject(dataIn);
+ }
+
+ protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
+ throws IOException {
+ wireFormat.looseMarshalNestedObject(o, dataOut);
+ }
+
+ protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn)
+ throws IOException {
+ if (wireFormat.isCacheEnabled()) {
+ if (dataIn.readBoolean()) {
+ short index = dataIn.readShort();
+ DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn);
+ wireFormat.setInUnmarshallCache(index, object);
+ return object;
+ } else {
+ short index = dataIn.readShort();
+ return wireFormat.getFromUnmarshallCache(index);
+ }
+ } else {
+ return wireFormat.looseUnmarshalNestedObject(dataIn);
+ }
+ }
+
+ protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut)
+ throws IOException {
+ if (wireFormat.isCacheEnabled()) {
+ Short index = wireFormat.getMarshallCacheIndex(o);
+ dataOut.writeBoolean(index == null);
+ if (index == null) {
+ index = wireFormat.addToMarshallCache(o);
+ dataOut.writeShort(index.shortValue());
+ wireFormat.looseMarshalNestedObject(o, dataOut);
+ } else {
+ dataOut.writeShort(index.shortValue());
+ }
+ } else {
+ wireFormat.looseMarshalNestedObject(o, dataOut);
+ }
+ }
+
+ protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn)
+ throws IOException {
+ if (dataIn.readBoolean()) {
+ String clazz = looseUnmarshalString(dataIn);
+ String message = looseUnmarshalString(dataIn);
+ Throwable o = createThrowable(clazz, message);
+ if (wireFormat.isStackTraceEnabled()) {
+ if (STACK_TRACE_ELEMENT_CONSTRUCTOR != null) {
+ StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()];
+ for (int i = 0; i < ss.length; i++) {
+ try {
+ ss[i] = (StackTraceElement)STACK_TRACE_ELEMENT_CONSTRUCTOR
+ .newInstance(new Object[] {looseUnmarshalString(dataIn),
+ looseUnmarshalString(dataIn),
+ looseUnmarshalString(dataIn),
+ new Integer(dataIn.readInt())});
+ } catch (IOException e) {
+ throw e;
+ } catch (Throwable e) {
+ }
+ }
+ o.setStackTrace(ss);
+ } else {
+ short size = dataIn.readShort();
+ for (int i = 0; i < size; i++) {
+ looseUnmarshalString(dataIn);
+ looseUnmarshalString(dataIn);
+ looseUnmarshalString(dataIn);
+ dataIn.readInt();
+ }
+ }
+ o.initCause(looseUnmarsalThrowable(wireFormat, dataIn));
+
+ }
+ return o;
+ } else {
+ return null;
+ }
+ }
+
+ protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut)
+ throws IOException {
+ dataOut.writeBoolean(o != null);
+ if (o != null) {
+ looseMarshalString(o.getClass().getName(), dataOut);
+ looseMarshalString(o.getMessage(), dataOut);
+ if (wireFormat.isStackTraceEnabled()) {
+ StackTraceElement[] stackTrace = o.getStackTrace();
+ dataOut.writeShort(stackTrace.length);
+ for (int i = 0; i < stackTrace.length; i++) {
+ StackTraceElement element = stackTrace[i];
+ looseMarshalString(element.getClassName(), dataOut);
+ looseMarshalString(element.getMethodName(), dataOut);
+ looseMarshalString(element.getFileName(), dataOut);
+ dataOut.writeInt(element.getLineNumber());
+ }
+ looseMarshalThrowable(wireFormat, o.getCause(), dataOut);
+ }
+ }
+ }
+
+ protected String looseUnmarshalString(DataInput dataIn) throws IOException {
+ if (dataIn.readBoolean()) {
+ return dataIn.readUTF();
+ } else {
+ return null;
+ }
+ }
+
+ protected void looseMarshalString(String value, DataOutput dataOut) throws IOException {
+ dataOut.writeBoolean(value != null);
+ if (value != null) {
+ dataOut.writeUTF(value);
+ }
+ }
+
+ protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects,
+ DataOutput dataOut) throws IOException {
+ dataOut.writeBoolean(objects != null);
+ if (objects != null) {
+ dataOut.writeShort(objects.length);
+ for (int i = 0; i < objects.length; i++) {
+ looseMarshalNestedObject(wireFormat, objects[i], dataOut);
+ }
+ }
+ }
+
+ protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut,
+ int i) throws IOException {
+ dataOut.write(data, 0, i);
+ }
+
+ protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException {
+ byte data[] = new byte[i];
+ dataIn.readFully(data);
+ return data;
+ }
+
+ protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut)
+ throws IOException {
+ dataOut.writeBoolean(data != null);
+ if (data != null) {
+ dataOut.writeInt(data.length);
+ dataOut.write(data);
+ }
+ }
+
+ protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException {
+ byte rc[] = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
+ rc = new byte[size];
+ dataIn.readFully(rc);
+ }
+ return rc;
+ }
+
+ protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut)
+ throws IOException {
+ dataOut.writeBoolean(data != null);
+ if (data != null) {
+ dataOut.writeInt(data.getLength());
+ dataOut.write(data.getData(), data.getOffset(), data.getLength());
+ }
+ }
+
+ protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException {
+ ByteSequence rc = null;
+ if (dataIn.readBoolean()) {
+ int size = dataIn.readInt();
+ byte[] t = new byte[size];
+ dataIn.readFully(t);
+ rc = new ByteSequence(t, 0, size);
+ }
+ return rc;
+ }
+}
Propchange: activemq/sandbox/activemq-flow/activemq-openwire/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
------------------------------------------------------------------------------
svn:executable = *