You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2007/04/12 18:04:10 UTC

svn commit: r527999 - in /incubator/qpid/trunk/qpid/java/common: ./ src/main/java/org/apache/qpid/ src/main/java/org/apache/qpid/codec/ src/main/java/org/apache/qpid/common/ src/main/java/org/apache/qpid/configuration/ src/main/java/org/apache/qpid/fra...

Author: rgodfrey
Date: Thu Apr 12 09:04:05 2007
New Revision: 527999

URL: http://svn.apache.org/viewvc?view=rev&rev=527999
Log:
Unbreaking trunk due to erroneous commit

Modified:
    incubator/qpid/trunk/qpid/java/common/protocol-version.xml
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/common/ClientProperties.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/MethodConverter_8_0.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/MessagePublishInfoConverter.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/PoolingFilter.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java
    incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java

Modified: incubator/qpid/trunk/qpid/java/common/protocol-version.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/protocol-version.xml?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/protocol-version.xml (original)
+++ incubator/qpid/trunk/qpid/java/common/protocol-version.xml Thu Apr 12 09:04:05 2007
@@ -33,12 +33,9 @@
   <target name="generate" depends="compile_generator,check_generate_deps" unless="generation.notRequired">
     <mkdir dir="${generated.dir}"/>
     <java classname="org.apache.qpid.gentools.Main" fork="true" dir="${gentools.home}/src" failonerror="true">
-    	<arg line="-j -o ${generated.dir} -t templates ${xml.spec.list}" />
+    	<arg line="-j -o ${generated.dir} -t ${gentools.home}/templ.java ${xml.spec.list}" />
         <classpath>
           <pathelement path="${gentools.home}/src" />
-			    <fileset dir="${gentools.home}/lib">
-					<include name="**/*.jar"/>
-				</fileset>
         </classpath>
     </java>
     <touch file="${generated.timestamp}" />

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java Thu Apr 12 09:04:05 2007
@@ -23,8 +23,6 @@
 import org.apache.qpid.framing.AMQFrame;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.ChannelCloseBody;
-import org.apache.qpid.framing.amqp_8_0.ConnectionCloseBodyImpl;
-import org.apache.qpid.framing.amqp_8_0.ChannelCloseBodyImpl;
 import org.apache.qpid.protocol.AMQConstant;
 
 public class AMQChannelException extends AMQException
@@ -55,6 +53,6 @@
 
     public AMQFrame getCloseFrame(int channel)
     {
-        return new AMQFrame(channel, new ChannelCloseBodyImpl(getErrorCode().getCode(), new AMQShortString(getMessage()),0,0));        
+        return ChannelCloseBody.createAMQFrame(channel, major, minor, _classId, _methodId, getErrorCode().getCode(), new AMQShortString(getMessage()));
     }
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java Thu Apr 12 09:04:05 2007
@@ -24,7 +24,6 @@
 import org.apache.qpid.framing.AMQFrame;
 import org.apache.qpid.framing.AMQShortString;
 import org.apache.qpid.framing.ConnectionCloseBody;
-import org.apache.qpid.framing.amqp_8_0.ConnectionCloseBodyImpl;
 import org.apache.qpid.protocol.AMQConstant;
 
 public class AMQConnectionException extends AMQException
@@ -58,7 +57,7 @@
 
     public AMQFrame getCloseFrame(int channel)
     {
-        return new AMQFrame(channel, new ConnectionCloseBodyImpl(getErrorCode().getCode(), new AMQShortString(getMessage()),_classId,_methodId));        
+        return ConnectionCloseBody.createAMQFrame(channel, major, minor, _classId, _methodId, getErrorCode().getCode(), new AMQShortString(getMessage()));
     }
 
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java Thu Apr 12 09:04:05 2007
@@ -7,9 +7,9 @@
  * 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
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid;
 
