You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2007/01/12 15:31:22 UTC

svn commit: r495581 [2/2] - in /incubator/qpid/branches/qpid.0-9/java: broker/src/main/java/org/apache/qpid/server/ broker/src/main/java/org/apache/qpid/server/handler/ broker/src/main/java/org/apache/qpid/server/protocol/ broker/src/main/java/org/apac...

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -24,7 +24,6 @@
 import org.apache.qpid.AMQException;
 import org.apache.qpid.common.ClientProperties;
 import org.apache.qpid.common.QpidProperties;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
 import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.client.security.AMQCallbackHandler;
 import org.apache.qpid.client.security.CallbackHandlerRegistry;
@@ -35,6 +34,7 @@
 import org.apache.qpid.framing.ConnectionStartOkBody;
 import org.apache.qpid.framing.FieldTable;
 import org.apache.qpid.framing.FieldTableFactory;
+import org.apache.qpid.protocol.AMQMethodEvent;
 
 import javax.security.sasl.Sasl;
 import javax.security.sasl.SaslClient;
@@ -59,7 +59,7 @@
     {
     }
 
-    public void methodReceived(AMQStateManager stateManager, AMQMethodEvent evt) throws AMQException
+    public void methodReceived(AMQStateManager stateManager, AMQProtocolSession protocolSession, AMQMethodEvent evt) throws AMQException
     {
         ConnectionStartBody body = (ConnectionStartBody) evt.getMethod();
 
@@ -81,25 +81,24 @@
                 throw new AMQException("No supported security mechanism found, passed: " + new String(body.mechanisms));
             }
 
-            final AMQProtocolSession ps = evt.getProtocolSession();
             byte[] saslResponse;
             try
             {
                 SaslClient sc = Sasl.createSaslClient(new String[]{mechanism},
                                                       null, "AMQP", "localhost",
-                                                      null, createCallbackHandler(mechanism, ps));
+                                                      null, createCallbackHandler(mechanism, protocolSession));
                 if (sc == null)
                 {
                     throw new AMQException("Client SASL configuration error: no SaslClient could be created for mechanism " +
                                            mechanism + ". Please ensure all factories are registered. See DynamicSaslRegistrar for " +
                                            " details of how to register non-standard SASL client providers.");
                 }
-                ps.setSaslClient(sc);
+                protocolSession.setSaslClient(sc);
                 saslResponse = (sc.hasInitialResponse() ? sc.evaluateChallenge(new byte[0]) : null);
             }
             catch (SaslException e)
             {
-                ps.setSaslClient(null);
+                protocolSession.setSaslClient(null);
                 throw new AMQException("Unable to create SASL client: " + e, e);
             }
 
@@ -122,14 +121,14 @@
             stateManager.changeState(AMQState.CONNECTION_NOT_TUNED);
             FieldTable clientProperties = FieldTableFactory.newFieldTable();
             
-            clientProperties.put(ClientProperties.instance.toString(), ps.getClientID());
+            clientProperties.put(ClientProperties.instance.toString(), protocolSession.getClientID());
             clientProperties.put(ClientProperties.product.toString(), QpidProperties.getProductName());
             clientProperties.put(ClientProperties.version.toString(), QpidProperties.getReleaseVersion());
             clientProperties.put(ClientProperties.platform.toString(), getFullSystemInfo());
             // AMQP version change: Hardwire the version to 0-9 (major=0, minor=9)
             // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
             // Be aware of possible changes to parameter order as versions change.
