activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r468441 [4/6] - in /incubator/activemq/sandbox/qpid: ./ specs/ src/main/java/org/apache/activemq/amqp/broker/ src/main/java/org/apache/activemq/amqp/command/ src/main/java/org/apache/activemq/amqp/transport/ src/main/java/org/apache/activem...
Date Fri, 27 Oct 2006 16:19:06 GMT
Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ConnectionTuneOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ConnectionTuneOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ConnectionTuneOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ConnectionTuneOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,79 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class ConnectionTuneOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 10; 	
+    public static final int METHOD_ID = 31; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new ConnectionTuneOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        ConnectionTuneOkBody object = (ConnectionTuneOkBody)o;
+        
+        return
+        2 /*channelMax*/+
+            4 /*frameMax*/+
+            2 /*heartbeat*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        ConnectionTuneOkBody object = (ConnectionTuneOkBody)o;
+        EncodingUtils.writeUnsignedShort(buffer, object.channelMax);
+            EncodingUtils.writeUnsignedInteger(buffer, object.frameMax);
+            EncodingUtils.writeUnsignedShort(buffer, object.heartbeat);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        ConnectionTuneOkBody object = (ConnectionTuneOkBody)o;
+        object.channelMax = EncodingUtils.readUnsignedShort(buffer);
+        object.frameMax = EncodingUtils.readUnsignedInteger(buffer);
+        object.heartbeat = EncodingUtils.readUnsignedShort(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class DtxSelectBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 100; 	
+    public static final int METHOD_ID = 10; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new DtxSelectBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        DtxSelectBody object = (DtxSelectBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        DtxSelectBody object = (DtxSelectBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        DtxSelectBody object = (DtxSelectBody)o;
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxSelectOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class DtxSelectOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 100; 	
+    public static final int METHOD_ID = 11; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new DtxSelectOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        DtxSelectOkBody object = (DtxSelectOkBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        DtxSelectOkBody object = (DtxSelectOkBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        DtxSelectOkBody object = (DtxSelectOkBody)o;
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,73 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class DtxStartBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 100; 	
+    public static final int METHOD_ID = 20; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new DtxStartBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        DtxStartBody object = (DtxStartBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.dtxIdentifier)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        DtxStartBody object = (DtxStartBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.dtxIdentifier);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        DtxStartBody object = (DtxStartBody)o;
+        object.dtxIdentifier = EncodingUtils.readShortString(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/DtxStartOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class DtxStartOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 100; 	
+    public static final int METHOD_ID = 21; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new DtxStartOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        DtxStartOkBody object = (DtxStartOkBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        DtxStartOkBody object = (DtxStartOkBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        DtxStartOkBody object = (DtxStartOkBody)o;
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/EncodingUtils.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/EncodingUtils.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/EncodingUtils.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/EncodingUtils.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,882 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.activemq.amqp.command.BasicContentHeaderProperties;
+import org.apache.activemq.amqp.command.FieldTable;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class EncodingUtils
+{
+    private final static Log _logger = LogFactory.getLog(EncodingUtils.class);
+
+    private static final String STRING_ENCODING = "iso8859-15";
+    private static final Charset _charset = Charset.forName("iso8859-15");
+
+    public static final int SIZEOF_UNSIGNED_SHORT = 2;
+    public static final int SIZEOF_UNSIGNED_INT = 4;
+
+    public static int encodedShortStringLength(String s)
+    {
+        if (s == null)
+        {
+            return 1;
+        }
+        else
+        {
+            return (short) (1 + s.length());
+        }
+    }
+
+    public static int encodedLongStringLength(String s)
+    {
+        if (s == null)
+        {
+            return 4;
+        }
+        else
+        {
+            return 4 + s.length();
+        }
+    }
+
+    public static int encodedLongStringLength(char[] s)
+    {
+        if (s == null)
+        {
+            return 4;
+        }
+        else
+        {
+            return 4 + s.length;
+        }
+    }
+
+    public static int encodedLongstrLength(byte[] bytes)
+    {
+        if (bytes == null)
+        {
+            return 4;
+        }
+        else
+        {
+            return 4 + bytes.length;
+        }
+    }
+
+    public static int encodedFieldTableLength(FieldTable table)
+    {
+        if (table == null)
+        {
+            return 4;
+        }
+        else
+        {
+            return (int)getFieldTableSize(table) + 4;
+        }
+    }
+
+    
+    public static void writeShortStringBytes(DataOutput buffer, String s) throws IOException
+    {
+        if (s != null)
+        {
+            byte[] encodedString = new byte[s.length()];
+            char[] cha = s.toCharArray();
+            for (int i = 0; i < cha.length; i++)
+            {
+                encodedString[i] = (byte) cha[i];
+            }
+            // TODO: check length fits in an unsigned byte
+            writeUnsignedByte(buffer, (short) encodedString.length);
+            buffer.write(encodedString);
+        }
+        else
+        {
+            // really writing out unsigned byte
+            buffer.writeByte((byte) 0);
+        }
+    }
+
+    public static void writeLongStringBytes(DataOutput buffer, String s) throws IOException
+    {
+        assert s == null || s.length() <= 0xFFFE;
+        if (s != null)
+        {
+            int len = s.length();
+            writeUnsignedInteger(buffer, s.length());
+            byte[] encodedString = new byte[len];
+            char[] cha = s.toCharArray();
+            for (int i = 0; i < cha.length; i++)
+            {
+                encodedString[i] = (byte) cha[i];
+            }
+            buffer.write(encodedString);
+        }
+        else
+        {
+            writeUnsignedInteger(buffer, 0);
+        }
+    }
+
+    public static void writeLongStringBytes(DataOutput buffer, char[] s) throws IOException
+    {
+        assert s == null || s.length <= 0xFFFE;
+        if (s != null)
+        {
+            int len = s.length;
+            writeUnsignedInteger(buffer, s.length);
+            byte[] encodedString = new byte[len];
+            for (int i = 0; i < s.length; i++)
+            {
+                encodedString[i] = (byte) s[i];
+            }
+            buffer.write(encodedString);
+        }
+        else
+        {
+            writeUnsignedInteger(buffer, 0);
+        }
+    }
+
+    public static void writeLongStringBytes(DataOutput buffer, byte[] bytes) throws IOException
+    {
+        assert bytes == null || bytes.length <= 0xFFFE;
+        if (bytes != null)
+        {
+            writeUnsignedInteger(buffer, bytes.length);
+            buffer.write(bytes);
+        }
+        else
+        {
+            writeUnsignedInteger(buffer, 0);
+        }
+    }
+
+    public static void writeUnsignedByte(DataOutput buffer, short b) throws IOException
+    {
+        byte bv = (byte) b;
+        buffer.writeByte(bv);
+    }
+
+    public static void writeUnsignedShort(DataOutput buffer, int s) throws IOException
+    {
+        // TODO: Is this comparison safe? Do I need to cast RHS to long?
+        if (s < Short.MAX_VALUE)
+        {
+            buffer.writeShort((short) s);
+        }
+        else
+        {
+            short sv = (short) s;
+            buffer.writeByte((byte) (0xFF & (sv >> 8)));
+            buffer.writeByte((byte) (0xFF & sv));
+        }
+    }
+
+    public static void writeUnsignedInteger(DataOutput buffer, long l) throws IOException
+    {
+        // TODO: Is this comparison safe? Do I need to cast RHS to long?
+        if (l < Integer.MAX_VALUE)
+        {
+            buffer.writeInt((int) l);
+        }
+        else
+        {
+            int iv = (int) l;
+
+            // FIXME: This *may* go faster if we build this into a local 4-byte array and then
+            // put the array in a single call.
+            buffer.writeByte((byte) (0xFF & (iv >> 24)));
+            buffer.writeByte((byte) (0xFF & (iv >> 16)));
+            buffer.writeByte((byte) (0xFF & (iv >> 8)));
+            buffer.writeByte((byte) (0xFF & iv));
+        }
+    }
+
+    public static void writeFieldTableBytes(DataOutput buffer, FieldTable table) throws IOException
+    {
+        if (table != null)
+        {
+        	writeFieldTable(buffer, table);
+        }
+        else
+        {
+            writeUnsignedInteger(buffer, 0);
+        }
+    }
+
+    public static void writeBooleans(DataOutput buffer, boolean[] values) throws IOException
+    {
+        byte packedValue = 0;
+        for (int i = 0; i < values.length; i++)
+        {
+            if (values[i])
+            {
+                packedValue = (byte) (packedValue | (1 << i));
+            }
+        }
+
+        buffer.writeByte(packedValue);
+    }
+
+    /**
+     * This is used for writing longstrs.
+     * @param buffer
+     * @param data
+     * @throws IOException 
+     */
+    public static void writeLongstr(DataOutput buffer, byte[] data) throws IOException
+    {
+        if (data != null)
+        {
+            writeUnsignedInteger(buffer, data.length);
+            buffer.write(data);
+        }
+        else
+        {
+            writeUnsignedInteger(buffer, 0);
+        }
+    }
+
+    public static void writeTimestamp(DataOutput buffer, long timestamp) throws IOException
+    {
+        writeUnsignedInteger(buffer, 0/*timestamp msb*/);
+        writeUnsignedInteger(buffer, timestamp);
+    }
+
+    public static boolean[] readBooleans(DataInput buffer) throws IOException
+    {
+        byte packedValue = buffer.readByte();
+        boolean[] result = new boolean[8];
+
+        for (int i = 0; i < 8; i++)
+        {
+            result[i] = ((packedValue & (1 << i)) != 0);
+        }
+        return result;
+    }
+
+    public static FieldTable readFieldTable(DataInput buffer) throws IOException
+    {
+        long length = readUnsignedInteger(buffer);
+        if (length == 0)
+        {
+            return null;
+        }
+        else
+        {
+        	FieldTable table = new FieldTable();
+        	readFieldTable(buffer, length, table);
+            return table;
+        }
+    }
+    
+
+    public static short readUnsignedByte(DataInput buffer) throws IOException
+    {
+        return (short)(buffer.readByte() & 0xFF);
+    }
+
+    public static int readUnsignedShort(DataInput buffer) throws IOException
+    {
+        return (int)(
+        		((buffer.readByte() & 0xFF)<<8) |
+        		((buffer.readByte() & 0xFF))
+        		);
+    }
+
+    public static long readUnsignedInteger(DataInput buffer) throws IOException
+    {
+        return (long)(
+        		((buffer.readByte() & 0xFF)<<24) |
+        		((buffer.readByte() & 0xFF)<<16) |
+        		((buffer.readByte() & 0xFF)<<8) |
+        		((buffer.readByte() & 0xFF))
+        		);
+    }
+
+    
+    public static String readShortString(DataInput buffer) throws IOException
+    {
+        short length = readUnsignedByte(buffer);
+        if (length == 0)
+        {
+            return null;
+        }
+        else
+        {
+            // this may seem rather odd to declare two array but testing has shown
+            // that constructing a string from a byte array is 5 (five) times slower
+            // than constructing one from a char array.
+            // this approach here is valid since we know that all the chars are
+            // ASCII (0-127)
+            byte[] stringBytes = new byte[length];
+            buffer.readFully(stringBytes, 0, length);
+            char[] stringChars = new char[length];
+            for (int i = 0; i < stringChars.length; i++)
+            {
+                stringChars[i] = (char) stringBytes[i];
+            }
+
+            return new String(stringChars);
+        }
+    }
+
+    public static String readLongString(DataInput buffer) throws IOException
+    {
+        long length = readUnsignedInteger(buffer);
+        if (length == 0)
+        {
+            return null;
+        }
+        else
+        {
+            // this may seem rather odd to declare two array but testing has shown
+            // that constructing a string from a byte array is 5 (five) times slower
+            // than constructing one from a char array.
+            // this approach here is valid since we know that all the chars are
+            // ASCII (0-127)
+            byte[] stringBytes = new byte[(int)length];
+            buffer.readFully(stringBytes, 0, (int)length);
+            char[] stringChars = new char[(int)length];
+            for (int i = 0; i < stringChars.length; i++)
+            {
+                stringChars[i] = (char) stringBytes[i];
+            }
+            return new String(stringChars);
+        }
+    }
+
+    public static byte[] readLongstr(DataInput buffer) throws IOException
+    {
+        long length = readUnsignedInteger(buffer);
+        if (length == 0)
+        {
+            return null;
+        }
+        else
+        {
+            byte[] result = new byte[(int)length];
+            buffer.readFully(result);
+            return result;
+        }
+    }
+
+    public static long readTimestamp(DataInput buffer) throws IOException
+    {
+        // Discard msb from AMQ timestamp
+        readUnsignedInteger(buffer);
+        return readUnsignedInteger(buffer);
+    }
+
+    // Will barf with a NPE on a null input. Not sure whether it should return null or
+    // an empty field-table (which would be slower - perhaps unnecessarily).
+    //
+    // Some sample input and the result output:
+    //
+    // Input: "a=1" "a=2 c=3" "a=3 c=4 d" "a='four' b='five'" "a=bad"
+    //
+    //    Parsing <a=1>...
+    //    {a=1}
+    //    Parsing <a=2 c=3>...
+    //    {a=2, c=3}
+    //    Parsing <a=3 c=4 d>...
+    //    {a=3, c=4, d=null}
+    //    Parsing <a='four' b='five'>...
+    //    {a=four, b=five}
+    //    Parsing <a=bad>...
+    //    java.lang.IllegalArgumentException: a: Invalid integer in <bad> from <a=bad>.
+    //
+    public static FieldTable createFieldTableFromMessageSelector(String selector)
+    {
+        boolean debug = _logger.isDebugEnabled();
+
+        // TODO: Doesn't support embedded quotes properly.
+        String[] expressions = selector.split(" +");
+
+        FieldTable result = new FieldTable();
+
+        for (int i = 0; i < expressions.length; i++)
+        {
+            String expr = expressions[i];
+
+            if (debug)
+            {
+                _logger.debug("Expression = <" + expr + ">");
+            }
+
+            int equals = expr.indexOf('=');
+
+            if (equals < 0)
+            {
+                // Existence check
+                result.put("S" + expr.trim(), null);
+            }
+            else
+            {
+                String key = expr.substring(0, equals).trim();
+                String value = expr.substring(equals + 1).trim();
+
+                if (debug)
+                {
+                    _logger.debug("Key = <" + key + ">, Value = <" + value + ">");
+                }
+
+                if (value.charAt(0) == '\'')
+                {
+                    if (value.charAt(value.length() - 1) != '\'')
+                    {
+                        throw new IllegalArgumentException(key + ": Missing quote in <" + value + "> from <" + selector + ">.");
+                    }
+                    else
+                    {
+                        value = value.substring(1, value.length() - 1);
+
+                        result.put("S" + key, value);
+                    }
+                }
+                else
+                {
+                    try
+                    {
+                        int intValue = Integer.parseInt(value);
+                        result.put("i" + key, value);
+                    }
+                    catch (NumberFormatException e)
+                    {
+                        throw new IllegalArgumentException(key + ": Invalid integer in <" + value + "> from <" + selector + ">.");
+
+                    }
+                }
+            }
+        }
+
+        if (debug)
+        {
+            _logger.debug("Field-table created from <" + selector + "> is <" + result + ">");
+        }
+
+        return (result);
+
+    }
+
+    static byte[] hexToByteArray(String id)
+    {
+        // Should check param for null, long enough for this check, upper-case and trailing char
+        String s = (id.charAt(1) == 'x') ? id.substring(2) : id;    // strip 0x
+
+        int len = s.length();
+        int byte_len = len / 2;
+        byte[] b = new byte[byte_len];
+
+        for (int i = 0; i < byte_len; i++)
+        {
+            // fixme: refine these repetitive subscript calcs.
+            int ch = i * 2;
+
+            byte b1 = Byte.parseByte(s.substring(ch, ch + 1), 16);
+            byte b2 = Byte.parseByte(s.substring(ch + 1, ch + 2), 16);
+
+            b[i] = (byte) (b1 * 16 + b2);
+        }
+
+        return (b);
+    }
+
+    public static char[] convertToHexCharArray(byte[] from)
+    {
+        int length = from.length;
+        char[]    result_buff = new char[length * 2 + 2];
+
+        result_buff[0] = '0';
+        result_buff[1] = 'x';
+
+        int bite;
+        int dest = 2;
+
+        for (int i = 0; i < length; i++)
+        {
+            bite = from[i];
+
+            if (bite < 0)
+            {
+                bite += 256;
+            }
+
+            result_buff[dest++] = hex_chars[bite >> 4];
+            result_buff[dest++] = hex_chars[bite & 0x0f];
+        }
+
+        return (result_buff);
+    }
+
+    public static String convertToHexString(byte[] from)
+    {
+        return (new String(convertToHexCharArray(from)));
+    }
+
+//    public static String convertToHexString(ByteBuffer bb)
+//    {
+//        int size = bb.limit();
+//
+//        byte[] from = new byte[size];
+//
+//        // Is this not the same.
+//        //bb.get(from, 0, size);
+//        for (int i = 0; i < size; i++)
+//        {
+//            from[i] = bb.get(i);
+//        }
+//
+//        return (new String(convertToHexCharArray(from)));
+//    }
+
+    public static void main(String[] args)
+    {
+        for (int i = 0; i < args.length; i++)
+        {
+            String selector = args[i];
+
+            System.err.println("Parsing <" + selector + ">...");
+
+            try
+            {
+                System.err.println(createFieldTableFromMessageSelector(selector));
+            }
+            catch (IllegalArgumentException e)
+            {
+                System.err.println(e);
+            }
+        }
+    }
+
+    private static char hex_chars[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+    
+
+    /**
+     * Construct a new field table.
+     *
+     * @param buffer the buffer from which to read data. The length byte must be read already
+     * @param length the length of the field table. Must be > 0.
+     * @throws AMQFrameDecodingException if there is an error decoding the table
+     */
+	static public void readFieldTable(DataInput buffer, final long length, FieldTable table) throws IOException {	
+        int sizeRead = 0;
+        while (sizeRead < length)     {
+            final String key = EncodingUtils.readShortString(buffer);
+            byte iType = buffer.readByte();
+            
+            sizeRead += EncodingUtils.encodedShortStringLength(key)+1;
+            
+            final char type = (char) iType;
+            Object value;
+            switch (type)
+            {
+                case 'S':
+                    value = EncodingUtils.readLongString(buffer);
+                    sizeRead += EncodingUtils.encodedLongStringLength((String)value);
+                    break;
+                case 'I':
+                    value = new Long(EncodingUtils.readUnsignedInteger(buffer));
+                    sizeRead += 4;
+                    break;
+                default:
+                    String msg = "Field '" + key + "' - unsupported field table type: " + type;
+                    // some extra debug information...
+                    msg += " (" + iType + "), length=" + length + ", sizeRead=" + sizeRead + ", totalSize=" + length;
+                    throw new IOException(msg);
+            }
+
+            // we deliberately want to call put in the parent class since we do
+            // not need to do the size calculations
+            table.put(key, value);
+        }        
+    }
+
+    static public void writeFieldTable(DataOutput buffer, FieldTable table) throws IOException
+    {
+    	long _encodedSize = getFieldTableSize(table);
+        // write out the total length, which we have kept up to date as data is added
+        EncodingUtils.writeUnsignedInteger(buffer, _encodedSize);
+        final Iterator it = table.entrySet().iterator();
+        while (it.hasNext())
+        {
+            Map.Entry me = (Map.Entry) it.next();
+            String key = (String) me.getKey();
+
+            EncodingUtils.writeShortStringBytes(buffer, key);
+            Object value = me.getValue();
+
+            if (value instanceof byte[])
+            {
+                buffer.writeByte((byte) 'S');
+                EncodingUtils.writeLongstr(buffer, (byte[]) value);
+            }
+            else if (value instanceof String)
+            {
+                // TODO: look at using proper charset encoder
+                buffer.writeByte((byte) 'S');
+                EncodingUtils.writeLongStringBytes(buffer, (String) value);
+            }
+            else if (value instanceof Integer)
+            {
+                buffer.writeByte((byte) 'I');
+                EncodingUtils.writeUnsignedInteger(buffer, ((Integer) value).longValue());
+            }
+            else if (value instanceof Long)
+            {
+                buffer.writeByte((byte) 'I');
+                EncodingUtils.writeUnsignedInteger(buffer, ((Long) value).longValue());
+            }
+            else
+            {
+                throw new IllegalArgumentException("Key '" + key + "': Unsupported type in field table, type: " + value.getClass());
+            }
+        }
+    }
+
+    static private long getFieldTableSize(FieldTable table) {
+		long rc = 0;
+		for (Iterator iter = table.entrySet().iterator(); iter.hasNext();) {
+			Map.Entry entry = (Map.Entry) iter.next();
+			rc += EncodingUtils.encodedShortStringLength((String) entry
+					.getKey());
+			Object value = entry.getValue();
+
+			// the extra byte if for the type indicator that is written out
+			if (value instanceof String) {
+				rc += 1 + EncodingUtils.encodedLongStringLength((String) value);
+			} else if (value instanceof char[]) {
+				rc += 1 + EncodingUtils.encodedLongStringLength((char[]) value);
+			} else if (value instanceof Integer) {
+				rc += 1 + 4;
+			} else if (value instanceof Long) {
+				rc += 1 + 4;
+			} else {
+				throw new IllegalArgumentException("Unsupported type in field table: " + value.getClass());
+			}
+
+		}
+		return rc;
+	}
+    
+    
+	/////////////////////////////////////////////////////////////////////////
+	//
+	// HANDLE Marhsalling ContentHeaderProperties objects
+	//
+	/////////////////////////////////////////////////////////////////////////		
+    static final int CONTENT_TYPE_FLAG = 1 << 15;
+    static final int ENCODING_FLAG = 1 << 14;
+    static final int HEADERS_FLAG = 1 << 13;
+    static final int DELIVERY_MODE_FLAG = 1 << 12;
+    static final int PRIORITY_FLAG = 1 << 11;
+    static final int CORRELATION_ID_FLAG = 1 << 10;
+    static final int REPLY_TO_FLAG = 1 << 9;
+    static final int EXPIRATION_FLAG = 1 << 8;
+    static final int MESSAGE_ID_FLAG = 1 << 7;
+    static final int TIMESTAMP_FLAG = 1 << 6;
+    static final int TYPE_FLAG = 1 << 5;
+    static final int USER_ID_FLAG = 1 << 4;
+    static final int APP_ID_FLAG = 1 << 3;
+    static final int CLUSTER_ID_FLAG = 1 << 2;
+
+    public static int getContentHeaderPropertiesSize(BasicContentHeaderProperties properties) {
+        int size = 2;        
+        if( properties.contentType != null ) {        	
+        	size += EncodingUtils.encodedShortStringLength(properties.contentType);
+        }
+        if( properties.encoding != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.encoding);
+        }
+        if( properties.headers != null ) {
+            size += EncodingUtils.encodedFieldTableLength(properties.headers);
+        }
+        if( properties.deliveryMode != 0 ) {
+            size += 1;
+        }
+        if( properties.priority != 0 ) {
+            size += 1;
+        }
+        if( properties.correlationId != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.correlationId);
+        }
+        if( properties.replyTo != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.replyTo);
+        }
+        if( properties.expiration != 0 ) {
+            size += EncodingUtils.encodedShortStringLength(String.valueOf(properties.expiration));
+        }
+        if( properties.messageId != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.messageId);
+        }
+        if( properties.timestamp != 0 ) {
+        	size += 8;
+        }
+        if( properties.type != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.type);
+        }
+        if( properties.userId != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.userId);
+        }
+        if( properties.appId != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.appId);
+        }
+        if( properties.clusterId != null ) {
+            size += EncodingUtils.encodedShortStringLength(properties.clusterId);
+        }
+        
+        return size;
+	}
+		
+    static public void marshalContentHeaderProperties(DataOutput buffer, BasicContentHeaderProperties properties) throws IOException
+    {
+    	int propertyFlags=0;
+        if( properties.contentType != null ) {        	
+            propertyFlags |= CONTENT_TYPE_FLAG;
+        }
+        if( properties.encoding != null ) {
+            propertyFlags |= ENCODING_FLAG;
+        }
+        if( properties.headers != null ) {
+            propertyFlags |= HEADERS_FLAG;
+        }
+        if( properties.deliveryMode != 0 ) {
+            propertyFlags |= DELIVERY_MODE_FLAG;
+        }
+        if( properties.priority != 0 ) {
+            propertyFlags |= PRIORITY_FLAG;
+        }
+        if( properties.correlationId != null ) {
+            propertyFlags |= CORRELATION_ID_FLAG;
+        }
+        if( properties.replyTo != null ) {
+            propertyFlags |= REPLY_TO_FLAG;
+        }
+        if( properties.expiration != 0 ) {
+            propertyFlags |= EXPIRATION_FLAG;
+        }
+        if( properties.messageId != null ) {
+            propertyFlags |= MESSAGE_ID_FLAG;
+        }
+        if( properties.timestamp != 0 ) {
+            propertyFlags |= TIMESTAMP_FLAG;
+        }
+        if( properties.type != null ) {
+            propertyFlags |= TYPE_FLAG;
+        }
+        if( properties.userId != null ) {
+            propertyFlags |= USER_ID_FLAG;
+        }
+        if( properties.appId != null ) {
+            propertyFlags |= APP_ID_FLAG;
+        }
+        if( properties.clusterId != null ) {
+            propertyFlags |= CLUSTER_ID_FLAG;
+        }
+        
+        EncodingUtils.writeUnsignedShort(buffer, propertyFlags);
+
+        if( properties.contentType != null ) {        	
+            EncodingUtils.writeShortStringBytes(buffer, properties.contentType);
+        }
+        if( properties.encoding != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.encoding);
+        }
+        if( properties.headers != null ) {
+            EncodingUtils.writeFieldTableBytes(buffer, properties.headers);
+        }
+        if( properties.deliveryMode != 0 ) {
+            buffer.writeByte(properties.deliveryMode);
+        }
+        if( properties.priority != 0 ) {
+            buffer.writeByte(properties.priority);
+        }
+        if( properties.correlationId != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.correlationId);
+        }
+        if( properties.replyTo != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.replyTo);
+        }
+        if( properties.expiration != 0 ) {
+            EncodingUtils.writeShortStringBytes(buffer, String.valueOf(properties.expiration));
+        }
+        if( properties.messageId != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.messageId);
+        }
+        if( properties.timestamp != 0 ) {
+            EncodingUtils.writeTimestamp(buffer, properties.timestamp);
+        }
+        if( properties.type != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.type);
+        }
+        if( properties.userId != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.userId);
+        }
+        if( properties.appId != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.appId);
+        }
+        if( properties.clusterId != null ) {
+            EncodingUtils.writeShortStringBytes(buffer, properties.clusterId);
+        }
+    }
+    
+    static public void unmarshalContentHeaderProperties(DataInput buffer, BasicContentHeaderProperties properties) throws IOException
+    {
+    	int propertyFlags = EncodingUtils.readUnsignedShort(buffer);
+
+    	properties.contentType = ((propertyFlags & CONTENT_TYPE_FLAG) > 0) ?
+        	 EncodingUtils.readShortString(buffer) : null;
+        properties.encoding = ((propertyFlags & ENCODING_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.headers = ((propertyFlags & HEADERS_FLAG) > 0) ?
+        	EncodingUtils.readFieldTable(buffer) : null;
+    	properties.deliveryMode =  ((propertyFlags & DELIVERY_MODE_FLAG) > 0) ?
+        	buffer.readByte() : 0;
+    	properties.priority =  ((propertyFlags & PRIORITY_FLAG) > 0) ?
+        	buffer.readByte() : 0;
+    	properties.correlationId =  ((propertyFlags & CORRELATION_ID_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.replyTo =  ((propertyFlags & REPLY_TO_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.expiration = ((propertyFlags & EXPIRATION_FLAG) > 0) ?
+        	Long.parseLong(EncodingUtils.readShortString(buffer)) : 0;
+    	properties.messageId = ((propertyFlags & MESSAGE_ID_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.timestamp = ((propertyFlags & TIMESTAMP_FLAG) > 0) ?
+        	EncodingUtils.readTimestamp(buffer) : 0;
+    	properties.type = ((propertyFlags & TYPE_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.userId = ((propertyFlags & USER_ID_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.appId = ((propertyFlags & APP_ID_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    	properties.clusterId = ((propertyFlags & CLUSTER_ID_FLAG) > 0) ?
+        	EncodingUtils.readShortString(buffer) : null;
+    }
+
+}

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,93 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class ExchangeDeclareBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 40; 	
+    public static final int METHOD_ID = 10; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new ExchangeDeclareBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        ExchangeDeclareBody object = (ExchangeDeclareBody)o;
+        
+        return
+        2 /*ticket*/+
+            EncodingUtils.encodedShortStringLength(object.exchange)+
+            EncodingUtils.encodedShortStringLength(object.type)+
+            1 /*passive*/+
+            0 /*durable*/+
+            0 /*autoDelete*/+
+            0 /*internal*/+
+            0 /*nowait*/+
+            EncodingUtils.encodedFieldTableLength(object.arguments)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeclareBody object = (ExchangeDeclareBody)o;
+        EncodingUtils.writeUnsignedShort(buffer, object.ticket);
+            EncodingUtils.writeShortStringBytes(buffer, object.exchange);
+            EncodingUtils.writeShortStringBytes(buffer, object.type);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.passive, object.durable, object.autoDelete, object.internal, object.nowait});
+            EncodingUtils.writeFieldTableBytes(buffer, object.arguments);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeclareBody object = (ExchangeDeclareBody)o;
+        object.ticket = EncodingUtils.readUnsignedShort(buffer);
+        object.exchange = EncodingUtils.readShortString(buffer);
+        object.type = EncodingUtils.readShortString(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.passive = bools[0];
+        object.durable = bools[1];
+        object.autoDelete = bools[2];
+        object.internal = bools[3];
+        object.nowait = bools[4];
+        object.arguments = EncodingUtils.readFieldTable(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeclareOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class ExchangeDeclareOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 40; 	
+    public static final int METHOD_ID = 11; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new ExchangeDeclareOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        ExchangeDeclareOkBody object = (ExchangeDeclareOkBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeclareOkBody object = (ExchangeDeclareOkBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeclareOkBody object = (ExchangeDeclareOkBody)o;
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,81 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class ExchangeDeleteBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 40; 	
+    public static final int METHOD_ID = 20; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new ExchangeDeleteBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        ExchangeDeleteBody object = (ExchangeDeleteBody)o;
+        
+        return
+        2 /*ticket*/+
+            EncodingUtils.encodedShortStringLength(object.exchange)+
+            1 /*ifUnused*/+
+            0 /*nowait*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeleteBody object = (ExchangeDeleteBody)o;
+        EncodingUtils.writeUnsignedShort(buffer, object.ticket);
+            EncodingUtils.writeShortStringBytes(buffer, object.exchange);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.ifUnused, object.nowait});
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeleteBody object = (ExchangeDeleteBody)o;
+        object.ticket = EncodingUtils.readUnsignedShort(buffer);
+        object.exchange = EncodingUtils.readShortString(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.ifUnused = bools[0];
+        object.nowait = bools[1];
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/ExchangeDeleteOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class ExchangeDeleteOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 40; 	
+    public static final int METHOD_ID = 21; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new ExchangeDeleteOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        ExchangeDeleteOkBody object = (ExchangeDeleteOkBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeleteOkBody object = (ExchangeDeleteOkBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        ExchangeDeleteOkBody object = (ExchangeDeleteOkBody)o;
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileAckBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileAckBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileAckBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileAckBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileAckBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 90; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileAckBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileAckBody object = (FileAckBody)o;
+        
+        return
+        8 /*deliveryTag*/+
+            1 /*multiple*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileAckBody object = (FileAckBody)o;
+        buffer.writeLong(object.deliveryTag);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.multiple});
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileAckBody object = (FileAckBody)o;
+        object.deliveryTag = buffer.readLong();
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.multiple = bools[0];
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileCancelBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 30; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileCancelBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileCancelBody object = (FileCancelBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.consumerTag)+
+            1 /*nowait*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileCancelBody object = (FileCancelBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.consumerTag);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.nowait});
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileCancelBody object = (FileCancelBody)o;
+        object.consumerTag = EncodingUtils.readShortString(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.nowait = bools[0];
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileCancelOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,73 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileCancelOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 31; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileCancelOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileCancelOkBody object = (FileCancelOkBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.consumerTag)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileCancelOkBody object = (FileCancelOkBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.consumerTag);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileCancelOkBody object = (FileCancelOkBody)o;
+        object.consumerTag = EncodingUtils.readShortString(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,88 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileConsumeBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 20; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileConsumeBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileConsumeBody object = (FileConsumeBody)o;
+        
+        return
+        2 /*ticket*/+
+            EncodingUtils.encodedShortStringLength(object.queue)+
+            EncodingUtils.encodedShortStringLength(object.consumerTag)+
+            1 /*noLocal*/+
+            0 /*noAck*/+
+            0 /*exclusive*/+
+            0 /*nowait*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileConsumeBody object = (FileConsumeBody)o;
+        EncodingUtils.writeUnsignedShort(buffer, object.ticket);
+            EncodingUtils.writeShortStringBytes(buffer, object.queue);
+            EncodingUtils.writeShortStringBytes(buffer, object.consumerTag);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.noLocal, object.noAck, object.exclusive, object.nowait});
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileConsumeBody object = (FileConsumeBody)o;
+        object.ticket = EncodingUtils.readUnsignedShort(buffer);
+        object.queue = EncodingUtils.readShortString(buffer);
+        object.consumerTag = EncodingUtils.readShortString(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.noLocal = bools[0];
+        object.noAck = bools[1];
+        object.exclusive = bools[2];
+        object.nowait = bools[3];
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileConsumeOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,73 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileConsumeOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 21; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileConsumeOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileConsumeOkBody object = (FileConsumeOkBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.consumerTag)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileConsumeOkBody object = (FileConsumeOkBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.consumerTag);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileConsumeOkBody object = (FileConsumeOkBody)o;
+        object.consumerTag = EncodingUtils.readShortString(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileDeliverBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileDeliverBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileDeliverBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileDeliverBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,88 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileDeliverBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 80; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileDeliverBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileDeliverBody object = (FileDeliverBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.consumerTag)+
+            8 /*deliveryTag*/+
+            1 /*redelivered*/+
+            EncodingUtils.encodedShortStringLength(object.exchange)+
+            EncodingUtils.encodedShortStringLength(object.routingKey)+
+            EncodingUtils.encodedShortStringLength(object.identifier)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileDeliverBody object = (FileDeliverBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.consumerTag);
+            buffer.writeLong(object.deliveryTag);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.redelivered});
+            EncodingUtils.writeShortStringBytes(buffer, object.exchange);
+            EncodingUtils.writeShortStringBytes(buffer, object.routingKey);
+            EncodingUtils.writeShortStringBytes(buffer, object.identifier);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileDeliverBody object = (FileDeliverBody)o;
+        object.consumerTag = EncodingUtils.readShortString(buffer);
+        object.deliveryTag = buffer.readLong();
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.redelivered = bools[0];
+        object.exchange = EncodingUtils.readShortString(buffer);
+        object.routingKey = EncodingUtils.readShortString(buffer);
+        object.identifier = EncodingUtils.readShortString(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileOpenBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 40; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileOpenBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileOpenBody object = (FileOpenBody)o;
+        
+        return
+        EncodingUtils.encodedShortStringLength(object.identifier)+
+            8 /*contentSize*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileOpenBody object = (FileOpenBody)o;
+        EncodingUtils.writeShortStringBytes(buffer, object.identifier);
+            buffer.writeLong(object.contentSize);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileOpenBody object = (FileOpenBody)o;
+        object.identifier = EncodingUtils.readShortString(buffer);
+        object.contentSize = buffer.readLong();
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileOpenOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,73 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileOpenOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 41; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileOpenOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileOpenOkBody object = (FileOpenOkBody)o;
+        
+        return
+        8 /*stagedSize*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileOpenOkBody object = (FileOpenOkBody)o;
+        buffer.writeLong(object.stagedSize);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileOpenOkBody object = (FileOpenOkBody)o;
+        object.stagedSize = buffer.readLong();
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FilePublishBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FilePublishBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FilePublishBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FilePublishBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,87 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FilePublishBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 60; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FilePublishBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FilePublishBody object = (FilePublishBody)o;
+        
+        return
+        2 /*ticket*/+
+            EncodingUtils.encodedShortStringLength(object.exchange)+
+            EncodingUtils.encodedShortStringLength(object.routingKey)+
+            1 /*mandatory*/+
+            0 /*immediate*/+
+            EncodingUtils.encodedShortStringLength(object.identifier)		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FilePublishBody object = (FilePublishBody)o;
+        EncodingUtils.writeUnsignedShort(buffer, object.ticket);
+            EncodingUtils.writeShortStringBytes(buffer, object.exchange);
+            EncodingUtils.writeShortStringBytes(buffer, object.routingKey);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.mandatory, object.immediate});
+            EncodingUtils.writeShortStringBytes(buffer, object.identifier);
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FilePublishBody object = (FilePublishBody)o;
+        object.ticket = EncodingUtils.readUnsignedShort(buffer);
+        object.exchange = EncodingUtils.readShortString(buffer);
+        object.routingKey = EncodingUtils.readShortString(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.mandatory = bools[0];
+        object.immediate = bools[1];
+        object.identifier = EncodingUtils.readShortString(buffer);
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,79 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileQosBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 10; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileQosBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileQosBody object = (FileQosBody)o;
+        
+        return
+        4 /*prefetchSize*/+
+            2 /*prefetchCount*/+
+            1 /*global*/		 
+        ;
+         
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileQosBody object = (FileQosBody)o;
+        EncodingUtils.writeUnsignedInteger(buffer, object.prefetchSize);
+            EncodingUtils.writeUnsignedShort(buffer, object.prefetchCount);
+            EncodingUtils.writeBooleans(buffer, new boolean[]{ object.global});
+            		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileQosBody object = (FileQosBody)o;
+        object.prefetchSize = EncodingUtils.readUnsignedInteger(buffer);
+        object.prefetchCount = EncodingUtils.readUnsignedShort(buffer);
+        boolean[] bools = EncodingUtils.readBooleans(buffer);object.global = bools[0];
+        		 
+    }
+} 

Added: incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosOkBodyMarshaller.java
URL: http://svn.apache.org/viewvc/incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosOkBodyMarshaller.java?view=auto&rev=468441
==============================================================================
--- incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosOkBodyMarshaller.java (added)
+++ incubator/activemq/sandbox/qpid/src/main/java/org/apache/activemq/amqp/wireformat/v0_80/FileQosOkBodyMarshaller.java Fri Oct 27 09:18:49 2006
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+    
+package org.apache.activemq.amqp.wireformat.v0_80;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.activemq.amqp.command.*;
+import org.apache.activemq.amqp.wireformat.*;
+
+/**
+ * This class is autogenerated, do not modify. [From AMQ protocol 0.80 (major=0, minor=80)]
+ */
+public class FileQosOkBodyMarshaller extends MethodBodyMarshaller
+{ 
+    public static final int CLASS_ID = 70; 	
+    public static final int METHOD_ID = 11; 	
+
+    protected int getClazz()
+    {
+        return CLASS_ID;
+    }
+   
+    protected int getMethod()
+    {
+        return METHOD_ID;
+    }
+
+	public MethodBody createBody() {
+		return new FileQosOkBody();
+	}
+
+    protected int getBodySize(MethodBody o)
+    {
+        FileQosOkBody object = (FileQosOkBody)o;
+        return 0; 
+    }
+
+    public void writeMethodPayload(DataOutput buffer, MethodBody o) throws IOException
+    {
+        FileQosOkBody object = (FileQosOkBody)o;
+        		 
+    }
+
+    public void populateMethodBodyFromBuffer(DataInput buffer, MethodBody o) throws IOException
+    {
+        FileQosOkBody object = (FileQosOkBody)o;
+        		 
+    }
+} 



Mime
View raw message