+import org.apache.log4j.Logger;
 import org.apache.qpid.protocol.AMQConstant;
 
 /** Generic AMQ exception. */
@@ -30,14 +31,14 @@
     public AMQException(String message)
     {
         super(message);
-        // fixme This method needs removed and all AMQExceptions need a valid error code
+        //fixme This method needs removed and all AMQExceptions need a valid error code
         _errorCode = AMQConstant.getConstant(-1);
     }
 
     public AMQException(String msg, Throwable t)
     {
         super(msg, t);
-        // fixme This method needs removed and all AMQExceptions need a valid error code
+        //fixme This method needs removed and all AMQExceptions need a valid error code
         _errorCode = AMQConstant.getConstant(-1);
     }
 
@@ -51,6 +52,24 @@
     {
         super(msg + " [error code " + errorCode + ']');
         _errorCode = errorCode;
+    }
+
+    public AMQException(Logger logger, String msg, Throwable t)
+    {
+        this(msg, t);
+        logger.error(getMessage(), this);
+    }
+
+    public AMQException(Logger logger, String msg)
+    {
+        this(msg);
+        logger.error(getMessage(), this);
+    }
+
+    public AMQException(Logger logger, AMQConstant errorCode, String msg)
+    {
+        this(errorCode, msg);
+        logger.error(getMessage(), this);
     }
 
     public AMQConstant getErrorCode()

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java Thu Apr 12 09:04:05 2007
@@ -48,21 +48,13 @@
 
     protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
     {
-        try
+        if (_expectProtocolInitiation)
         {
-            if (_expectProtocolInitiation)
-            {
-                return doDecodePI(session, in, out);
-            }
-            else
-            {
-                return doDecodeDataBlock(session, in, out);
-            }
+            return doDecodePI(session, in, out);
         }
-        catch (Exception e)
+        else
         {
-            e.printStackTrace();
-            throw e;
+            return doDecodeDataBlock(session, in, out);
         }
     }
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/common/ClientProperties.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/common/ClientProperties.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/common/ClientProperties.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/common/ClientProperties.java Thu Apr 12 09:04:05 2007
@@ -20,28 +20,10 @@
  */
 package org.apache.qpid.common;
 
-import org.apache.qpid.framing.AMQShortString;
-
 public enum ClientProperties
 {
-
-
     instance,
     product,
     version,
-    platform;
-
-
-    private final AMQShortString _name;
-
-    private ClientProperties()
-    {
-        _name = new AMQShortString(toString());
-    }
-
-    public AMQShortString getName()
-    {
-        return _name;
-    }
-
+    platform
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java Thu Apr 12 09:04:05 2007
@@ -7,9 +7,9 @@
  * 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
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid.configuration;
 
+import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.protocol.AMQConstant;
 
@@ -46,5 +47,20 @@
     public PropertyException(AMQConstant errorCode, String msg)
     {
         super(errorCode, msg);
+    }
+
+    public PropertyException(Logger logger, String msg, Throwable t)
+    {
+        super(logger, msg, t);
+    }
+
+    public PropertyException(Logger logger, String msg)
+    {
+        super(logger, msg);
+    }
+
+    public PropertyException(Logger logger, AMQConstant errorCode, String msg)
+    {
+        super(logger, errorCode, msg);
     }
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java Thu Apr 12 09:04:05 2007
@@ -1,36 +1,39 @@
-/*
- *
- * 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.qpid.framing;
-
-import org.apache.mina.common.ByteBuffer;
-
-public interface AMQBody
-{
-    byte getFrameType();
-
-    /**
-     * Get the size of the body
-     * @return unsigned short
-     */
-    int getSize();
-
-    void writePayload(ByteBuffer buffer);
-}
+/*
+ *
+ * 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.qpid.framing;
+
+import org.apache.mina.common.ByteBuffer;
+
+public abstract class AMQBody
+{
+    public abstract byte getFrameType();
+    
+    /** 
+     * Get the size of the body
+     * @return unsigned short
+     */
+    protected abstract int getSize();
+    
+    protected abstract void writePayload(ByteBuffer buffer);
+    
+    protected abstract void populateFromBuffer(ByteBuffer buffer, long size)
+        throws AMQFrameDecodingException, AMQProtocolVersionException;        
+}

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java Thu Apr 12 09:04:05 2007
@@ -72,7 +72,7 @@
         final byte type = in.get();
 
         BodyFactory bodyFactory;
