Author: rupertlssmith
Date: Mon May 14 04:47:13 2007
New Revision: 537789

URL: http://svn.apache.org/viewvc?view=rev&rev=537789
Log:
Merged revisions 
536571-536583,536586-536823,536825-537014,537016-537018,537020-537025,537027-537028,537030-537160,537162-537170,537172-537672,537674-537782
 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2

........
  r536571 | ritchiem | 2007-05-09 16:46:57 +0100 (Wed, 09 May 2007) | 1 line
  
  QPID-484 Provided default GC and easy customisation.. via setting 
QPID_JAVA_QC.
........
  r536573 | rgreig | 2007-05-09 16:48:11 +0100 (Wed, 09 May 2007) | 1 line
  
  Corrected mistaked in test parameters.
........
  r537782 | rupertlssmith | 2007-05-14 12:37:41 +0100 (Mon, 14 May 2007) | 1 
line
  
  Added to the Javadoc.
........

Modified:
    incubator/qpid/trunk/qpid/   (props changed)
    incubator/qpid/trunk/qpid/java/broker/bin/qpid-server
    incubator/qpid/trunk/qpid/java/common/bin/qpid-run
    
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.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/AMQProtocolWriter.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
    
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java
    
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/CoordinatingTestCase.java
    
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java

Propchange: incubator/qpid/trunk/qpid/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/qpid/trunk/qpid/java/broker/bin/qpid-server
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/broker/bin/qpid-server?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- incubator/qpid/trunk/qpid/java/broker/bin/qpid-server (original)
+++ incubator/qpid/trunk/qpid/java/broker/bin/qpid-server Mon May 14 04:47:13 
2007
@@ -25,6 +25,7 @@
 export JAVA=java \
        JAVA_VM=-server \
        JAVA_MEM=-Xmx1024m \
+       JAVA_GC=-XX:-UseConcMarkSweepGC
        QPID_CLASSPATH=$QPID_LIBS
 
 . qpid-run org.apache.qpid.server.Main "$@"

Modified: incubator/qpid/trunk/qpid/java/common/bin/qpid-run
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/bin/qpid-run?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- incubator/qpid/trunk/qpid/java/common/bin/qpid-run (original)
+++ incubator/qpid/trunk/qpid/java/common/bin/qpid-run Mon May 14 04:47:13 2007
@@ -114,6 +114,15 @@
     echo "Warning: Qpid classpath not set. CLASSPATH must include qpid jars."
 fi
 
+#Use QPID_JAVA_GC if set
+if [ -n "$QPID_JAVA_GC" ]; then
+    export JAVA_GC=$QPID_JAVA_GC
+    echo "Using QPID_JAVA_GC setting" $QPID_JAVA_GC
+else
+    echo "Info: QPID_JAVA_GC not set. Defaulting to JAVA_GC" $JAVA_GC
+fi
+
+
 #Use QPID_JAVA_MEM if set
 if [ -n "$QPID_JAVA_MEM" ]; then
     export JAVA_MEM=$QPID_JAVA_MEM
@@ -224,6 +233,6 @@
   JAVA=$(cygpath -u $JAVA)
 fi
 
-COMMAND=($JAVA $JAVA_VM $JAVA_MEM $SYSTEM_PROPS $JAVA_OPTS $QPID_OPTS "[EMAIL 
PROTECTED]")
+COMMAND=($JAVA $JAVA_VM $JAVA_GC $JAVA_MEM $SYSTEM_PROPS $JAVA_OPTS $QPID_OPTS 
"[EMAIL PROTECTED]")
 
 DISPATCH

Modified: 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
 Mon May 14 04:47:13 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
@@ -25,87 +25,165 @@
 
 import org.apache.qpid.framing.AMQShortString;
 