-            ps.writeFrame(ConnectionStartOkBody.createAMQFrame(evt.getChannelId(),
+            protocolSession.writeFrame(ConnectionStartOkBody.createAMQFrame(evt.getChannelId(),
                 (byte)0, (byte)9,	// AMQP version (major, minor)
                 clientProperties,	// clientProperties
                 selectedLocale,	// locale

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionTuneMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionTuneMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionTuneMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionTuneMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -23,7 +23,6 @@
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.client.ConnectionTuneParameters;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
 import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.client.state.AMQState;
 import org.apache.qpid.client.state.AMQStateManager;
@@ -32,6 +31,7 @@
 import org.apache.qpid.framing.ConnectionTuneBody;
 import org.apache.qpid.framing.ConnectionTuneOkBody;
 import org.apache.qpid.framing.AMQFrame;
+import org.apache.qpid.protocol.AMQMethodEvent;
 
 public class ConnectionTuneMethodHandler implements StateAwareMethodListener
 {
@@ -48,13 +48,12 @@
     {
     }
 
-    public void methodReceived(AMQStateManager stateManager, AMQMethodEvent evt) throws AMQException
+    public void methodReceived(AMQStateManager stateManager, AMQProtocolSession protocolSession, AMQMethodEvent evt) throws AMQException
     {
         _logger.debug("ConnectionTune frame received");
         ConnectionTuneBody frame = (ConnectionTuneBody) evt.getMethod();
-        AMQProtocolSession session = evt.getProtocolSession();
 
-        ConnectionTuneParameters params = session.getConnectionTuneParameters();
+        ConnectionTuneParameters params = protocolSession.getConnectionTuneParameters();
         if (params == null)
         {
             params = new ConnectionTuneParameters();
@@ -63,11 +62,11 @@
         params.setFrameMax(frame.frameMax);        
         params.setChannelMax(frame.channelMax);
         params.setHeartbeat(Integer.getInteger("amqj.heartbeat.delay", frame.heartbeat));
-        session.setConnectionTuneParameters(params);
+        protocolSession.setConnectionTuneParameters(params);
 
         stateManager.changeState(AMQState.CONNECTION_NOT_OPENED);
-        session.writeFrame(createTuneOkFrame(evt.getChannelId(), params));
-        session.writeFrame(createConnectionOpenFrame(evt.getChannelId(), session.getAMQConnection().getVirtualHost(), null, true));
+        protocolSession.writeFrame(createTuneOkFrame(evt.getChannelId(), params));
+        protocolSession.writeFrame(createConnectionOpenFrame(evt.getChannelId(), session.getAMQConnection().getVirtualHost(), null, true));
     }
 
     protected AMQFrame createConnectionOpenFrame(int channel, String path, String capabilities, boolean insist)

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/ExchangeBoundOkMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -19,10 +19,11 @@
 
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.client.state.AMQStateManager;
 import org.apache.qpid.client.state.StateAwareMethodListener;
 import org.apache.qpid.framing.ExchangeBoundOkBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 
 /**
  * @author Apache Software Foundation
@@ -41,7 +42,7 @@
      {
      }
 
-     public void methodReceived(AMQStateManager stateManager, AMQMethodEvent evt) throws AMQException
+     public void methodReceived(AMQStateManager stateManager, AMQProtocolSession protocolSession, AMQMethodEvent evt) throws AMQException
      {
          if (_logger.isDebugEnabled())
          {

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageAppendMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageAppendMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageAppendMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageAppendMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageAppendBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageAppendMethodHandler implements StateAwareMethodListener
+{
+    private static MessageAppendMethodHandler _instance = new MessageAppendMethodHandler();
+
+    public static MessageAppendMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageAppendMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageAppendBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCheckpointMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCheckpointMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCheckpointMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCheckpointMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageCheckpointBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageCheckpointMethodHandler implements StateAwareMethodListener
+{
+    private static MessageCheckpointMethodHandler _instance = new MessageCheckpointMethodHandler();
+
+    public static MessageCheckpointMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageCheckpointMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageCheckpointBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCloseMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCloseMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCloseMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageCloseMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageCloseBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageCloseMethodHandler implements StateAwareMethodListener
+{
+    private static MessageCloseMethodHandler _instance = new MessageCloseMethodHandler();
+
+    public static MessageCloseMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageCloseMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageCloseBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageEmptyMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageEmptyMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageEmptyMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageEmptyMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageEmptyBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageEmptyMethodHandler implements StateAwareMethodListener
+{
+    private static MessageEmptyMethodHandler _instance = new MessageEmptyMethodHandler();
+
+    public static MessageEmptyMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageEmptyMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageEmptyBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOffsetMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOffsetMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOffsetMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOffsetMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageOffsetBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageOffsetMethodHandler implements StateAwareMethodListener
+{
+    private static MessageOffsetMethodHandler _instance = new MessageOffsetMethodHandler();
+
+    public static MessageOffsetMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageOffsetMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageOffsetBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOkMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOkMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOkMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOkMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageOkBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageOkMethodHandler implements StateAwareMethodListener
+{
+    private static MessageOkMethodHandler _instance = new MessageOkMethodHandler();
+
+    public static MessageOkMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageOkMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageOkBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOpenMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOpenMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOpenMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageOpenMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageOpenBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageOpenMethodHandler implements StateAwareMethodListener
+{
+    private static MessageOpenMethodHandler _instance = new MessageOpenMethodHandler();
+
+    public static MessageOpenMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageOpenMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageOpenBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageRejectMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageRejectMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageRejectMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageRejectMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageRejectBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageRejectMethodHandler implements StateAwareMethodListener
+{
+    private static MessageRejectMethodHandler _instance = new MessageRejectMethodHandler();
+
+    public static MessageRejectMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageRejectMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageRejectBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageResumeMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageResumeMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageResumeMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageResumeMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageResumeBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageResumeMethodHandler implements StateAwareMethodListener
+{
+    private static MessageResumeMethodHandler _instance = new MessageResumeMethodHandler();
+
+    public static MessageResumeMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageResumeMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageResumeBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Added: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/MessageTransferMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.server.handler;
+
+import org.apache.qpid.AMQException;
+import org.apache.qpid.framing.MessageTransferBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
+import org.apache.qpid.client.state.AMQStateManager;
+import org.apache.qpid.client.state.StateAwareMethodListener;
+
+public class MessageTransferMethodHandler implements StateAwareMethodListener
+{
+    private static MessageTransferMethodHandler _instance = new MessageTransferMethodHandler();
+
+    public static MessageTransferMethodHandler getInstance()
+    {
+        return _instance;
+    }
+
+    private MessageTransferMethodHandler() {}
+    
+    
+    public void methodReceived (AMQStateManager stateManager,
+                                AMQProtocolSession protocolSession,
+                               	AMQMethodEvent<MessageTransferBody> evt)
+                                throws AMQException
+    {
+		// TODO
+    }
+}
+

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/handler/QueueDeleteOkMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -17,11 +17,12 @@
  */
 package org.apache.qpid.client.handler;
 
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.client.state.StateAwareMethodListener;
 import org.apache.qpid.client.state.AMQStateManager;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.QueueDeleteOkBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.log4j.Logger;
 
 /**
@@ -41,7 +42,7 @@
      {
      }
 
-     public void methodReceived(AMQStateManager stateManager, AMQMethodEvent evt) throws AMQException
+     public void methodReceived(AMQStateManager stateManager, AMQProtocolSession protocolSession, AMQMethodEvent evt) throws AMQException
      {
          if (_logger.isDebugEnabled())
          {

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQMethodListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQMethodListener.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQMethodListener.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQMethodListener.java Fri Jan 12 06:31:18 2007
@@ -21,6 +21,8 @@
 package org.apache.qpid.client.protocol;
 
 import org.apache.qpid.AMQException;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 
 public interface AMQMethodListener
 {
@@ -34,7 +36,7 @@
      * to all registered listeners using the error() method (see below) allowing them to
      * perform cleanup if necessary.
      */
-    boolean methodReceived(AMQMethodEvent evt) throws AMQException;
+    boolean methodReceived(AMQMethodEvent evt, AMQProtocolSession protocolSession) throws AMQException;
 
     /**
      * Callback when an error has occurred. Allows listeners to clean up.

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java Fri Jan 12 06:31:18 2007
@@ -46,6 +46,7 @@
 import org.apache.qpid.framing.ContentHeaderBody;
 import org.apache.qpid.framing.HeartbeatBody;
 import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.ssl.BogusSSLContextFactory;
 
 import java.util.Iterator;
@@ -313,14 +314,14 @@
                 _logger.debug("Method frame received: " + frame);
             }
 
-            final AMQMethodEvent evt = new AMQMethodEvent(frame.channel, (AMQMethodBody) frame.bodyFrame, _protocolSession);
+            final AMQMethodEvent<AMQMethodBody> evt = new AMQMethodEvent<AMQMethodBody>(frame.channel, (AMQMethodBody) frame.bodyFrame);
             try
             {
                 boolean wasAnyoneInterested = false;
                 while (it.hasNext())
                 {
                     final AMQMethodListener listener = (AMQMethodListener) it.next();
-                    wasAnyoneInterested = listener.methodReceived(evt) || wasAnyoneInterested;
+                    wasAnyoneInterested = listener.methodReceived(evt, _protocolSession) || wasAnyoneInterested;
                 }
                 if (!wasAnyoneInterested)
                 {

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java Fri Jan 12 06:31:18 2007
@@ -22,6 +22,8 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 
 public abstract class BlockingMethodFrameListener implements AMQMethodListener
 {
@@ -53,7 +55,7 @@
      * @return true if the listener has dealt with this frame
      * @throws AMQException
      */
-    public boolean methodReceived(AMQMethodEvent evt) throws AMQException
+    public boolean methodReceived(AMQMethodEvent evt, AMQProtocolSession protocolSession) throws AMQException
     {
         AMQMethodBody method = evt.getMethod();
 

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/AMQStateManager.java Fri Jan 12 06:31:18 2007
@@ -21,9 +21,10 @@
 package org.apache.qpid.client.state;
 
 import org.apache.qpid.AMQException;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.client.handler.*;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
 import org.apache.qpid.client.protocol.AMQMethodListener;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.framing.*;
 import org.apache.log4j.Logger;
 
@@ -101,9 +102,16 @@
         frame2handlerMap.put(ChannelCloseBody.class, ChannelCloseMethodHandler.getInstance());
         frame2handlerMap.put(ChannelCloseOkBody.class, ChannelCloseOkMethodHandler.getInstance());
         frame2handlerMap.put(ConnectionCloseBody.class, ConnectionCloseMethodHandler.getInstance());
-        frame2handlerMap.put(BasicDeliverBody.class, BasicDeliverMethodHandler.getInstance());
-        frame2handlerMap.put(BasicReturnBody.class, BasicReturnMethodHandler.getInstance());
-        frame2handlerMap.put(BasicCancelOkBody.class, BasicCancelOkMethodHandler.getInstance());
+        frame2handlerMap.put(MessageAppendBody.class, MessageAppendMethodHandler.getInstance());
+        frame2handlerMap.put(MessageCheckpointBody.class, MessageCheckpointMethodHandler.getInstance());
+        frame2handlerMap.put(MessageCloseBody.class, MessageCloseMethodHandler.getInstance());
+        frame2handlerMap.put(MessageEmptyBody.class, MessageEmptyMethodHandler.getInstance());
+        frame2handlerMap.put(MessageOffsetBody.class, MessageOffsetMethodHandler.getInstance());
+        frame2handlerMap.put(MessageOkBody.class, MessageOkMethodHandler.getInstance());
+        frame2handlerMap.put(MessageOpenBody.class, MessageOpenMethodHandler.getInstance());
+        frame2handlerMap.put(MessageRejectBody.class, MessageRejectMethodHandler.getInstance());
+        frame2handlerMap.put(MessageResumeBody.class, MessageResumeMethodHandler.getInstance());
+        frame2handlerMap.put(MessageTransferBody.class, MessageTransferMethodHandler.getInstance());
         frame2handlerMap.put(ChannelFlowOkBody.class, ChannelFlowOkMethodHandler.getInstance());
         frame2handlerMap.put(QueueDeleteOkBody.class, QueueDeleteOkMethodHandler.getInstance());
         frame2handlerMap.put(ExchangeBoundOkBody.class, ExchangeBoundOkMethodHandler.getInstance());
@@ -146,12 +154,12 @@
         }
     }
 
-    public boolean methodReceived(AMQMethodEvent evt) throws AMQException
+    public boolean methodReceived(AMQMethodEvent evt, AMQProtocolSession protocolSession) throws AMQException
     {
         StateAwareMethodListener handler = findStateTransitionHandler(_currentState, evt.getMethod());
         if (handler != null)
         {
-            handler.methodReceived(this, evt);
+            handler.methodReceived(this, protocolSession, evt);
             return true;
         }
         return false;

Modified: incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/client/src/main/java/org/apache/qpid/client/state/StateAwareMethodListener.java Fri Jan 12 06:31:18 2007
@@ -20,7 +20,8 @@
  */
 package org.apache.qpid.client.state;
 
-import org.apache.qpid.client.protocol.AMQMethodEvent;
+import org.apache.qpid.protocol.AMQMethodEvent;
+import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.AMQException;
 
 /**
@@ -30,5 +31,6 @@
  */
 public interface StateAwareMethodListener
 {
-    void methodReceived(AMQStateManager stateManager, AMQMethodEvent evt) throws AMQException;
+    void methodReceived(AMQStateManager stateManager, AMQProtocolSession protocolSession,
+        AMQMethodEvent evt) throws AMQException;
 }

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/ClientAdapter.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/ClientAdapter.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/ClientAdapter.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/ClientAdapter.java Fri Jan 12 06:31:18 2007
@@ -23,10 +23,10 @@
 import org.apache.mina.common.IoSession;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.protocol.AMQMethodEvent;
 import org.apache.qpid.client.protocol.AMQProtocolSession;
 import org.apache.qpid.client.state.AMQStateManager;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 
 /**
  * Hack to assist with reuse of the client handlers for connection setup in
@@ -51,8 +51,8 @@
 
     public void handle(int channel, AMQMethodBody method) throws AMQException
     {
-        AMQMethodEvent evt = new AMQMethodEvent(channel, method, _session);
-        _stateMgr.methodReceived(evt);
+        AMQMethodEvent evt = new AMQMethodEvent(channel, method);
+        _stateMgr.methodReceived(evt, _session);
     }
 
     private class SessionAdapter extends AMQProtocolSession

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChainedClusterMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChainedClusterMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChainedClusterMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChainedClusterMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -24,7 +24,7 @@
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
 

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChannelQueueManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChannelQueueManager.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChannelQueueManager.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ChannelQueueManager.java Fri Jan 12 06:31:18 2007
@@ -25,7 +25,7 @@
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.util.LogMessage;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandler.java Fri Jan 12 06:31:18 2007
@@ -21,12 +21,12 @@
 package org.apache.qpid.server.cluster.handler;
 
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.state.StateAwareMethodListener;
 import org.apache.qpid.server.state.AMQStateManager;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.AMQException;
 

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandlerFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandlerFactory.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandlerFactory.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ClusterMethodHandlerFactory.java Fri Jan 12 06:31:18 2007
@@ -49,6 +49,7 @@
 import org.apache.qpid.framing.TxSelectBody;
 import org.apache.qpid.framing.TxCommitBody;
 import org.apache.qpid.framing.TxRollbackBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusterCapability;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.cluster.GroupManager;
@@ -76,7 +77,6 @@
 import org.apache.qpid.server.handler.TxSelectHandler;
 import org.apache.qpid.server.handler.TxCommitHandler;
 import org.apache.qpid.server.handler.TxRollbackHandler;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQState;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ExtendedHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ExtendedHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ExtendedHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ExtendedHandler.java Fri Jan 12 06:31:18 2007
@@ -22,8 +22,8 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/NullListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/NullListener.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/NullListener.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/NullListener.java Fri Jan 12 06:31:18 2007
@@ -22,8 +22,8 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/PeerHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/PeerHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/PeerHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/PeerHandler.java Fri Jan 12 06:31:18 2007
@@ -22,9 +22,9 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/QueueNameGenerator.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/QueueNameGenerator.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/QueueNameGenerator.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/QueueNameGenerator.java Fri Jan 12 06:31:18 2007
@@ -22,8 +22,8 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.QueueDeclareBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteCancelHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteCancelHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteCancelHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteCancelHandler.java Fri Jan 12 06:31:18 2007
@@ -23,9 +23,9 @@
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.BasicCancelBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.ClusteredQueue;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteConsumeHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteConsumeHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteConsumeHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/RemoteConsumeHandler.java Fri Jan 12 06:31:18 2007
@@ -24,9 +24,9 @@
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.BasicConsumeBody;
 import org.apache.qpid.framing.BasicConsumeOkBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.ClusteredQueue;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingConsumeHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingConsumeHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingConsumeHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingConsumeHandler.java Fri Jan 12 06:31:18 2007
@@ -22,12 +22,12 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.BasicConsumeBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.BroadcastPolicy;
 import org.apache.qpid.server.cluster.GroupManager;
 import org.apache.qpid.server.cluster.util.LogMessage;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
 import org.apache.qpid.server.handler.BasicConsumeMethodHandler;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.AMQQueue;
 import org.apache.qpid.server.queue.QueueRegistry;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingHandler.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingHandler.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/ReplicatingHandler.java Fri Jan 12 06:31:18 2007
@@ -23,6 +23,7 @@
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.BroadcastPolicy;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.cluster.GroupManager;
@@ -32,7 +33,6 @@
 import org.apache.qpid.server.cluster.SimpleSendable;
 import org.apache.qpid.server.cluster.policy.StandardPolicies;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/WrappedListener.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/WrappedListener.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/WrappedListener.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/handler/WrappedListener.java Fri Jan 12 06:31:18 2007
@@ -22,8 +22,8 @@
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/RecordingMethodHandlerFactory.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/RecordingMethodHandlerFactory.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/RecordingMethodHandlerFactory.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/RecordingMethodHandlerFactory.java Fri Jan 12 06:31:18 2007
@@ -29,11 +29,11 @@
 import org.apache.qpid.framing.QueueBindBody;
 import org.apache.qpid.framing.QueueDeclareBody;
 import org.apache.qpid.framing.QueueDeleteBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.MethodHandlerFactory;
 import org.apache.qpid.server.cluster.MethodHandlerRegistry;
 import org.apache.qpid.server.cluster.handler.WrappingMethodHandlerFactory;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQState;

Modified: incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/ReplayStore.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/ReplayStore.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/ReplayStore.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/cluster/src/main/java/org/apache/qpid/server/cluster/replay/ReplayStore.java Fri Jan 12 06:31:18 2007
@@ -31,11 +31,11 @@
 import org.apache.qpid.framing.ClusterSynchBody;
 import org.apache.qpid.framing.BasicConsumeBody;
 import org.apache.qpid.framing.BasicCancelBody;
+import org.apache.qpid.protocol.AMQMethodEvent;
 import org.apache.qpid.server.cluster.ClusteredProtocolSession;
 import org.apache.qpid.server.cluster.util.LogMessage;
 import org.apache.qpid.server.cluster.util.Bindings;
 import org.apache.qpid.server.exchange.ExchangeRegistry;
-import org.apache.qpid.server.protocol.AMQMethodEvent;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
 import org.apache.qpid.server.queue.QueueRegistry;
 import org.apache.qpid.server.state.AMQStateManager;

Modified: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQRequestBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQRequestBody.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQRequestBody.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQRequestBody.java Fri Jan 12 06:31:18 2007
@@ -33,11 +33,11 @@
     // Constructor
     public AMQRequestBody() {}
     public AMQRequestBody(long requestId, long responseMark,
-    		AMQMethodBody methodPayload)
+            AMQMethodBody methodPayload)
     {
-    	this.requestId = requestId;
-    	this.responseMark = responseMark;
-    	this.methodPayload = methodPayload;
+        this.requestId = requestId;
+        this.responseMark = responseMark;
+        this.methodPayload = methodPayload;
     }
 
 
@@ -49,42 +49,42 @@
     
     protected byte getFrameType()
     {
-    	return (byte)AmqpConstants.frameRequestAsInt();
+        return (byte)AmqpConstants.frameRequestAsInt();
     }
     
     protected int getSize()
     {
-    	return 8 + 8 + 4 + methodPayload.getBodySize();
+        return 8 + 8 + 4 + methodPayload.getBodySize();
     }
     
     protected void writePayload(ByteBuffer buffer)
     {
-    	EncodingUtils.writeLong(buffer, requestId);
-    	EncodingUtils.writeLong(buffer, responseMark);
-    	EncodingUtils.writeUnsignedShort(buffer, 0); // reserved, set to 0
+        EncodingUtils.writeLong(buffer, requestId);
+        EncodingUtils.writeLong(buffer, responseMark);
+        EncodingUtils.writeUnsignedShort(buffer, 0); // reserved, set to 0
         methodPayload.writePayload(buffer);
     }
     
     protected void populateFromBuffer(ByteBuffer buffer, long size)
         throws AMQFrameDecodingException, AMQProtocolVersionException
     {
-    	requestId = EncodingUtils.readLong(buffer);
-    	responseMark = EncodingUtils.readLong(buffer);
-    	int reserved = EncodingUtils.readShort(buffer); // reserved, throw away
-    	methodPayload.populateFromBuffer(buffer, size - 8 - 8 - 4);
+        requestId = EncodingUtils.readLong(buffer);
+        responseMark = EncodingUtils.readLong(buffer);
+        int reserved = EncodingUtils.readShort(buffer); // reserved, throw away
+        methodPayload.populateFromBuffer(buffer, size - 8 - 8 - 4);
     }
     
     public String toString()
     {
-    	return "Req[" + requestId + " " + responseMark + "] C" +
-        	methodPayload.getClazz() + " M" + methodPayload.getMethod();
+        return "Req[" + requestId + " " + responseMark + "] C" +
+            methodPayload.getClazz() + " M" + methodPayload.getMethod();
     }
     
     public static AMQFrame createAMQFrame(int channelId, long requestId,
             long responseMark, AMQMethodBody methodPayload)
     {
         AMQRequestBody requestFrame = new AMQRequestBody(requestId, responseMark,
-        	methodPayload);
+            methodPayload);
         AMQFrame frame = new AMQFrame();
         frame.channel = channelId;
         frame.bodyFrame = requestFrame;

Modified: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQResponseBody.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQResponseBody.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQResponseBody.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/AMQResponseBody.java Fri Jan 12 06:31:18 2007
@@ -33,9 +33,9 @@
     // Constructor
     public AMQResponseBody() {}
     public AMQResponseBody(long getResponseId, long getRequestId,
-    		int batchOffset, AMQMethodBody methodPayload)
+            int batchOffset, AMQMethodBody methodPayload)
     {
-    	this.responseId = responseId;
+        this.responseId = responseId;
         this.requestId = requestId;
         this.batchOffset = batchOffset;
         this.methodPayload = methodPayload;
@@ -49,12 +49,12 @@
     
     protected byte getFrameType()
     {
-    	return (byte)AmqpConstants.frameResponseAsInt();
+        return (byte)AmqpConstants.frameResponseAsInt();
     }
     
     protected int getSize()
     {
-    	return 8 + 8 + 4 + methodPayload.getBodySize();
+        return 8 + 8 + 4 + methodPayload.getBodySize();
     }
         
     protected void writePayload(ByteBuffer buffer)
@@ -76,15 +76,15 @@
     
     public String toString()
     {
-    	return "Res[" + responseId + " " + requestId + "-" + requestId + batchOffset + "] C" +
-        	methodPayload.getClazz() + " M" + methodPayload.getMethod();
+        return "Res[" + responseId + " " + requestId + "-" + requestId + batchOffset + "] C" +
+            methodPayload.getClazz() + " M" + methodPayload.getMethod();
     }
     
     public static AMQFrame createAMQFrame(int channelId, long responseId,
             long requestId, int batchOffset, AMQMethodBody methodPayload)
     {
         AMQResponseBody responseFrame = new AMQResponseBody(responseId,
-        	requestId, batchOffset, methodPayload);
+            requestId, batchOffset, methodPayload);
         AMQFrame frame = new AMQFrame();
         frame.channel = channelId;
         frame.bodyFrame = responseFrame;

Added: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestHandler.java?view=auto&rev=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestHandler.java (added)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestHandler.java Fri Jan 12 06:31:18 2007
@@ -0,0 +1,26 @@
+/*
+ *
+ * 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;
+
+public interface RequestHandler
+{
+	public boolean requestReceived(AMQRequestBody requestBody);
+}

Modified: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestManager.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestManager.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/RequestManager.java Fri Jan 12 06:31:18 2007
@@ -26,7 +26,7 @@
 
 public class RequestManager
 {
-	private int channel;
+    private int channel;
     AMQProtocolWriter protocolSession;
     
     /**
@@ -39,60 +39,60 @@
     /**
      * These keep track of the last requestId and responseId to be received.
      */
-    private long lastReceivedResponseId;
+    private long lastProcessedResponseId;
             
     private Hashtable<Long, AMQResponseCallback> requestSentMap;
     
-	public RequestManager(int channel, AMQProtocolWriter protocolSession)
+    public RequestManager(int channel, AMQProtocolWriter protocolSession)
     {
-    	this.channel = channel;
+        this.channel = channel;
         this.protocolSession = protocolSession;
-    	requestIdCount = 1L;
-        lastReceivedResponseId = 0L;
+        requestIdCount = 1L;
+        lastProcessedResponseId = 0L;
         requestSentMap = new Hashtable<Long, AMQResponseCallback>();
     }
     
     // *** Functions to originate a request ***
     
     public long sendRequest(AMQMethodBody requestMethodBody,
-    	AMQResponseCallback responseCallback)
+        AMQResponseCallback responseCallback)
     {
-    	long requestId = getNextRequestId(); // Get new request ID
-    	AMQFrame requestFrame = AMQRequestBody.createAMQFrame(channel, requestId,
-        	lastReceivedResponseId, requestMethodBody);
+        long requestId = getNextRequestId(); // Get new request ID
+        AMQFrame requestFrame = AMQRequestBody.createAMQFrame(channel, requestId,
+            lastProcessedResponseId, requestMethodBody);
         protocolSession.writeFrame(requestFrame);
         requestSentMap.put(requestId, responseCallback);
         return requestId;
     }
     
     public void responseReceived(AMQResponseBody responseBody)
-    	throws RequestResponseMappingException
+        throws RequestResponseMappingException
     {
-    	lastReceivedResponseId = responseBody.getResponseId();
         long requestIdStart = responseBody.getRequestId();
         long requestIdStop = requestIdStart + responseBody.getBatchOffset();
         for (long requestId = requestIdStart; requestId <= requestIdStop; requestId++)
         {
-        	AMQResponseCallback responseCallback = requestSentMap.get(requestId);
+            AMQResponseCallback responseCallback = requestSentMap.get(requestId);
             if (responseCallback == null)
-            	throw new RequestResponseMappingException(requestId,
-                	"Failed to locate requestId " + requestId + " in requestSentMap.");
+                throw new RequestResponseMappingException(requestId,
+                    "Failed to locate requestId " + requestId + " in requestSentMap.");
             responseCallback.responseFrameReceived(responseBody);
             requestSentMap.remove(requestId);
         }
+        lastProcessedResponseId = responseBody.getResponseId();
     }
     
     // *** Management functions ***
     
     public int requestsMapSize()
     {
-    	return requestSentMap.size();
+        return requestSentMap.size();
     }
         
     // *** Private helper functions ***
     
     private long getNextRequestId()
     {
-    	return requestIdCount++;
+        return requestIdCount++;
     }
 } 

Modified: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ResponseManager.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ResponseManager.java?view=diff&rev=495581&r1=495580&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ResponseManager.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/framing/ResponseManager.java Fri Jan 12 06:31:18 2007
@@ -28,10 +28,11 @@
 
 public class ResponseManager
 {
-	private int channel;
+    private int channel;
+    RequestHandler requestHandler;
     AMQProtocolWriter protocolSession;
 
-	/**
+    /**
      * Determines the batch behaviour of the manager.
      *
      * Responses are sent to the RequestResponseManager through sendResponse().
@@ -48,7 +49,7 @@
      * MANUAL: No response is sent until it is explicitly released by calling
      *     function xxxx(). (TODO)
      */
-	public enum batchResponseModeEnum { NONE }
+    public enum batchResponseModeEnum { NONE }
     private batchResponseModeEnum batchResponseMode;
     
     /**
@@ -70,79 +71,79 @@
     
     private class ResponseStatus implements Comparable<ResponseStatus>
     {
-     	public long requestId;
+         public long requestId;
         public AMQMethodBody responseMethodBody;
          
         public ResponseStatus(long requestId)
         {
-	       	this.requestId = requestId;
-        	responseMethodBody = null;
+               this.requestId = requestId;
+            responseMethodBody = null;
         }
          
         public int compareTo(ResponseStatus o)
         {
-        	return (int)(requestId - o.requestId);
+            return (int)(requestId - o.requestId);
         }
     }
     
     private Hashtable<Long, ResponseStatus> responseMap;
     
-	public ResponseManager(int channel, AMQProtocolWriter protocolSession)
+    public ResponseManager(int channel, RequestHandler requestHandler,
+        AMQProtocolWriter protocolSession)
     {
-    	this.channel = channel;
+        this.channel = channel;
+        this.requestHandler = requestHandler;
         this.protocolSession = protocolSession;
         responseIdCount = 1L;
         lastReceivedRequestId = 0L;
         responseMap = new Hashtable<Long, ResponseStatus>();
     }
     
-	// *** Functions to handle an incoming request ***
+    // *** Functions to handle an incoming request ***
     
     public void requestReceived(AMQRequestBody requestBody)
     {
-    	long requestId = requestBody.getRequestId();
+        long requestId = requestBody.getRequestId();
         // TODO: responseMark is used in HA, but until then, ignore...
         long responseMark = requestBody.getResponseMark();
-	    lastReceivedRequestId = requestId;
+        lastReceivedRequestId = requestId;
         responseMap.put(requestId, new ResponseStatus(requestId));
-        
-        // TODO: Initiate some action based on the MethodBody - like send to handlers,
-        // but how to do this in a way that will work for both client and server?
+        requestHandler.requestReceived(requestBody);
     }
     
     public void sendResponse(long requestId, AMQMethodBody responseMethodBody)
-    	throws RequestResponseMappingException
+        throws RequestResponseMappingException
     {
-    	ResponseStatus responseStatus = responseMap.get(requestId);
+        ResponseStatus responseStatus = responseMap.get(requestId);
         if (responseStatus == null)
-        	throw new RequestResponseMappingException(requestId,
-            	"Failed to locate requestId " + requestId + " in responseMap.");
+            throw new RequestResponseMappingException(requestId,
+                "Failed to locate requestId " + requestId + " in responseMap.");
         if (responseStatus.responseMethodBody != null)
-        	throw new RequestResponseMappingException(requestId, "RequestId " +
-            	requestId + " already has a response in responseMap.");
+            throw new RequestResponseMappingException(requestId, "RequestId " +
+                requestId + " already has a response in responseMap.");
         responseStatus.responseMethodBody = responseMethodBody;
         doBatches();
     }
     
     // *** Management functions ***
 
-	public batchResponseModeEnum getBatchResponseMode()
+    public batchResponseModeEnum getBatchResponseMode()
     {
-    	return batchResponseMode;
+        return batchResponseMode;
     }
     
     public void setBatchResponseMode(batchResponseModeEnum batchResponseMode)
     {
-    	if (this.batchResponseMode != batchResponseMode)
+        if (this.batchResponseMode != batchResponseMode)
         {
-    		this.batchResponseMode = batchResponseMode;
-        	doBatches();
+            this.batchResponseMode = batchResponseMode;
+            doBatches();
         }
     }
     
     public int responsesMapSize()
     {
-    	return responseMap.size();
+        return responseMap.size();
     }
     
     /**
@@ -153,12 +154,12 @@
      */
     public int outstandingResponses()
     {
-    	int cnt = 0;
+        int cnt = 0;
         for (Long requestId : responseMap.keySet())
         {
-        	if (responseMap.get(requestId).responseMethodBody == null)
-            	cnt++;
-		}
+            if (responseMap.get(requestId).responseMethodBody == null)
+                cnt++;
+        }
         return cnt;
     }
     
@@ -170,12 +171,12 @@
      */
     public int batchedResponses()
     {
-    	int cnt = 0;
+        int cnt = 0;
         for (Long requestId : responseMap.keySet())
         {
-        	if (responseMap.get(requestId).responseMethodBody != null)
-            	cnt++;
-		}
+            if (responseMap.get(requestId).responseMethodBody != null)
+                cnt++;
+        }
         return cnt;
     }
     
@@ -183,39 +184,39 @@
     
     private long getNextResponseId()
     {
-    	return responseIdCount++;
+        return responseIdCount++;
     }
     
     private void doBatches()
     {
-    	switch (batchResponseMode)
+        switch (batchResponseMode)
         {
-        	case NONE:
-            	Iterator<Long> lItr = responseMap.keySet().iterator();
-            	while (lItr.hasNext())
+            case NONE:
+                Iterator<Long> lItr = responseMap.keySet().iterator();
+                while (lItr.hasNext())
                 {
-                	long requestId = lItr.next();
-                	ResponseStatus responseStatus = responseMap.get(requestId);
-                	if (responseStatus.responseMethodBody != null)
+                    long requestId = lItr.next();
+                    ResponseStatus responseStatus = responseMap.get(requestId);
+                    if (responseStatus.responseMethodBody != null)
                     {
-                    	sendResponseBatch(requestId, 0, responseStatus.responseMethodBody);
+                        sendResponseBatch(requestId, 0, responseStatus.responseMethodBody);
                         lItr.remove();
                     }
                 }
-            	break;
+                break;
                 
             // TODO: Add additional batch mode handlers here...
-			// case DELAY_FIXED:
-			// case MANUAL:
+            // case DELAY_FIXED:
+            // case MANUAL:
         }
     }
     
     private void sendResponseBatch(long firstRequestId, int numAdditionalRequests,
-    	AMQMethodBody responseMethodBody)
+        AMQMethodBody responseMethodBody)
     {
-    	long responseId = getNextResponseId(); // Get new request ID
-    	AMQFrame responseFrame = AMQResponseBody.createAMQFrame(channel, responseId,
-        	firstRequestId, numAdditionalRequests, responseMethodBody);
+        long responseId = getNextResponseId(); // Get new request ID
+        AMQFrame responseFrame = AMQResponseBody.createAMQFrame(channel, responseId,
+            firstRequestId, numAdditionalRequests, responseMethodBody);
         protocolSession.writeFrame(responseFrame);
     }
 } 

Copied: incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java (from r495561, incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMethodEvent.java)
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java?view=diff&rev=495581&p1=incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMethodEvent.java&r1=495561&p2=incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java&r2=495581
==============================================================================
--- incubator/qpid/branches/qpid.0-9/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQMethodEvent.java (original)
+++ incubator/qpid/branches/qpid.0-9/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java Fri Jan 12 06:31:18 2007
@@ -18,7 +18,7 @@
  * under the License.
  *
  */
-package org.apache.qpid.server.protocol;
+package org.apache.qpid.protocol;
 
 import org.apache.qpid.framing.AMQMethodBody;