-        if(type == AMQMethodBodyImpl.TYPE)
+        if(type == AMQMethodBody.TYPE)
         {
             bodyFactory = (BodyFactory) session.getAttribute(SESSION_METHOD_BODY_FACTORY);
             if(bodyFactory == null)

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java Thu Apr 12 09:04:05 2007
@@ -7,9 +7,9 @@
  * 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
@@ -20,6 +20,7 @@
  */
 package org.apache.qpid.framing;
 
+import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 
 public class AMQFrameDecodingException extends AMQException
@@ -33,4 +34,15 @@
     {
         super(message, t);
     }
+
+    public AMQFrameDecodingException(Logger log, String message)
+    {
+        super(log, message);
+    }
+
+    public AMQFrameDecodingException(Logger log, String message, Throwable t)
+    {
+        super(log, message, t);
+    }
+
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java Thu Apr 12 09:04:05 2007
@@ -1,28 +1,132 @@
-package org.apache.qpid.framing;
-
-import org.apache.qpid.AMQChannelException;
-import org.apache.qpid.AMQConnectionException;
-import org.apache.qpid.protocol.AMQConstant;
-
-/**
- * Created by IntelliJ IDEA.
- * User: U146758
- * Date: 08-Mar-2007
- * Time: 11:30:28
- * To change this template use File | Settings | File Templates.
- */
-public interface AMQMethodBody extends AMQBody
-{
-    public int getClazz();
-    public int getMethod();
-    
-    AMQChannelException getChannelNotFoundException(int channelId);
-
-    AMQChannelException getChannelException(AMQConstant code, String message);
-
-    AMQChannelException getChannelException(AMQConstant code, String message, Throwable cause);
-
-    AMQConnectionException getConnectionException(AMQConstant code, String message);
-
-    AMQConnectionException getConnectionException(AMQConstant code, String message, Throwable cause);
-}
+/*
+ *
+ * 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.qpid.framing;
+
+import org.apache.mina.common.ByteBuffer;
+import org.apache.qpid.AMQChannelException;
+import org.apache.qpid.AMQConnectionException;
+import org.apache.qpid.protocol.AMQConstant;
+
+public abstract class AMQMethodBody extends AMQBody
+{
+    public static final byte TYPE = 1;
+
+    /** AMQP version */
+    protected byte major;
+    protected byte minor;
+
+    public byte getMajor()
+    {
+        return major;
+    }
+
+    public byte getMinor()
+    {
+        return minor;
+    }
+
+    public AMQMethodBody(byte major, byte minor)
+    {
+        this.major = major;
+        this.minor = minor;
+    }
+
+    /** unsigned short */
+    protected abstract int getBodySize();
+
+    /** @return unsigned short */
+    protected abstract int getClazz();
+
+    /** @return unsigned short */
+    protected abstract int getMethod();
+
+    protected abstract void writeMethodPayload(ByteBuffer buffer);
+
+    public byte getFrameType()
+    {
+        return TYPE;
+    }
+
+    protected int getSize()
+    {
+        return 2 + 2 + getBodySize();
+    }
+
+    protected void writePayload(ByteBuffer buffer)
+    {
+        EncodingUtils.writeUnsignedShort(buffer, getClazz());
+        EncodingUtils.writeUnsignedShort(buffer, getMethod());
+        writeMethodPayload(buffer);
+    }
+
+    protected abstract void populateMethodBodyFromBuffer(ByteBuffer buffer) throws AMQFrameDecodingException;
+
+    protected void populateFromBuffer(ByteBuffer buffer, long size) throws AMQFrameDecodingException
+    {
+        populateMethodBodyFromBuffer(buffer);
+    }
+
+    public String toString()
+    {
+        StringBuffer buf = new StringBuffer(getClass().getName());
+        buf.append("[ Class: ").append(getClazz());
+        buf.append(" Method: ").append(getMethod()).append(']');
+        return buf.toString();
+    }
+
+    /**
+     * Creates an AMQChannelException for the corresponding body type (a channel exception should include the class and
+     * method ids of the body it resulted from).
+     */
+
+    /**
+     * Convenience Method to create a channel not found exception
+     *
+     * @param channelId The channel id that is not found
+     *
+     * @return new AMQChannelException
+     */
+    public AMQChannelException getChannelNotFoundException(int channelId)
+    {
+        return getChannelException(AMQConstant.NOT_FOUND, "Channel not found for id:" + channelId);
+    }
+
+    public AMQChannelException getChannelException(AMQConstant code, String message)
+    {
+        return new AMQChannelException(code, message, getClazz(), getMethod(), major, minor);
+    }
+
+    public AMQChannelException getChannelException(AMQConstant code, String message, Throwable cause)
+    {
+        return new AMQChannelException(code, message, getClazz(), getMethod(), major, minor, cause);
+    }
+
+    public AMQConnectionException getConnectionException(AMQConstant code, String message)
+    {
+        return new AMQConnectionException(code, message, getClazz(), getMethod(), major, minor);
+    }
+
+    public AMQConnectionException getConnectionException(AMQConstant code, String message, Throwable cause)
+    {
+        return new AMQConnectionException(code, message, getClazz(), getMethod(), major, minor, cause);
+    }
+
+}

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java Thu Apr 12 09:04:05 2007
@@ -37,6 +37,6 @@
 
     public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
     {
-        return _protocolSession.getRegistry().convertToBody(in, bodySize);
+        return _protocolSession.getRegistry().get((short)in.getUnsignedShort(), (short)in.getUnsignedShort(), in, bodySize);
     }
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java Thu Apr 12 09:04:05 2007
@@ -5,5 +5,6 @@
 
 public abstract interface AMQMethodBodyInstanceFactory
 {
-    public AMQMethodBody newInstance(ByteBuffer buffer, long size) throws AMQFrameDecodingException;
+    public AMQMethodBody newInstance(byte major, byte minor, ByteBuffer buffer, long size) throws AMQFrameDecodingException;
+    public AMQMethodBody newInstance(byte major, byte minor, int clazzID, int methodID, ByteBuffer buffer, long size) throws AMQFrameDecodingException;
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java Thu Apr 12 09:04:05 2007
@@ -22,7 +22,7 @@
 
 import org.apache.mina.common.ByteBuffer;
 
-public class ContentBody extends AMQBodyImpl
+public class ContentBody extends AMQBody
 {
     public static final byte TYPE = 3;
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java Thu Apr 12 09:04:05 2007
@@ -39,7 +39,7 @@
         _log.debug("Creating content body factory");
     }
 
-    public AMQBodyImpl createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+    public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
     {
         return new ContentBody(in, bodySize);
     }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java Thu Apr 12 09:04:05 2007
@@ -22,7 +22,7 @@
 
 import org.apache.mina.common.ByteBuffer;
 
-public class ContentHeaderBody extends AMQBodyImpl
+public class ContentHeaderBody extends AMQBody
 {
     public static final byte TYPE = 2;
 
@@ -110,7 +110,7 @@
         properties.writePropertyListPayload(buffer);
     }
 
-    public static AMQFrame createAMQFrame(int channelId, int classId, int weight, CommonContentHeaderProperties properties,
+    public static AMQFrame createAMQFrame(int channelId, int classId, int weight, BasicContentHeaderProperties properties,
                                           long bodySize)
     {
         return new AMQFrame(channelId, new ContentHeaderBody(classId, weight, properties, bodySize));

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java Thu Apr 12 09:04:05 2007
@@ -39,7 +39,7 @@
         _log.debug("Creating content header body factory");
     }
 
-    public AMQBodyImpl createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+    public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
     {
         // all content headers are the same - it is only the properties that differ.
         // the content header body further delegates construction of properties

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java Thu Apr 12 09:04:05 2007
@@ -20,8 +20,6 @@
  */
 package org.apache.qpid.framing;
 
-import org.apache.qpid.framing.amqp_8_0.BasicConsumeBodyImpl;
-
 import org.apache.mina.common.ByteBuffer;
 
 public class ContentHeaderPropertiesFactory
@@ -45,7 +43,7 @@
         // AMQP version change: "Hardwired" version to major=8, minor=0
         // TODO: Change so that the actual version is obtained from
         // the ProtocolInitiation object for this session.
-        if (classId == BasicConsumeBodyImpl.CLASS_ID)
+        if (classId == BasicConsumeBody.getClazz((byte)8, (byte)0))
         {
         	properties = new BasicContentHeaderProperties();
         }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java Thu Apr 12 09:04:05 2007
@@ -22,7 +22,7 @@
 
 import org.apache.mina.common.ByteBuffer;
 
-public class HeartbeatBody extends AMQBodyImpl
+public class HeartbeatBody extends AMQBody
 {
     public static final byte TYPE = 8;
     public static AMQFrame FRAME = new HeartbeatBody().toFrame();
@@ -46,12 +46,12 @@
         return TYPE;
     }
 
-    public int getSize()
+    protected int getSize()
     {
         return 0;//heartbeats we generate have no payload
     }
 
-    public void writePayload(ByteBuffer buffer)
+    protected void writePayload(ByteBuffer buffer)
     {
     }
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java Thu Apr 12 09:04:05 2007
@@ -24,7 +24,7 @@
 
 public class HeartbeatBodyFactory implements BodyFactory
 {
-    public AMQBodyImpl createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+    public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
     {
         return new HeartbeatBody();
     }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/MethodConverter_8_0.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/MethodConverter_8_0.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/MethodConverter_8_0.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/MethodConverter_8_0.java Thu Apr 12 09:04:05 2007
@@ -4,7 +4,6 @@
 import org.apache.qpid.framing.abstraction.ContentChunk;
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.framing.abstraction.AbstractMethodConverter;
-import org.apache.qpid.framing.amqp_8_0.BasicPublishBodyImpl;
 
 import org.apache.mina.common.ByteBuffer;
 
@@ -20,7 +19,7 @@
 
     }
 
-    public AMQBodyImpl convertToBody(ContentChunk contentChunk)
+    public AMQBody convertToBody(ContentChunk contentChunk)
     {
         return new ContentBody(contentChunk.getData());
     }
@@ -53,8 +52,8 @@
     public void configure()
     {
 
-        _basicPublishClassId = BasicPublishBodyImpl.CLASS_ID;
-        _basicPublishMethodId = BasicPublishBodyImpl.METHOD_ID;
+        _basicPublishClassId = BasicPublishBody.getClazz(getProtocolMajorVersion(),getProtocolMinorVersion());
+        _basicPublishMethodId = BasicPublishBody.getMethod(getProtocolMajorVersion(),getProtocolMinorVersion());
                 
     }
 
@@ -88,15 +87,18 @@
 
     }
 
-    public AMQMethodBodyImpl convertToBody(MessagePublishInfo info)
+    public AMQMethodBody convertToBody(MessagePublishInfo info)
     {
 
-        return new BasicPublishBodyImpl(0, // ticket
-                                        info.getExchange(),
-                                        info.getRoutingKey(),
+        return new BasicPublishBody(getProtocolMajorVersion(),
+                                    getProtocolMinorVersion(),
+                                    _basicPublishClassId,
+                                    _basicPublishMethodId,
+                                    info.getExchange(),
+                                    info.isImmediate(),
                                     info.isMandatory(),
-                                    info.isImmediate()
-                                    ) ;
+                                    info.getRoutingKey(),
+                                    0) ; // ticket
 
     }
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java Thu Apr 12 09:04:05 2007
@@ -20,16 +20,16 @@
  */
 package org.apache.qpid.framing;
 
-import org.apache.log4j.Logger;
+import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
 
+import org.apache.log4j.Logger;
 import org.apache.mina.common.ByteBuffer;
 
-import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
-
 public class VersionSpecificRegistry
 {
     private static final Logger _log = Logger.getLogger(VersionSpecificRegistry.class);
 
+
     private final byte _protocolMajorVersion;
     private final byte _protocolMinorVersion;
 
@@ -48,31 +48,26 @@
         _protocolVersionConverter = loadProtocolVersionConverters(major, minor);
     }
 
-    private static ProtocolVersionMethodConverter loadProtocolVersionConverters(byte protocolMajorVersion,
-        byte protocolMinorVersion)
+    private static ProtocolVersionMethodConverter loadProtocolVersionConverters(byte protocolMajorVersion, byte protocolMinorVersion)
     {
         try
         {
             Class<ProtocolVersionMethodConverter> versionMethodConverterClass =
-                (Class<ProtocolVersionMethodConverter>) Class.forName("org.apache.qpid.framing.MethodConverter_"
-                    + protocolMajorVersion + "_" + protocolMinorVersion);
-
+                    (Class<ProtocolVersionMethodConverter>) Class.forName("org.apache.qpid.framing.MethodConverter_"+protocolMajorVersion + "_" + protocolMinorVersion);
             return versionMethodConverterClass.newInstance();
 
         }
         catch (ClassNotFoundException e)
         {
             _log.warn("Could not find protocol conversion classes for " + protocolMajorVersion + "-" + protocolMinorVersion);
-            if (protocolMinorVersion != 0)
+            if(protocolMinorVersion != 0)
             {
                 protocolMinorVersion--;
-
                 return loadProtocolVersionConverters(protocolMajorVersion, protocolMinorVersion);
             }
             else if (protocolMajorVersion != 0)
             {
                 protocolMajorVersion--;
-
                 return loadProtocolVersionConverters(protocolMajorVersion, protocolMinorVersion);
             }
             else
@@ -80,6 +75,7 @@
                 return null;
             }
 
+
         }
         catch (IllegalAccessException e)
         {
@@ -87,7 +83,7 @@
         }
         catch (InstantiationException e)
         {
-            throw new IllegalStateException("Unable to load protocol version converter: ", e);
+             throw new IllegalStateException("Unable to load protocol version converter: ", e);
         }
     }
 
@@ -119,67 +115,72 @@
 
     public void registerMethod(final short classID, final short methodID, final AMQMethodBodyInstanceFactory instanceFactory)
     {
-        if (_registry.length <= classID)
+        if(_registry.length <= classID)
         {
             AMQMethodBodyInstanceFactory[][] oldRegistry = _registry;
-            _registry = new AMQMethodBodyInstanceFactory[classID + 1][];
+            _registry = new AMQMethodBodyInstanceFactory[classID+1][];
             System.arraycopy(oldRegistry, 0, _registry, 0, oldRegistry.length);
         }
 
-        if (_registry[classID] == null)
+        if(_registry[classID] == null)
         {
-            _registry[classID] =
-                new AMQMethodBodyInstanceFactory[(methodID > DEFAULT_MAX_METHOD_ID) ? (methodID + 1)
-                                                                                    : (DEFAULT_MAX_METHOD_ID + 1)];
+            _registry[classID] = new AMQMethodBodyInstanceFactory[methodID > DEFAULT_MAX_METHOD_ID ? methodID + 1 : DEFAULT_MAX_METHOD_ID + 1];
         }
-        else if (_registry[classID].length <= methodID)
+        else if(_registry[classID].length <= methodID)
         {
             AMQMethodBodyInstanceFactory[] oldMethods = _registry[classID];
-            _registry[classID] = new AMQMethodBodyInstanceFactory[methodID + 1];
-            System.arraycopy(oldMethods, 0, _registry[classID], 0, oldMethods.length);
+            _registry[classID] = new AMQMethodBodyInstanceFactory[methodID+1];
+            System.arraycopy(oldMethods,0,_registry[classID],0,oldMethods.length);
         }
 
         _registry[classID][methodID] = instanceFactory;
 
     }
 
-    public AMQMethodBody get(short classID, short methodID, ByteBuffer in, long size) throws AMQFrameDecodingException
+
+    public AMQMethodBody get(short classID, short methodID, ByteBuffer in, long size)
+        throws AMQFrameDecodingException
     {
         AMQMethodBodyInstanceFactory bodyFactory;
         try
         {
             bodyFactory = _registry[classID][methodID];
         }
-        catch (NullPointerException e)
+        catch(NullPointerException e)
         {
-            throw new AMQFrameDecodingException("Class " + classID + " unknown in AMQP version " + _protocolMajorVersion
-                + "-" + _protocolMinorVersion + " (while trying to decode class " + classID + " method " + methodID + ".");
+            throw new AMQFrameDecodingException(_log,
+                "Class " + classID + " unknown in AMQP version " + _protocolMajorVersion + "-" + _protocolMinorVersion
+                 + " (while trying to decode class " + classID + " method " + methodID + ".");
         }
-        catch (IndexOutOfBoundsException e)
+        catch(IndexOutOfBoundsException e)
         {
-            if (classID >= _registry.length)
+            if(classID >= _registry.length)
             {
-                throw new AMQFrameDecodingException("Class " + classID + " unknown in AMQP version " + _protocolMajorVersion
-                    + "-" + _protocolMinorVersion + " (while trying to decode class " + classID + " method " + methodID
-                    + ".");
+                throw new AMQFrameDecodingException(_log,
+                    "Class " + classID + " unknown in AMQP version " + _protocolMajorVersion + "-" + _protocolMinorVersion
+                     + " (while trying to decode class " + classID + " method " + methodID + ".");
 
             }
             else
             {
-                throw new AMQFrameDecodingException("Method " + methodID + " unknown in AMQP version "
-                    + _protocolMajorVersion + "-" + _protocolMinorVersion + " (while trying to decode class " + classID
-                    + " method " + methodID + ".");
+                throw new AMQFrameDecodingException(_log,
+                    "Method " + methodID + " unknown in AMQP version " + _protocolMajorVersion + "-" + _protocolMinorVersion
+                     + " (while trying to decode class " + classID + " method " + methodID + ".");
 
             }
         }
 
+
         if (bodyFactory == null)
         {
-            throw new AMQFrameDecodingException("Method " + methodID + " unknown in AMQP version " + _protocolMajorVersion
-                + "-" + _protocolMinorVersion + " (while trying to decode class " + classID + " method " + methodID + ".");
+            throw new AMQFrameDecodingException(_log,
+                "Method " + methodID + " unknown in AMQP version " + _protocolMajorVersion + "-" + _protocolMinorVersion
+                 + " (while trying to decode class " + classID + " method " + methodID + ".");
         }
 
-        return bodyFactory.newInstance(in, size);
+
+        return bodyFactory.newInstance(_protocolMajorVersion, _protocolMinorVersion, classID, methodID, in, size);
+
 
     }
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/MessagePublishInfoConverter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/MessagePublishInfoConverter.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/MessagePublishInfoConverter.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/MessagePublishInfoConverter.java Thu Apr 12 09:04:05 2007
@@ -18,13 +18,12 @@
 
 package org.apache.qpid.framing.abstraction;
 
-import org.apache.qpid.framing.AMQMethodBodyImpl;
 import org.apache.qpid.framing.AMQMethodBody;
 
 
 public interface MessagePublishInfoConverter
 {
     public MessagePublishInfo convertToInfo(AMQMethodBody body);
-    public AMQMethodBodyImpl convertToBody(MessagePublishInfo info);
+    public AMQMethodBody convertToBody(MessagePublishInfo info);
 
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java Thu Apr 12 09:04:05 2007
@@ -18,12 +18,11 @@
 
 package org.apache.qpid.framing.abstraction;
 
-import org.apache.qpid.framing.AMQBodyImpl;
 import org.apache.qpid.framing.AMQBody;
 
 public interface ProtocolVersionMethodConverter extends MessagePublishInfoConverter
 {
-    AMQBodyImpl convertToBody(ContentChunk contentBody);
+    AMQBody convertToBody(ContentChunk contentBody);
     ContentChunk convertToContentChunk(AMQBody body);
 
     void configure();

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/PoolingFilter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/PoolingFilter.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/PoolingFilter.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/pool/PoolingFilter.java Thu Apr 12 09:04:05 2007
@@ -136,7 +136,6 @@
     public void exceptionCaught(final NextFilter nextFilter, final IoSession session,
                                 final Throwable cause) throws Exception
     {
-        cause.printStackTrace();
             nextFilter.exceptionCaught(session,cause);
     }
 

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java Thu Apr 12 09:04:05 2007
@@ -20,7 +20,6 @@
  */
 package org.apache.qpid.protocol;
 
-import org.apache.qpid.framing.AMQMethodBodyImpl;
 import org.apache.qpid.framing.AMQMethodBody;
 
 /**

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java Thu Apr 12 09:04:05 2007
@@ -21,7 +21,6 @@
 package org.apache.qpid.protocol;
 
 import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQMethodBodyImpl;
 import org.apache.qpid.framing.AMQMethodBody;
 
 /**
@@ -33,6 +32,7 @@
     /**
      * Invoked when a method frame has been received
      * @param evt the event that contains the method and channel
+     * @param protocolSession the protocol session associated with the event
      * @return true if the handler has processed the method frame, false otherwise. Note
      * that this does not prohibit the method event being delivered to subsequent listeners
      * but can be used to determine if nobody has dealt with an incoming method frame.
@@ -40,7 +40,7 @@
      * to all registered listeners using the error() method (see below) allowing them to
      * perform cleanup if necessary.
      */
-    <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) throws AMQException;
+    <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) throws Exception;
 
     /**
      * Callback when an error has occurred. Allows listeners to clean up.

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java Thu Apr 12 09:04:05 2007
@@ -20,9 +20,9 @@
  */
 package org.apache.qpid.protocol;
 
-import org.apache.qpid.framing.MethodRegistry;
+import org.apache.qpid.framing.VersionSpecificRegistry;
 
 public interface AMQVersionAwareProtocolSession extends AMQProtocolWriter, ProtocolVersionAware
 {
-    public MethodRegistry getRegistry();
+    public VersionSpecificRegistry getRegistry();
 }

Modified: incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java?view=diff&rev=527999&r1=527998&r2=527999
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java (original)
+++ incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java Thu Apr 12 09:04:05 2007
@@ -20,10 +20,9 @@
  */
 package org.apache.qpid.protocol;
 
-import org.apache.qpid.framing.ProtocolVersion;
-
 public interface ProtocolVersionAware
 {
-    public ProtocolVersion getProtocolVersion();
+    public byte getProtocolMinorVersion();
 
+    public byte getProtocolMajorVersion();
 }