diff options
Diffstat (limited to 'qpid/java/common/src/main/java/org/apache/qpid')
59 files changed, 131 insertions, 346 deletions
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelClosedException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelClosedException.java index 1b2eabdc86..73a906b81c 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelClosedException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelClosedException.java @@ -24,13 +24,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQChannelClosedException indicates that an operation cannot be performed becauase a channel has been closed. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents a failed operation on a closed channel. - * </table> - * - * @todo Does this duplicate AMQChannelException? */ public class AMQChannelClosedException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java index df71ece787..55f0fe57b0 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java @@ -28,13 +28,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQChannelException indicates that an error that requires the channel to be closed has occurred. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents an error that rquires the channel to be closed. - * </table> - * - * @todo Does this duplicate AMQChannelClosedException? */ public class AMQChannelException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java index b2ce3c1b32..4417c0a141 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionClosedException.java @@ -25,15 +25,8 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQConnectionClosedException indicates that a connection has been closed. * - * <p/>This exception is really used as an event, in order that the method handler that raises it creates an event + * <p>This exception is really used as an event, in order that the method handler that raises it creates an event * which is propagated to the io handler, in order to notify it of the connection closure. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents a the closure of a connection. - * </table> - * - * @todo Should review where exceptions-as-events */ public class AMQConnectionClosedException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java index ef108eeb67..096c4ede80 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java @@ -29,13 +29,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQConnectionException indicates that an error that requires the channel to be closed has occurred. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents an error that rquires the channel to be closed. - * </table> - * - * @todo Does this duplicate AMQChannelClosedException? */ public class AMQConnectionException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java index d9a9ee0782..efadaae611 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionFailureException.java @@ -26,13 +26,6 @@ import java.util.Collection; /** * AMQConnectionFailureException indicates that a connection to a broker could not be formed. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents failure to connect to a broker. - * </table> - * - * @todo Not an AMQP exception as no status code. */ public class AMQConnectionFailureException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java index 5ec5c42ab9..38fbc8fc57 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQDisconnectedException.java @@ -22,13 +22,6 @@ package org.apache.qpid; /** * AMQDisconnectedException indicates that a broker disconnected without failover. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents disconnection without failover by the broker. - * </table> - * - * @todo Not an AMQP exception as no status code. */ public class AMQDisconnectedException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java index 591202d934..3741cb9902 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java @@ -26,14 +26,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQException forms the root exception of all exceptions relating to the AMQ protocol. It provides space to associate * a required AMQ error code with the exception, which is a numeric value, with a meaning defined by the protocol. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents an exception condition associated with an AMQ protocol status code. - * </table> - * - * @todo This exception class is also used as a generic exception throughout Qpid code. This usage may not be strictly - * correct if this is to signify a protocol exception. Should review. */ public class AMQException extends Exception { @@ -117,9 +109,9 @@ public class AMQException extends Exception * Rethrown this exception as a new exception. * * Attempt to create a new exception of the same class if they have the default constructor of: - * {AMQConstant.class, String.class, Throwable.class} - * <p> - * Individual subclasses may override as requried to create a new instance. + * {AMQConstant.class, String.class, Throwable.class}. + * + * @return cloned exception */ public AMQException cloneForCurrentThread() { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java index 2bbaaef1fc..2592ab7662 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidArgumentException.java @@ -24,11 +24,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQInvalidArgumentException indicates that an invalid argument has been passed to an AMQP method. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents an error due to an invalid argument being passed to an AMQP method. - * </table> */ public class AMQInvalidArgumentException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java index c117968a29..d0a61cfeeb 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQInvalidRoutingKeyException.java @@ -24,11 +24,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQInvalidRoutingKeyException indicates an error with a routing key having an invalid format. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents a format error in a routing key. - * </table> */ public class AMQInvalidRoutingKeyException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java index ab5141be9d..533a704a80 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQPInvalidClassException.java @@ -23,12 +23,7 @@ package org.apache.qpid; /** * AMQPInvalidClassException indicates an error when trying to store an illegally typed argument in a field table. * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents illegal argument type for field table values. - * </table> - * - * @todo Could just re-use an exising exception like IllegalArgumentException or ClassCastException. + * <p>TODO Could just re-use an exising exception like IllegalArgumentException or ClassCastException. */ public class AMQPInvalidClassException extends RuntimeException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQTimeoutException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQTimeoutException.java index 4ae8282af5..c36d2c5907 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQTimeoutException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQTimeoutException.java @@ -24,11 +24,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQTimeoutException indicates that an expected response from a broker took too long. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Indicates that an expected response from a broker took too long. - * </table> */ public class AMQTimeoutException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQUndeliveredException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQUndeliveredException.java index 01a569b693..68cbc57216 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQUndeliveredException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQUndeliveredException.java @@ -24,11 +24,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQUndeliveredException indicates that a message, marked immediate or mandatory, could not be delivered. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents failure to delivery a message that must be delivered. - * </table> */ public class AMQUndeliveredException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java b/qpid/java/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java index 82ffe583c3..902b12300f 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/AMQUnresolvedAddressException.java @@ -22,15 +22,10 @@ package org.apache.qpid; /** * AMQUnresolvedAddressException indicates failure to resolve a socket address. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents failre to resolve a socket address. - * </table> - * - * @todo Not an AMQP exception as no status code. - * - * @todo Why replace java.nio.UnresolvedAddressException with this? This is checked, which may explain why, but it + * <p> + * TODO Not an AMQP exception as no status code. + * <p> + * TODO Why replace java.nio.UnresolvedAddressException with this? This is checked, which may explain why, but it * doesn't wrap the underlying exception. */ public class AMQUnresolvedAddressException extends AMQException diff --git a/qpid/java/common/src/main/java/org/apache/qpid/api/Message.java b/qpid/java/common/src/main/java/org/apache/qpid/api/Message.java index c0427c2f37..fff62424ca 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/api/Message.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/api/Message.java @@ -47,6 +47,7 @@ public interface Message * <li> To Socket (Stream) * </ul> * @param src - the data to append + * @throws IOException if there is an issue appending the data */ public void appendData(byte[] src) throws IOException; @@ -63,6 +64,7 @@ public interface Message * <li> To Socket (Stream) * </ul> * @param src - the data to append + * @throws IOException if there is an issue appending the data */ public void appendData(ByteBuffer src) throws IOException; @@ -78,6 +80,7 @@ public interface Message * <li> From Socket as and when it gets streamed * </ul> * @param target The target byte[] which the data gets copied to + * @throws IOException if there is an issue reading the data */ public void readData(byte[] target) throws IOException; @@ -94,7 +97,7 @@ public interface Message * </ul> * * @return A ByteBuffer containing data - * @throws IOException + * @throws IOException if there is an issue reading the data */ public ByteBuffer readData() throws IOException; diff --git a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java index c81af9760b..220e33724a 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java @@ -25,11 +25,6 @@ import org.apache.qpid.protocol.AMQVersionAwareProtocolSession; /** * AMQCodecFactory is a Mina codec factory. It supplies the encoders and decoders need to read and write the bytes to * the wire. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations. - * <tr><td> Supply the protocol decoder. <td> {@link AMQDecoder} - * </table> */ public class AMQCodecFactory { @@ -44,6 +39,7 @@ public class AMQCodecFactory * * @param expectProtocolInitiation <tt>true</tt> if the first frame received is going to be a protocol initiation * frame, <tt>false</tt> if it is going to be a standard AMQ data block. + * @param session protocol session (connection) */ public AMQCodecFactory(boolean expectProtocolInitiation, AMQVersionAwareProtocolSession session) { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java index ffdb7e6573..3ccd7e2031 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java @@ -46,17 +46,11 @@ import java.util.ListIterator; * protocol initiation decoder. It is a cumulative decoder, which means that it can accumulate data to decode in the * buffer until there is enough data to decode. * - * <p/>One instance of this class is created per session, so any changes or configuration done at run time to the + * <p>One instance of this class is created per session, so any changes or configuration done at run time to the * decoder will only affect decoding of the protocol session data to which is it bound. * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Delegate protocol initiation to its decoder. <td> {@link ProtocolInitiation.Decoder} - * <tr><td> Delegate AMQP data to its decoder. <td> {@link AMQDataBlockDecoder} - * <tr><td> Accept notification that protocol initiation has completed. - * </table> - * - * @todo If protocol initiation decoder not needed, then don't create it. Probably not a big deal, but it adds to the + * <p> + * TODO If protocol initiation decoder not needed, then don't create it. Probably not a big deal, but it adds to the * per-session overhead. */ public class AMQDecoder @@ -78,6 +72,7 @@ public class AMQDecoder * Creates a new AMQP decoder. * * @param expectProtocolInitiation <tt>true</tt> if this decoder needs to handle protocol initiation. + * @param session protocol session (connection) */ public AMQDecoder(boolean expectProtocolInitiation, AMQVersionAwareProtocolSession session) { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/common/AMQPFilterTypes.java b/qpid/java/common/src/main/java/org/apache/qpid/common/AMQPFilterTypes.java index f50e65214c..483fbaea50 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/common/AMQPFilterTypes.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/common/AMQPFilterTypes.java @@ -24,11 +24,6 @@ import org.apache.qpid.framing.AMQShortString; /** * Specifies the different filter types for consumers that filter their messages. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent different consumer filter types. - * </table> */ public enum AMQPFilterTypes { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/common/QpidProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/common/QpidProperties.java index 2c783aeaa4..25baf86fe6 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/common/QpidProperties.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/common/QpidProperties.java @@ -35,17 +35,13 @@ import java.util.Properties; * idea behind this, is that every build has these values incorporated directly into its jar file, so that code in the * wild can be identified, should its origination be forgotten. * - * <p/>To get the build version of any Qpid code call the {@link #main} method. This version string is usually also + * <p>To get the build version of any Qpid code call the {@link #main} method. This version string is usually also * printed to the console on broker start up. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><td>Load build versioning information into the runtime, for code identification purposes. - * </table> - * - * @todo Code to locate/load/log properties can be factored into a reusable properties utils class. Avoid having this + * <p> + * TODO Code to locate/load/log properties can be factored into a reusable properties utils class. Avoid having this * same snippet of loading code scattered in many places. - * - * @todo Could also add a build number property for a sequential build number assigned by an automated build system, for + * <p> + * TODO Could also add a build number property for a sequential build number assigned by an automated build system, for * build reproducability purposes. */ public class QpidProperties diff --git a/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java b/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java index b8181e3b87..cf08dafb49 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyException.java @@ -26,12 +26,8 @@ import org.apache.qpid.AMQException; * Indicates a failure to parse a property expansion. See {@link PropertyUtils} for the code that does property * expansions. * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaboration - * <tr><td> Represent failure to expand a property name into a value. - * </table> - * - * @todo Not an AMQP exception as no status code. + * <p> + * TODO Not an AMQP exception as no status code. */ public class PropertyException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyUtils.java index 81702ee1ea..da366ffd0f 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyUtils.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/configuration/PropertyUtils.java @@ -26,15 +26,11 @@ import java.util.Iterator; /** * PropertyUtils provides helper methods for dealing with Java properties. * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Expand system properties into strings with named expansions. - * </table> - * - * @todo Make the lookup method generic by passing in the properties to use for the expansion, rather than hard coding + * <p> + * TODO Make the lookup method generic by passing in the properties to use for the expansion, rather than hard coding * as system properties. The expansion code has greater potential for re-use that way. - * - * @todo Some more property related code could be added to this utils class, which might more appropriately reside under + * <p> + * TODO Some more property related code could be added to this utils class, which might more appropriately reside under * org.apache.qpid.util. For example standardised code to load properties from a resource name, currently found in * QpidProperties and possibly other places could be moved here. */ diff --git a/qpid/java/common/src/main/java/org/apache/qpid/dtx/XidImpl.java b/qpid/java/common/src/main/java/org/apache/qpid/dtx/XidImpl.java index 3590254d27..2d017b1cd4 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/dtx/XidImpl.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/dtx/XidImpl.java @@ -99,14 +99,14 @@ public class XidImpl implements Xid * +---+---+---+---+---+---+---+- -+---+---+- -+---+ * 0 4 5 6 6+g 6+g+b * format_id: an implementation specific format identifier - * <p/> + * <p> * gtrid_length: how many bytes of this form the transaction id - * <p/> + * <p> * bqual_length: how many bytes of this form the branch id - * <p/> + * <p> * data: a sequence of octets of at most 128 bytes containing the txn id and the * branch id - * <p/> + * <p> * Note - The sum of the two lengths must equal the length of the data field. * * @param xid an XID STring Form @@ -239,14 +239,14 @@ public class XidImpl implements Xid * +---+---+---+---+---+---+---+- -+---+---+- -+---+ * 0 4 5 6 6+g 6+g+b * format_id: an implementation specific format identifier - * <p/> + * <p> * gtrid_length: how many bytes of this form the transaction id - * <p/> + * <p> * bqual_length: how many bytes of this form the branch id - * <p/> + * <p> * data: a sequence of octets of at most 128 bytes containing the txn id and the * branch id - * <p/> + * <p> * Note - The sum of the two lengths must equal the length of the data field. * * @param xid an Xid to convert. diff --git a/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java b/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java index 5e59628fb6..9384002a72 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java @@ -20,19 +20,12 @@ */ package org.apache.qpid.exchange; -import org.apache.qpid.framing.AMQShortString; - /** * Defines the names of the standard AMQP exchanges that every AMQP broker should provide. These exchange names * and type are given in the specification. * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Defines the standard AMQP exchange names. - * <tr><td> Defines the standard AMQP exchange types. - * </table> - * - * @todo A type safe enum, might be more appropriate for the exchange types. + * <p> + * TODO A type safe enum, might be more appropriate for the exchange types. */ public class ExchangeDefaults { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/ArithmeticExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/ArithmeticExpression.java index 47d970cfbd..35a7c93043 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/ArithmeticExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/ArithmeticExpression.java @@ -30,10 +30,6 @@ public abstract class ArithmeticExpression extends BinaryExpression protected static final int LONG = 2; protected static final int DOUBLE = 3; - /** - * @param left - * @param right - */ public ArithmeticExpression(Expression left, Expression right) { super(left, right); @@ -262,11 +258,6 @@ public abstract class ArithmeticExpression extends BinaryExpression return evaluate(lvalue, rvalue); } - /** - * @param lvalue - * @param rvalue - * @return - */ protected abstract Object evaluate(Object lvalue, Object rvalue); } diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/BinaryExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/BinaryExpression.java index 6467bbbe1f..47f97ea908 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/BinaryExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/BinaryExpression.java @@ -83,7 +83,7 @@ public abstract class BinaryExpression implements Expression * Returns the symbol that represents this binary expression. For example, addition is * represented by "+" * - * @return + * @return the expression symbol */ public abstract String getExpressionSymbol(); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/BooleanExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/BooleanExpression.java index 13e1604d5f..5b1cf54680 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/BooleanExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/BooleanExpression.java @@ -28,7 +28,7 @@ public interface BooleanExpression extends Expression { /** - * @param message + * @param message message to match * @return true if the expression evaluates to Boolean.TRUE. */ public boolean matches(FilterableMessage message); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/ComparisonExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/ComparisonExpression.java index 2cfb97dc6c..76f743000b 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/ComparisonExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/ComparisonExpression.java @@ -74,9 +74,6 @@ public abstract class ComparisonExpression extends BinaryExpression implements B private Pattern likePattern; - /** - * @param right - */ public LikeExpression(Expression right, String like, int escape) { super(right); @@ -316,9 +313,9 @@ public abstract class ComparisonExpression extends BinaryExpression implements B } /** - * Only Numeric expressions can be used in >, >=, < or <= expressions.s + * Only Numeric expressions can be used in {@literal >, >=, < or <=} expressions. * - * @param expr + * @param expr expression to check */ public static void checkLessThanOperand(Expression expr) { @@ -341,10 +338,10 @@ public abstract class ComparisonExpression extends BinaryExpression implements B } /** - * Validates that the expression can be used in == or <> expression. + * Validates that the expression can be used in {@literal == or <>} expression. * Cannot not be NULL TRUE or FALSE literals. * - * @param expr + * @param expr expression to check */ public static void checkEqualOperand(Expression expr) { @@ -374,10 +371,6 @@ public abstract class ComparisonExpression extends BinaryExpression implements B } } - /** - * @param left - * @param right - */ public ComparisonExpression(Expression left, Expression right) { super(left, right); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/ConstantExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/ConstantExpression.java index 20c9f1438a..978ad3af7d 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/ConstantExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/ConstantExpression.java @@ -181,8 +181,8 @@ public class ConstantExpression implements Expression * Encodes the value of string so that it looks like it would look like * when it was provided in a selector. * - * @param s - * @return + * @param s string to encode + * @return encoded string */ public static String encodeString(String s) { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/Expression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/Expression.java index 1030c7b588..64630c142e 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/Expression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/Expression.java @@ -27,6 +27,7 @@ public interface Expression { /** + * @param message message to evaluate * @return the value of this expression */ public Object evaluate(FilterableMessage message); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/filter/LogicExpression.java b/qpid/java/common/src/main/java/org/apache/qpid/filter/LogicExpression.java index f8ec19d23b..6de3a03ee0 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/filter/LogicExpression.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/filter/LogicExpression.java @@ -36,10 +36,6 @@ public abstract class LogicExpression extends BinaryExpression implements Boolea return new AndExpression(lvalue, rvalue); } - /** - * @param left - * @param right - */ public LogicExpression(BooleanExpression left, BooleanExpression right) { super(left, right); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java index fd42084429..c234a5e829 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java @@ -39,7 +39,8 @@ public abstract class AMQDataBlock implements EncodableAMQDataBlock /** * Writes the datablock to the specified buffer. - * @param buffer + * @param buffer the buffer to write to + * @throws IOException if there is a problem writing the output */ public abstract void writePayload(DataOutput buffer) throws IOException; diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java index 2373edb478..34e9211d1c 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrameDecodingException.java @@ -26,11 +26,6 @@ import org.apache.qpid.protocol.AMQConstant; /** * AMQFrameDecodingException indicates that an AMQP frame cannot be decoded because it does not have the correct * format as defined by the protocol. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represents a format error in a protocol frame. - * </table> */ public class AMQFrameDecodingException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java index 966a03605c..250b8e87d1 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java @@ -32,9 +32,12 @@ public interface AMQMethodBody extends AMQBody { public static final byte TYPE = 1; - /** AMQP version */ + /** AMQP major version + * @return the major version*/ public byte getMajor(); + /** AMQP minor version + * @return the minor version*/ public byte getMinor(); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java index 571570d7b4..b1e8a73a0d 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java @@ -46,7 +46,9 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody } - /** unsigned short */ + /** unsigned short + * + * @return body size*/ abstract protected int getBodySize(); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolClassException.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolClassException.java index ab09c1de6d..0586a11619 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolClassException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolClassException.java @@ -22,13 +22,8 @@ package org.apache.qpid.framing; /** * AMQProtocolInstanceException indicates that the protocol class is incorrect in a header. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent incorrect protocol class in frame header. - * </table> - * - * @todo Not an AMQP exception as no status code. + * <p> + * TODO Not an AMQP exception as no status code. */ public class AMQProtocolClassException extends AMQProtocolHeaderException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolHeaderException.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolHeaderException.java index 6b819364da..b0c92d9aab 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolHeaderException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolHeaderException.java @@ -24,13 +24,8 @@ import org.apache.qpid.AMQException; /** * AMQProtocolHeaderException indicates a format error in an AMQP frame header. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent format error in frame header. - * </table> - * - * @todo Not an AMQP exception as no status code. + * <p> + * TODO Not an AMQP exception as no status code. */ public class AMQProtocolHeaderException extends AMQException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolInstanceException.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolInstanceException.java index 3165c373a9..cbc9e724de 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolInstanceException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolInstanceException.java @@ -22,13 +22,8 @@ package org.apache.qpid.framing; /** * AMQProtocolInstanceException indicates that the protocol instance is incorrect in a header. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent incorrect protocol instance in frame header. - * </table> - * - * @todo Not an AMQP exception as no status code. + * <p> + * TODO Not an AMQP exception as no status code. */ public class AMQProtocolInstanceException extends AMQProtocolHeaderException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolVersionException.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolVersionException.java index c9b0973ea6..37c384bfc9 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolVersionException.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQProtocolVersionException.java @@ -22,13 +22,8 @@ package org.apache.qpid.framing; /** * AMQProtocolInstanceException indicates that the client and server differ on expected protocol version in a header. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Represent incorrect protocol version in frame header. - * </table> - * - * @todo Not an AMQP exception as no status code. + * <p> + * TODO Not an AMQP exception as no status code. */ public class AMQProtocolVersionException extends AMQProtocolHeaderException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java index b681e782a3..71b5c5a623 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java @@ -30,16 +30,6 @@ import java.util.Collection; * AMQType is a type that represents the different possible AMQP field table types. It provides operations for each * of the types to perform tasks such as calculating the size of an instance of the type, converting types between AMQP * and Java native types, and reading and writing instances of AMQP types in binary formats to and from byte buffers. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Get the equivalent one byte identifier for a type. - * <tr><td> Calculate the size of an instance of an AMQP parameter type. <td> {@link EncodingUtils} - * <tr><td> Convert an instance of an AMQP parameter into a compatable Java object tagged with its AMQP type. - * <td> {@link AMQTypedValue} - * <tr><td> Write an instance of an AMQP parameter type to a byte buffer. <td> {@link EncodingUtils} - * <tr><td> Read an instance of an AMQP parameter from a byte buffer. <td> {@link EncodingUtils} - * </table> */ public enum AMQType { @@ -827,6 +817,7 @@ public enum AMQType * * @param value An instance of the type. * @param buffer The byte buffer to write it to. + * @throws IOException if there is a problem writing to the buffer */ public void writeToBuffer(Object value, DataOutput buffer) throws IOException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java index 42a82eccba..e60ead7ad1 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java @@ -33,15 +33,6 @@ import java.util.Map; * value. It provides the ability to read and write fully typed parameters to and from byte buffers. It also provides * the ability to create such parameters from Java native value and a type tag or to extract the native value and type * from one. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Create a fully typed AMQP value from a native type and a type tag. <td> {@link AMQType} - * <tr><td> Create a fully typed AMQP value from a binary representation in a byte buffer. <td> {@link AMQType} - * <tr><td> Write a fully typed AMQP value to a binary representation in a byte buffer. <td> {@link AMQType} - * <tr><td> Extract the type from a fully typed AMQP value. - * <tr><td> Extract the value from a fully typed AMQP value. - * </table> */ public abstract class AMQTypedValue { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java index 131d796af4..f2a443d5fd 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java @@ -76,11 +76,14 @@ public class ContentHeaderBody implements AMQBody } /** - * Helper method that is used currently by the persistence layer (by BDB at the moment). - * @param buffer - * @param size - * @return - * @throws AMQFrameDecodingException + * Helper method that is used currently by the persistence layer. + * @param buffer buffer to decode + * @param size size of the body + * + * @return the decoded header body + * @throws AMQFrameDecodingException if there is a decoding issue + * @throws AMQProtocolVersionException if there is a version issue + * @throws IOException if there is an IO issue */ public static ContentHeaderBody createFromBuffer(DataInputStream buffer, long size) throws AMQFrameDecodingException, AMQProtocolVersionException, IOException @@ -152,7 +155,9 @@ public class ContentHeaderBody implements AMQBody return weight; } - /** unsigned long but java can't handle that anyway when allocating byte array */ + /** unsigned long but java can't handle that anyway when allocating byte array + * + * @return the body size */ public long getBodySize() { return bodySize; diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java index 1ecd8a13b7..f0dcad4916 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java @@ -594,9 +594,9 @@ public class EncodingUtils /** * This is used for writing longstrs. - * - * @param buffer - * @param data + * @param buffer buffer to write to + * @param data data to write + * @throws IOException if there is an issue writing the output */ public static void writeLongstr(DataOutput buffer, byte[] data) throws IOException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java index 588f33d755..c4220894a8 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java @@ -73,7 +73,8 @@ public class FieldTable * Construct a new field table. * * @param buffer the buffer from which to read data. The length byte must be read already - * @param length the length of the field table. Must be > 0. + * @param length the length of the field table. Must be great than 0. + * @throws IOException if there is an issue reading the buffer */ public FieldTable(DataInput buffer, long length) throws IOException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java index 0a06f0f1e9..0bb72aa88f 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java @@ -137,6 +137,7 @@ public class ProtocolInitiation extends AMQDataBlock implements EncodableAMQData * @param in input buffer * @return true if we have enough data to decode the PI frame fully, false if more * data is required + * @throws IOException if there is an issue reading the input */ public boolean decodable(MarkableDataInput in) throws IOException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java b/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java index 0df9a85676..a6df71464b 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/pool/ReferenceCountingExecutorService.java @@ -33,28 +33,19 @@ import java.util.concurrent.TimeUnit; * the references taken, instantiating the service on the first reference, and shutting it down when the last * reference is released. * - * <p/>It is important to ensure that an executor service is correctly shut down as failing to do so prevents the JVM + * <p>It is important to ensure that an executor service is correctly shut down as failing to do so prevents the JVM * from terminating due to the existence of non-daemon threads. * - * <p/><table id="crc><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Provide a shared executor service. <td> {@link Executors} - * <tr><td> Shutdown the executor service when not needed. <td> {@link ExecutorService} - * <tr><td> Track references to the executor service. - * <tr><td> Provide configuration of the executor service. - * </table> - * - * @todo Might be more elegant to make this actually implement ExecutorService, providing better hiding of the + * <p> + * TODO Might be more elegant to make this actually implement ExecutorService, providing better hiding of the * implementation details. Also this class introduces a pattern (albeit specific to this usage) that could be * generalized to reference count anything. That is, on first instance call a create method, on release of last * instance call a destroy method. This could definitely be abstracted out as a re-usable piece of code; a * reference counting factory. It could then be re-used to do reference counting in other places (such as * messages). Countable objects have a simple create/destroy life cycle, capturable by an interface that the * ref counting factory can call to manage the lifecycle. - * - * @todo {@link #_poolSize} should be static? - * - * @todo The {@link #getPool()} method breaks the encapsulation of the reference counter. Generally when getPool is used + * <p> + * TODO The {@link #getPool()} method breaks the encapsulation of the reference counter. Generally when getPool is used * further checks are applied to ensure that the executor service has not been shutdown. This passes responsibility * for managing the lifecycle of the reference counted object onto the caller rather than neatly encapsulating it * here. Could think about adding more state to the lifecycle, to mark ref counted objects as invalid, and have an diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java index 2a2342ca14..5e39409382 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java @@ -28,20 +28,14 @@ import java.util.Map; /** * 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 + * <p> + * 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, there 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 + * <p> + * 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 { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java index fd6907a152..9b38f7926b 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodEvent.java @@ -25,19 +25,14 @@ import org.apache.qpid.framing.AMQMethodBody; /** * AMQMethodEvent encapsulates an AMQP method call, and the channel on which that method call occurred. * - * <p/>Supplies the: + * <p>Supplies the: * <ul> * <li>channel id</li> * <li>protocol method</li> * </ul> * - * <p/>As the event contains the context in which it occurred, event listeners do not need to be statefull. + * <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 {@link 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> { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java index 8cc9709c9c..3e7c67493d 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQMethodListener.java @@ -27,17 +27,11 @@ import org.apache.qpid.framing.AMQMethodBody; * AMQMethodListener is a listener that receives notifications of AMQP methods. The methods are packaged as events in * {@link AMQMethodEvent}. * - * <p/>An event listener may be associated with a particular context, usually an AMQP channel, and in addition to + * <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 or retried. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities - * <tr><td> Accept notification of AMQP method events. <td> {@link 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 + * <p> + * 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. @@ -49,14 +43,14 @@ public interface AMQMethodListener * * @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 + * @return true if the handler processes 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 Exception if an error has occurred. This exception may be delivered to all registered listeners using + * @throws AMQException 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. + * <p> + * TODO Consider narrowing the exception. */ <B extends AMQMethodBody> boolean methodReceived(AMQMethodEvent<B> evt) throws AMQException; diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java index 65884e4950..0a050becdc 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQProtocolWriter.java @@ -26,11 +26,6 @@ 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 {@link 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 { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java index 33604b05d9..0c643f6322 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQVersionAwareProtocolSession.java @@ -34,13 +34,8 @@ import java.nio.ByteBuffer; /** * 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 {@link ProtocolVersionAware}, could they be combined into a single + * <p> + * TODO Why is this a seperate interface to {@link 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. */ diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java index 56f950dd85..f12cd9af8e 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolVersionAware.java @@ -25,11 +25,6 @@ import org.apache.qpid.framing.ProtocolVersion; /** * 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 { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java index 3547205df1..7c604e8e8e 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java @@ -54,7 +54,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * * @author Rafael H. Schloming * - * @todo the channels map should probably be replaced with something + * TODO the channels map should probably be replaced with something * more efficient, e.g. an array or a map implementation that can use * short instead of Short */ diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java index 2ff08fd751..d410e19a24 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java @@ -109,6 +109,7 @@ public class ConnectionSettings * Gets the heartbeat interval (seconds) for 0-8/9/9-1 protocols. * 0 means heartbeating is disabled. * null means use the broker-supplied value. + * @return the heartbeat interval */ public Integer getHeartbeatInterval08() { @@ -129,6 +130,7 @@ public class ConnectionSettings /** * Gets the heartbeat interval (seconds) for the 0-10 protocol. * 0 means heartbeating is disabled. + * @return the heartbeat interval */ public int getHeartbeatInterval010() { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java index 8b29d6e424..90288eedcc 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java @@ -1206,6 +1206,7 @@ public class Session extends SessionInvoker /** * An auxiliary method for test purposes only + * @return true if flow is blocked */ public boolean isFlowBlocked() { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Decoder.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Decoder.java index fb3f91a3ce..6c027adcad 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Decoder.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Decoder.java @@ -82,7 +82,7 @@ public interface Decoder * The uuid type encodes a universally unique id as defined by RFC-4122. * The format and operations for this type can be found in section 4.1.2 of RFC-4122. * - * return a universally unique id as defined by RFC-4122. + * @return a universally unique id as defined by RFC-4122. */ UUID readUuid(); @@ -114,14 +114,14 @@ public interface Decoder * Note that the encoded size refers to the number of octets of unicode, not necessarily the number of unicode * characters since the UTF-8 unicode may include multi-byte character sequences. * - * return a string. + * @return a string. */ String readStr16(); /** * The vbin8 type encodes up to 255 octets of opaque binary data. * - * return a byte array. + * @return a byte array. */ byte[] readVbin8(); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Encoder.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Encoder.java index 5a3cec5616..a9eea13104 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Encoder.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/codec/Encoder.java @@ -60,7 +60,7 @@ public interface Encoder /** * The uint64 type is a 64-bit unsigned integral value encoded in network byte order. * - * @param b the unsigned integer to be encoded. + * @param l the unsigned integer to be encoded. */ void writeUint64(long l); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java index 1b8bbebdf5..2810e7a9e1 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java @@ -34,12 +34,12 @@ public interface NetworkConnection void close(); /** - * Returns the remote address of the underlying socket. + * @return the remote address of the underlying socket. */ SocketAddress getRemoteAddress(); /** - * Returns the local address of the underlying socket. + * @return the local address of the underlying socket. */ SocketAddress getLocalAddress(); diff --git a/qpid/java/common/src/main/java/org/apache/qpid/typedmessage/TypedBytesContentReader.java b/qpid/java/common/src/main/java/org/apache/qpid/typedmessage/TypedBytesContentReader.java index 0ba865f1e6..674a0e9468 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/typedmessage/TypedBytesContentReader.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/typedmessage/TypedBytesContentReader.java @@ -54,7 +54,7 @@ public class TypedBytesContentReader implements TypedBytesCodes * Check that there is at least a certain number of bytes available to read * * @param len the number of bytes - * @throws javax.jms.MessageEOFException if there are less than len bytes available to read + * @throws EOFException if there are less than len bytes available to read */ public void checkAvailable(int len) throws EOFException { @@ -183,7 +183,8 @@ public class TypedBytesContentReader implements TypedBytesCodes * Note that this method reads a unicode character as two bytes from the stream * * @return the character read from the stream - * @throws javax.jms.JMSException + * @throws EOFException if there are less than the required bytes available to read + * @throws TypedBytesFormatException if the current write type is not compatible */ public char readChar() throws EOFException, TypedBytesFormatException { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java b/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java index 3d17bbf6ea..0482ac7878 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/util/CommandLineParser.java @@ -31,13 +31,13 @@ import java.util.regex.Pattern; /** * CommandLineParser provides a utility for specifying the format of a command line and parsing command lines to ensure - * that they fit their specified format. A command line is made up of flags and options, both may be refered to as + * that they fit their specified format. A command line is made up of flags and options, both may be referred to as * options. A flag is an option that does not take an argument (specifying it means it has the value 'true' and not * specifying it means it has the value 'false'). Options must take arguments but they can be set up with defaults so - * that they take a default value when not set. Options may be mandatory in wich case it is an error not to specify + * that they take a default value when not set. Options may be mandatory in which case it is an error not to specify * them on the command line. Flags are never mandatory because they are implicitly set to false when not specified. * - * <p/>Some example command lines are: + * <p>Some example command lines are: * * <ul> * <li>This one has two options that expect arguments: @@ -52,14 +52,15 @@ import java.util.regex.Pattern; * <pre> * jar -tvf mytar.tar * </pre> + * </ul> * - * <p/>The parsing rules are: + * <p>The parsing rules are: * * <ol> * <li>Flags may be combined after a single '-' because they never take arguments. Normally such flags are single letter * flags but this is only a convention and not enforced. Flags of more than one letter are usually specified on their own. * <li>Options expecting arguments must always be on their own. - * <li>The argument to an option may be seperated from it by whitespace or appended directly onto the option. + * <li>The argument to an option may be separated from it by whitespace or appended directly onto the option. * <li>The argument to an option may never begin with a '-' character. * <li>All other arguments not beginning with a '-' character are free arguments that do not belong to any option. * <li>The second or later of a set of duplicate or repeated flags are ignored. @@ -70,18 +71,8 @@ import java.util.regex.Pattern; * the "bar" argument. * </ol> * - * <p/>By default, unknown options are simply ignored if specified on the command line. This behaviour may be changed + * <p>By default, unknown options are simply ignored if specified on the command line. This behaviour may be changed * so that the parser reports all unknowns as errors by using the {@link #setErrorsOnUnknowns} method. - * - * <p><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Accept a command line specification. - * <tr><td> Parse a command line into properties, validating it against its specification. - * <tr><td> Report all errors between a command line and its specification. - * <tr><td> Provide a formatted usage string for a command line. - * <tr><td> Provide a formatted options in force string for a command line. - * <tr><td> Allow errors on unknowns behaviour to be turned on or off. - * </table> */ public class CommandLineParser { @@ -106,7 +97,7 @@ public class CommandLineParser * array may therefore easily be used to configure the command line parser in a single method call with an easily * readable format. * - * <p/>Each array of strings must be 2, 3, 4 or 5 elements long. If any of the last three elements are missing they + * <p>Each array of strings must be 2, 3, 4 or 5 elements long. If any of the last three elements are missing they * are assumed to be null. The elements specify the following parameters: * <ol> * <li>The name of the option without the leading '-'. For example, "file". To specify the format of the 'free' @@ -121,7 +112,7 @@ public class CommandLineParser * this is ignored for flags. * <li>A regular expression describing the format that the argument must take. Ignored if null. * </ol> - * <p/>An example call to this constructor is: + * <p>An example call to this constructor is: * * <pre> * CommandLineParser commandLine = new CommandLineParser( @@ -234,7 +225,7 @@ public class CommandLineParser * Parses a set of command line arguments into a set of properties, keyed by the argument flag. The free arguments * are keyed by integers as strings starting at "1" and then "2", ... and so on. * - * <p/>See the class level comment for a description of the parsing rules. + * <p>See the class level comment for a description of the parsing rules. * * @param args The command line arguments. * @@ -488,6 +479,7 @@ public class CommandLineParser /** * If a command line has been parsed, calling this method sets all of its parsed options into the specified properties. + * @param properties properties */ public void addCommandLineToProperties(Properties properties) { @@ -508,7 +500,7 @@ public class CommandLineParser * to be called to use this parser a second time which is not likely seeing as a command line is usually only * specified once. However, it is exposed as a public method for the rare case where this may be done. * - * <p/>Cleans the internal state of this parser, removing all stored errors and information about the options in + * <p>Cleans the internal state of this parser, removing all stored errors and information about the options in * force. */ public void reset() @@ -643,11 +635,6 @@ public class CommandLineParser * Holds information about a command line options. This includes what its name is, whether or not it is a flag, * whether or not it is mandatory, what its user comment is, what its argument reminder text is and what its * regular expression format is. - * - * <p><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Hold details of a command line option. - * </table> */ protected static class CommandLineOption { diff --git a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java index f48103c650..dd347b54eb 100644 --- a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java +++ b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java @@ -37,12 +37,6 @@ import java.util.List; * FileUtils provides some simple helper methods for working with files. It follows the convention of wrapping all * checked exceptions as runtimes, so code using these methods is free of try-catch blocks but does not expect to * recover from errors. - * - * <p/><table id="crc"><caption>CRC Card</caption> - * <tr><th> Responsibilities <th> Collaborations - * <tr><td> Read a text file as a string. - * <tr><td> Open a file or default resource as an input stream. - * </table> */ public class FileUtils { @@ -214,7 +208,7 @@ public class FileUtils * * @param src The source file name. * @param dst The destination file name. - * @throws IOException + * @throws IOException if there is an issue copying the file */ public static void copyCheckedEx(File src, File dst) throws IOException { @@ -228,7 +222,7 @@ public class FileUtils * * @param in The InputStream * @param dst The destination file name. - * @throws IOException + * @throws IOException if there is an issue copying the stream */ public static void copy(InputStream in, File dst) throws IOException { @@ -383,7 +377,7 @@ public class FileUtils * @param file the file to search * @param search the search String * - * @throws java.io.IOException + * @throws java.io.IOException if there is an issue searching the file * @return the list of matching entries */ public static List<String> searchFile(File file, String search) |