+/**
+ * Defines constants for AMQP codes and also acts as a factory for creating 
such constants from the raw codes. Each
+ * constant also defines a short human readable description of the constant.
+ *
+ * @todo Why would a constant be defined that is not in the map? Seems more 
natural that getConstant should raise an
+ *       exception for an unknown constant. Or else provide an explanation of 
why this is so. Also their is no way for
+ *       callers to determine the unknown status of a code except by comparing 
its name to "unknown code", which would
+ *       seem to render this scheme a little bit pointless?
+ *
+ * @todo Java has a nice enum construct for doing this sort of thing. Maybe 
this is done in the old style for Java 1.4
+ *       backward compatability? Now that is handled through retrotranslater 
it may be time to use enum.
+ *
+ * <p/><tabld id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Define the set of AMQP status codes.
+ * <tr><td> Provide a factory to lookup constants by their code.
+ * <tr><td>
+ */
 public final class AMQConstant
 {
-    private int _code;
-
-    private AMQShortString _name;
-
+    /** Defines a map from codes to constants. */
     private static Map _codeMap = new HashMap();
 
-    private AMQConstant(int code, String name, boolean map)
-    {
-        _code = code;
-        _name = new AMQShortString(name);
-        if (map)
-        {
-            _codeMap.put(new Integer(code), this);
-        }
-    }
-
-    public String toString()
-    {
-        return _code + ": " + _name;
-    }
-
-    public int getCode()
-    {
-        return _code;
-    }
-
-    public AMQShortString getName()
-    {
-        return _name;
-    }
-
-    public static final AMQConstant FRAME_MIN_SIZE = new AMQConstant(4096, 
"frame min size", true);
+    /** Indicates that the method completed successfully. */
+    public static final AMQConstant REPLY_SUCCESS = new AMQConstant(200, 
"reply success", true);
 
     public static final AMQConstant FRAME_END = new AMQConstant(206, "frame 
end", true);
 
-    public static final AMQConstant REPLY_SUCCESS = new AMQConstant(200, 
"reply success", true);
-
+    /**
+     * The client asked for a specific message that is no longer available. 
The message was delivered to another
+     * client, or was purged from the queue for some other reason.
+     */
     public static final AMQConstant NOT_DELIVERED = new AMQConstant(310, "not 
delivered", true);
 
+    /**
+     * The client attempted to transfer content larger than the server could 
accept at the present time.  The client
+     * may retry at a later time.
+     */
     public static final AMQConstant MESSAGE_TOO_LARGE = new AMQConstant(311, 
"message too large", true);
 
+    /**
+     * When the exchange cannot route the result of a .Publish, most likely 
due to an invalid routing key. Only when
+     * the mandatory flag is set.
+     */
     public static final AMQConstant NO_ROUTE = new AMQConstant(312, "no 
route", true);
 
+    /**
+     * When the exchange cannot deliver to a consumer when the immediate flag 
is set. As a result of pending data on
+     * the queue or the absence of any consumers of the queue.
+     */
     public static final AMQConstant NO_CONSUMERS = new AMQConstant(313, "no 
consumers", true);
 
+    /**
+     * An operator intervened to close the connection for some reason. The 
client may retry at some later date.
+     */
     public static final AMQConstant CONTEXT_IN_USE = new AMQConstant(320, 
"context in use", true);
 
+    /** The client tried to work with an unknown virtual host or cluster. */
     public static final AMQConstant INVALID_PATH = new AMQConstant(402, 
"invalid path", true);
 
+    /** The client attempted to work with a server entity to which it has no 
access due to security settings. */
     public static final AMQConstant ACCESS_REFUSED = new AMQConstant(403, 
"access refused", true);
 
+    /** The client attempted to work with a server entity that does not exist. 
*/
     public static final AMQConstant NOT_FOUND = new AMQConstant(404, "not 
found", true);
 
+    /**
+     * The client attempted to work with a server entity to which it has no 
access because another client is
+     * working with it.
+     */
     public static final AMQConstant ALREADY_EXISTS = new AMQConstant(405, 
"Already exists", true);
 
+    /** The client requested a method that was not allowed because some 
precondition failed. */
     public static final AMQConstant IN_USE = new AMQConstant(406, "In use", 
true);
 
     public static final AMQConstant INVALID_ROUTING_KEY = new AMQConstant(407, 
"routing key invalid", true);
 
     public static final AMQConstant REQUEST_TIMEOUT = new AMQConstant(408, 
"Request Timeout", true);
 
-    public static final AMQConstant INVALID_ARGUMENT = new AMQConstant(409, 
"argument invalid", true);        
+    public static final AMQConstant INVALID_ARGUMENT = new AMQConstant(409, 
"argument invalid", true);
 
+    /**
+     * The client sent a malformed frame that the server could not decode. 
This strongly implies a programming error
+     * in the client.
+     */
     public static final AMQConstant FRAME_ERROR = new AMQConstant(501, "frame 
error", true);
 
+    /**
+     * The client sent a frame that contained illegal values for one or more 
fields. This strongly implies a
+     * programming error in the client.
+     */
     public static final AMQConstant SYNTAX_ERROR = new AMQConstant(502, 
"syntax error", true);
 
+    /**
+     * The client sent an invalid sequence of frames, attempting to perform an 
operation that was considered invalid
+     * by the server. This usually implies a programming error in the client.
+     */
     public static final AMQConstant COMMAND_INVALID = new AMQConstant(503, 
"command invalid", true);
 
+    /**
+     * The client attempted to work with a channel that had not been correctly 
opened. This most likely indicates a
+     * fault in the client layer.
+     */
     public static final AMQConstant CHANNEL_ERROR = new AMQConstant(504, 
"channel error", true);
 
+    /**
+     * The server could not complete the method because it lacked sufficient 
resources. This may be due to the client
+     * creating too many of some type of entity.
+     */
     public static final AMQConstant RESOURCE_ERROR = new AMQConstant(506, 
"resource error", true);
 
+    /**
+     * The client tried to work with some entity in a manner that is 
prohibited by the server, due to security settings
+     * or by some other criteria.
+     */
     public static final AMQConstant NOT_ALLOWED = new AMQConstant(530, "not 
allowed", true);
 
+    /** The client tried to use functionality that is not implemented in the 
server. */
     public static final AMQConstant NOT_IMPLEMENTED = new AMQConstant(540, 
"not implemented", true);
 
+    /**
+     * The server could not complete the method because of an internal error. 
The server may require intervention by
+     * an operator in order to resume normal operations.
+     */
     public static final AMQConstant INTERNAL_ERROR = new AMQConstant(541, 
"internal error", true);
 
+    public static final AMQConstant FRAME_MIN_SIZE = new AMQConstant(4096, 
"frame min size", true);
+
+    /** The AMQP status code. */
+    private int _code;
+
+    /** A short description of the status code. */
+    private AMQShortString _name;
+
+    /**
+     * Creates a new AMQP status code.
+     *
+     * @param code The code.
+     * @param name A short description of the code.
+     * @param map  <tt>true</tt> to register the code as a known code, 
<tt>false</tt> otherwise.
+     */
+    private AMQConstant(int code, String name, boolean map)
+    {
+        _code = code;
+        _name = new AMQShortString(name);
+        if (map)
+        {
+            _codeMap.put(new Integer(code), this);
+        }
+    }
+
+    /**
+     * Creates a constant for a status code by looking up the code in the map 
of known codes. If the code is not known
+     * a constant is still created for it, but it is marked as unknown.
+     *
+     * @param code The AMQP status code.
+     *
+     * @return The AMQP status code encapsulated as a constant.
+     */
     public static AMQConstant getConstant(int code)
     {
         AMQConstant c = (AMQConstant) _codeMap.get(new Integer(code));
@@ -113,6 +191,37 @@
         {
             c = new AMQConstant(code, "unknown code", false);
         }
+
         return c;
+    }
+
+    /**
+     * Gets the underlying AMQP status code.
+     *
+     * @return The AMQP status code.
+     */
+    public int getCode()
+    {
+        return _code;
+    }
+
+    /**
+     * Gets a short description of the status code.
+     *
+     * @return A short description of the status code.
+     */
+    public AMQShortString getName()
+    {
+        return _name;
+    }
+
+    /**
+     * Renders the constant as a string, mainly for debugging purposes.
+     *
+     * @return The status code and its description.
+     */
+    public String toString()
+    {
+        return _code + ": " + _name;
     }
 }

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=537789&r1=537788&r2=537789
==============================================================================
--- 
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
 Mon May 14 04:47:13 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
@@ -23,43 +23,73 @@
 import org.apache.qpid.framing.AMQMethodBody;
 
 /**
- * An event that is passed to AMQMethodListeners describing a particular 
method.
- * It supplies the:
- * <ul><li>channel id</li>
+ * AMQMethodEvent encapsulates an AMQP method call, and the channel on which 
that method call occurred.
+ *
+ * <p/>Supplies the:
+ * <ul>
+ * <li>channel id</li>
  * <li>protocol method</li>
- * to listeners. This means that listeners do not need to be stateful.
+ * </ul>
  *
- * In the StateAwareMethodListener, other useful objects such as the protocol 
session
- * are made available.
- * 
+ * <p/>As the event contains the context in which it occurred, event listeners 
do not need to be statefull.
+ * to listeners. Events are often handled by [EMAIL PROTECTED] 
AMQMethodListener}s.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities <th> Collaborations
+ * <tr><td> Encapsulate an AMQP method call and the channel as the context for 
the method call.
+ * </table>
  */
 public class AMQMethodEvent<M extends AMQMethodBody>
 {
+    /** Holds the method call. */
     private final M _method;
 
+    /** Holds the channel handle for the method call. */
     private final int _channelId;
 
+    /**
+     * Creates a method event to encasulate a method call and channel.
+     *
+     * @param channelId The channel on which the method call occurred.
+     * @param method    The method call.
+     */
     public AMQMethodEvent(int channelId, M method)
     {
         _channelId = channelId;
         _method = method;
     }
 
+    /**
+     * Gets the method call.
+     *
+     * @return The method call.
+     */
     public M getMethod()
     {
         return _method;
     }
 
+    /**
+     * Gets the channel handle for the method call.
+     *
+     * @return The channel handle for the method call.
+     */
     public int getChannelId()
     {
         return _channelId;
     }
 
+    /**
+     * Prints the method call as a string, mainly for debugging purposes.
+     *
+     * @return The method call as a string, mainly for debugging purposes.
+     */
     public String toString()
     {
         StringBuilder buf = new StringBuilder("Method event: ");
         buf.append("\nChannel id: ").append(_channelId);
         buf.append("\nMethod: ").append(_method);
+
         return buf.toString();
     }
 }

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=537789&r1=537788&r2=537789
==============================================================================
--- 
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
 Mon May 14 04:47:13 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,31 +20,52 @@
  */
 package org.apache.qpid.protocol;
 
-import org.apache.qpid.AMQException;
 import org.apache.qpid.framing.AMQMethodBody;
 
 /**
- * Interface that allows classes to register for interest in protocol method 
frames.
- * 
+ * AMQMethodListener is a listener that receives notifications of AMQP 
methods. The methods are packaged as events in
+ * [EMAIL PROTECTED] AMQMethodEvent}.
+ *
+ * <p/>An event listener may be associated with a particular context, usually 
an AMQP channel, and in addition to
+ * receiving method events will be notified of errors on that context. This 
enables listeners to perform any clean
+ * up that they need to do before the context is closed.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities
+ * <tr><td> Accept notification of AMQP method events. <td> [EMAIL PROTECTED] 
AMQMethodEvent}
+ * <tr><td> Accept notification of errors on the event context.
+ * </table>
+ *
+ * @todo Document why the exception is passed to the error method. Is it so 
that the exception can be passed
+ *       from the event handling thread to another thread and rethown from 
there? It is unusual to pass exceptions as
+ *       method arguments, because they have their own mechanism for 
propagating through the call stack, so some
+ *       explanation ought to be provided.
  */
 public interface AMQMethodListener
 {
     /**
-     * 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.
-     * @throws AMQException if an error has occurred. This exception will be 
delivered
-     * to all registered listeners using the error() method (see below) 
allowing them to
-     * perform cleanup if necessary.
+     * Notifies the listener that an AMQP method event has occurred.
+     *
+     * @param evt The AMQP method event (contains the method and channel).
+     *
+     * @return <tt>true</tt> if the handler processes the method frame, 
<tt>false<tt> 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.
+     *
+     * @throws Exception if an error has occurred. This exception may be 
delivered to all registered listeners using
+     *         the error() method (see below) allowing them to perform cleanup 
if necessary.
+     *
+     * @todo Consider narrowing the exception.
      */
     <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) 
throws Exception;
 
     /**
-     * Callback when an error has occurred. Allows listeners to clean up.
-     * @param e
+     * Notifies the listener of an error on the event context to which it is 
listening. The listener should perform
+     * any necessary clean-up for the context.
+     *
+     * @param e The underlying exception that is the source of the error.
+     *
+     * @todo Consider narrowing the exception, or wrapping it.
      */
     void error(Exception e);
 }

Modified: 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java
 Mon May 14 04:47:13 2007
@@ -22,11 +22,22 @@
 
 import org.apache.qpid.framing.AMQDataBlock;
 
+/**
+ * AMQProtocolWriter provides a method to write a frame of data 'to the wire', 
in the context of the object
+ * that implements the method, usually some sort of session. The block of 
data, encapsulated by [EMAIL PROTECTED] AMQDataBlock},
+ * will be encoded as it is written.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities
+ * <tr><td> Write an encoded block of data to the write, in the context of a 
session.
+ * </table>
+ */
 public interface AMQProtocolWriter
 {
     /**
-     * Write a datablock, encoding where necessary (e.g. into a sequence of 
bytes)
-     * @param frame the frame to be encoded and written
+     * Writes a frame to the wire, encoding it as necessary, for example, into 
a sequence of bytes.
+     *
+     * @param frame The frame to be encoded and written.
      */
-       public void writeFrame(AMQDataBlock frame);
+    public void writeFrame(AMQDataBlock frame);
 }

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=537789&r1=537788&r2=537789
==============================================================================
--- 
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
 Mon May 14 04:47:13 2007
@@ -22,7 +22,25 @@
 
 import org.apache.qpid.framing.VersionSpecificRegistry;
 
+/**
+ * AMQVersionAwareProtocolSession is implemented by all AMQP session classes, 
that need to provide an awareness to
+ * callers of the version of the AMQP protocol that they are able to work with.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities
+ * <tr><td> Provide the method registry for a specific version of the AMQP.
+ * </table>
+ *
+ * @todo Why is this a seperate interface to [EMAIL PROTECTED] 
ProtocolVersionAware}, could they be combined into a single
+ *       interface and one of them eliminated? Move getRegistry method to 
ProtocolVersionAware, make the sessions
+ *       implement AMQProtocolWriter directly and drop this interface.
+ */
 public interface AMQVersionAwareProtocolSession extends AMQProtocolWriter, 
ProtocolVersionAware
 {
+    /**
+     * Gets the method registry for a specific version of the AMQP.
+     *
+     * @return The method registry for a specific version of the AMQP.
+     */
     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=537789&r1=537788&r2=537789
==============================================================================
--- 
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
 Mon May 14 04:47:13 2007
@@ -20,9 +20,28 @@
  */
 package org.apache.qpid.protocol;
 
+/**
+ * ProtocolVersionAware is implemented by all AMQP handling classes, that need 
to provide an awareness to callers of
+ * the version of the AMQP protocol that they are able to handle.
+ *
+ * <p/><table id="crc"><caption>CRC Card</caption>
+ * <tr><th> Responsibilities
+ * <tr><td> Report the major and minor AMQP version handled.
+ * </table>
+ */
 public interface ProtocolVersionAware
 {
+    /**
+     * Reports the AMQP minor version, that the implementer can handle.
+     *
+     * @return The AMQP minor version.
+     */
     public byte getProtocolMinorVersion();
 
+    /**
+     * Reports the AMQP major version, that the implementer can handle.
+     *
+     * @return The AMQP major version.
+     */
     public byte getProtocolMajorVersion();
 }

Modified: 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/MessageQueue.java
 Mon May 14 04:47:13 2007
@@ -14,17 +14,30 @@
  *  "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.    
+ *  under the License.
+ *
  *
- * 
  */
 package org.apache.qpid.util;
 
 import java.util.Queue;
 
+/**
+ * Defines a queue that has a push operation to add an element to the head of 
the queue.
+ *
+ * @todo Seems like this may be pointless, the implementation uses this method 
to increment the message count
+ *       then calls offer. Why not simply override offer and drop this 
interface?
+ */
 public interface MessageQueue<E> extends Queue<E>
 {
-
+    /**
+     * Inserts the specified element into this queue, if possible. When using 
queues that may impose insertion
+     * restrictions (for example capacity bounds), method offer is generally 
preferable to method Collection.add(E),
+     * which can fail to insert an element only by throwing an exception.
+     *
+     * @param o The element to insert.
+     *
+     * @return <tt>true</tt> if it was possible to add the element to this 
queue, else <tt>false</tt>
+     */
     boolean pushHead(E o);
-
 }

Modified: 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/CoordinatingTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/CoordinatingTestCase.java?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/CoordinatingTestCase.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/CoordinatingTestCase.java
 Mon May 14 04:47:13 2007
@@ -35,7 +35,7 @@
 import org.apache.qpid.util.ConversationFactory;
 
 /**
- * An CoordinatingTestCase is a JUnit test case extension that knows how to 
coordinate test clients that take part in a
+ * A CoordinatingTestCase is a JUnit test case extension that knows how to 
coordinate test clients that take part in a
  * test case as defined in the interop testing specification
  * 
(http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification).
  *

Modified: 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java?view=diff&rev=537789&r1=537788&r2=537789
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java
 Mon May 14 04:47:13 2007
@@ -134,6 +134,7 @@
             String brokerUrl = options.getProperty("b");
             String virtualHost = options.getProperty("h");
             reportDir = options.getProperty("o");
+            reportDir = (reportDir == null) ? "." : reportDir;
 
             // Scan for available test cases using a classpath scanner.
             Collection<Class<? extends CoordinatingTestCase>> testCaseClasses =


Reply via email to