You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/08/08 20:58:13 UTC

svn commit: r563982 [3/32] - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/advisory/ main/java/org/apache/activemq/blob/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/broker/jmx...

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueSender.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/camel/CamelQueueSender.java Wed Aug  8 11:56:59 2007
@@ -16,18 +16,18 @@
  */
 package org.apache.activemq.camel;
 
-import org.apache.activemq.ActiveMQSession;
-import org.apache.camel.Endpoint;
-
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.Queue;
 import javax.jms.QueueSender;
 
+import org.apache.activemq.ActiveMQSession;
+import org.apache.camel.Endpoint;
+
 /**
- * A JMS {@link javax.jms.QueueSender} which sends message exchanges to a
- * Camel {@link org.apache.camel.Endpoint}
- *
+ * A JMS {@link javax.jms.QueueSender} which sends message exchanges to a Camel
+ * {@link org.apache.camel.Endpoint}
+ * 
  * @version $Revision: $
  */
 public class CamelQueueSender extends CamelMessageProducer implements QueueSender {
@@ -36,33 +36,30 @@
         super(destination, endpoint, session);
     }
 
-
     /**
      * Gets the queue associated with this <CODE>QueueSender</CODE>.
-     *
+     * 
      * @return this sender's queue
      * @throws JMSException if the JMS provider fails to get the queue for this
-     *                      <CODE>QueueSender</CODE> due to some internal error.
+     *                 <CODE>QueueSender</CODE> due to some internal error.
      */
 
     public Queue getQueue() throws JMSException {
-        return (Queue) super.getDestination();
+        return (Queue)super.getDestination();
     }
 
     /**
-     * Sends a message to a queue for an unidentified message producer. Uses
-     * the <CODE>QueueSender</CODE>'s default delivery mode, priority, and
-     * time to live.
-     * <p/>
-     * <p/>
-     * Typically, a message producer is assigned a queue at creation time;
-     * however, the JMS API also supports unidentified message producers, which
-     * require that the queue be supplied every time a message is sent.
-     *
-     * @param queue   the queue to send this message to
+     * Sends a message to a queue for an unidentified message producer. Uses the
+     * <CODE>QueueSender</CODE>'s default delivery mode, priority, and time
+     * to live. <p/> <p/> Typically, a message producer is assigned a queue at
+     * creation time; however, the JMS API also supports unidentified message
+     * producers, which require that the queue be supplied every time a message
+     * is sent.
+     * 
+     * @param queue the queue to send this message to
      * @param message the message to send
-     * @throws JMSException if the JMS provider fails to send the message due to some
-     *                      internal error.
+     * @throws JMSException if the JMS provider fails to send the message due to
+     *                 some internal error.
      * @see javax.jms.MessageProducer#getDeliveryMode()
      * @see javax.jms.MessageProducer#getTimeToLive()
      * @see javax.jms.MessageProducer#getPriority()
@@ -74,28 +71,21 @@
 
     /**
      * Sends a message to a queue for an unidentified message producer,
-     * specifying delivery mode, priority and time to live.
-     * <p/>
-     * <p/>
-     * Typically, a message producer is assigned a queue at creation time;
-     * however, the JMS API also supports unidentified message producers, which
-     * require that the queue be supplied every time a message is sent.
-     *
-     * @param queue        the queue to send this message to
-     * @param message      the message to send
+     * specifying delivery mode, priority and time to live. <p/> <p/> Typically,
+     * a message producer is assigned a queue at creation time; however, the JMS
+     * API also supports unidentified message producers, which require that the
+     * queue be supplied every time a message is sent.
+     * 
+     * @param queue the queue to send this message to
+     * @param message the message to send
      * @param deliveryMode the delivery mode to use
-     * @param priority     the priority for this message
-     * @param timeToLive   the message's lifetime (in milliseconds)
-     * @throws JMSException if the JMS provider fails to send the message due to some
-     *                      internal error.
+     * @param priority the priority for this message
+     * @param timeToLive the message's lifetime (in milliseconds)
+     * @throws JMSException if the JMS provider fails to send the message due to
+     *                 some internal error.
      */
 
-    public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive)
-            throws JMSException {
-        super.send(queue,
-                message,
-                deliveryMode,
-                priority,
-                timeToLive);
+    public void send(Queue queue, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
+        super.send(queue, message, deliveryMode, priority, timeToLive);
     }
-}
\ No newline at end of file
+}

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQDestination.java Wed Aug  8 11:56:59 2007
@@ -41,7 +41,8 @@
  * @openwire:marshaller
  * @version $Revision: 1.10 $
  */
-abstract public class ActiveMQDestination extends JNDIBaseStorable implements DataStructure, Destination, Externalizable, Comparable {
+abstract public class ActiveMQDestination extends JNDIBaseStorable implements DataStructure, Destination,
+    Externalizable, Comparable {
 
     private static final long serialVersionUID = -3885260014960795889L;
 
@@ -196,7 +197,8 @@
 
     public void setPhysicalName(String physicalName) {
         final int len = physicalName.length();
-        int p = -1;// options offset
+        // options offset
+        int p = -1;
         boolean composite = false;
         for (int i = 0; i < len; i++) {
             char c = physicalName.charAt(i);
@@ -219,7 +221,8 @@
             try {
                 options = URISupport.parseQuery(optstring);
             } catch (URISyntaxException e) {
-                throw new IllegalArgumentException("Invalid destination name: " + physicalName + ", it's options are not encoded properly: " + e);
+                throw new IllegalArgumentException("Invalid destination name: " + physicalName
+                                                   + ", it's options are not encoded properly: " + e);
             }
         }
         this.physicalName = physicalName;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMapMessage.java Wed Aug  8 11:56:59 2007
@@ -42,33 +42,51 @@
 import org.apache.activemq.wireformat.WireFormat;
 
 /**
- * A <CODE>MapMessage</CODE> object is used to send a set of name-value pairs. The names are <CODE>String</CODE>
- * objects, and the values are primitive data types in the Java programming language. The names must have a value that
- * is not null, and not an empty string. The entries can be accessed sequentially or randomly by name. The order of the
- * entries is undefined. <CODE>MapMessage</CODE> inherits from the <CODE>Message</CODE> interface and adds a message
- * body that contains a Map. <P> The primitive types can be read or written explicitly using methods for each type. They
- * may also be read or written generically as objects. For instance, a call to <CODE>MapMessage.setInt("foo", 6)</CODE>
- * is equivalent to <CODE> MapMessage.setObject("foo", new Integer(6))</CODE>. Both forms are provided, because the
- * explicit form is convenient for static programming, and the object form is needed when types are not known at compile
- * time. <P> When a client receives a <CODE>MapMessage</CODE>, it is in read-only mode. If a client attempts to write to
- * the message at this point, a <CODE>MessageNotWriteableException</CODE> is thrown. If <CODE>clearBody</CODE> is
- * called, the message can now be both read from and written to. <P> <CODE>MapMessage</CODE> objects support the
- * following conversion table. The marked cases must be supported. The unmarked cases must throw a
- * <CODE>JMSException</CODE>. The <CODE>String</CODE> -to-primitive conversions may throw a runtime exception if the
- * primitive's <CODE>valueOf()</CODE> method does not accept it as a valid <CODE> String</CODE> representation of the
- * primitive. <P> A value written as the row type can be read as the column type.
- * <p/>
- * <PRE>| | boolean byte short char int long float double String byte[] |----------------------------------------------------------------------
+ * A <CODE>MapMessage</CODE> object is used to send a set of name-value pairs.
+ * The names are <CODE>String</CODE> objects, and the values are primitive
+ * data types in the Java programming language. The names must have a value that
+ * is not null, and not an empty string. The entries can be accessed
+ * sequentially or randomly by name. The order of the entries is undefined.
+ * <CODE>MapMessage</CODE> inherits from the <CODE>Message</CODE> interface
+ * and adds a message body that contains a Map.
+ * <P>
+ * The primitive types can be read or written explicitly using methods for each
+ * type. They may also be read or written generically as objects. For instance,
+ * a call to <CODE>MapMessage.setInt("foo", 6)</CODE> is equivalent to
+ * <CODE> MapMessage.setObject("foo", new Integer(6))</CODE>. Both forms are
+ * provided, because the explicit form is convenient for static programming, and
+ * the object form is needed when types are not known at compile time.
+ * <P>
+ * When a client receives a <CODE>MapMessage</CODE>, it is in read-only mode.
+ * If a client attempts to write to the message at this point, a
+ * <CODE>MessageNotWriteableException</CODE> is thrown. If
+ * <CODE>clearBody</CODE> is called, the message can now be both read from and
+ * written to.
+ * <P>
+ * <CODE>MapMessage</CODE> objects support the following conversion table. The
+ * marked cases must be supported. The unmarked cases must throw a
+ * <CODE>JMSException</CODE>. The <CODE>String</CODE> -to-primitive
+ * conversions may throw a runtime exception if the primitive's
+ * <CODE>valueOf()</CODE> method does not accept it as a valid
+ * <CODE> String</CODE> representation of the primitive.
+ * <P>
+ * A value written as the row type can be read as the column type. <p/>
+ * 
+ * <PRE>
+ * | | boolean byte short char int long float double String byte[] |----------------------------------------------------------------------
  * |boolean | X X |byte | X X X X X |short | X X X X |char | X X |int | X X X |long | X X |float | X X X |double | X X
  * |String | X X X X X X X X |byte[] | X |----------------------------------------------------------------------
- * <p/>
+ * &lt;p/&gt;
  * </PRE>
+ * 
  * <p/>
- * <P> Attempting to read a null value as a primitive type must be treated as calling the primitive's corresponding
- * <code>valueOf(String)</code> conversion method with a null value. Since <code>char</code> does not support a
- * <code>String</code> conversion, attempting to read a null value as a <code>char</code> must throw a
- * <code>NullPointerException</code>.
- *
+ * <P>
+ * Attempting to read a null value as a primitive type must be treated as
+ * calling the primitive's corresponding <code>valueOf(String)</code>
+ * conversion method with a null value. Since <code>char</code> does not
+ * support a <code>String</code> conversion, attempting to read a null value
+ * as a <code>char</code> must throw a <code>NullPointerException</code>.
+ * 
  * @openwire:marshaller code="25"
  * @see javax.jms.Session#createMapMessage()
  * @see javax.jms.BytesMessage
@@ -99,14 +117,14 @@
         super.beforeMarshall(wireFormat);
         storeContent();
     }
-    
+
     private void storeContent() {
         try {
-            if( getContent()==null && !map.isEmpty()) {
+            if (getContent() == null && !map.isEmpty()) {
                 ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
                 OutputStream os = bytesOut;
                 ActiveMQConnection connection = getConnection();
-                if( connection!= null && connection.isUseCompression() ) { 
+                if (connection != null && connection.isUseCompression()) {
                     compressed = true;
                     os = new DeflaterOutputStream(os);
                 }
@@ -119,19 +137,20 @@
             throw new RuntimeException(e);
         }
     }
-    
+
     /**
      * Builds the message body from data
-     * @throws JMSException 
-     *
+     * 
+     * @throws JMSException
+     * 
      * @throws IOException
      */
     private void loadContent() throws JMSException {
         try {
-            if( getContent()!=null && map.isEmpty() ) {
+            if (getContent() != null && map.isEmpty()) {
                 ByteSequence content = getContent();
                 InputStream is = new ByteArrayInputStream(content);
-                if( isCompressed() ) {
+                if (isCompressed()) {
                     is = new InflaterInputStream(is);
                 }
                 DataInputStream dataIn = new DataInputStream(is);
@@ -146,16 +165,18 @@
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
-    
+
     public String getJMSXMimeType() {
         return "jms/map-message";
     }
 
-
     /**
-     * Clears out the message body. Clearing a message's body does not clear its header values or property entries. <P>
-     * If this message body was read-only, calling this method leaves the message body in the same state as an empty
-     * body in a newly created message.
+     * Clears out the message body. Clearing a message's body does not clear its
+     * header values or property entries.
+     * <P>
+     * If this message body was read-only, calling this method leaves the
+     * message body in the same state as an empty body in a newly created
+     * message.
      */
     public void clearBody() throws JMSException {
         super.clearBody();
@@ -164,10 +185,11 @@
 
     /**
      * Returns the <CODE>boolean</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>boolean</CODE>
      * @return the <CODE>boolean</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public boolean getBoolean(String name) throws JMSException {
@@ -177,7 +199,7 @@
             return false;
         }
         if (value instanceof Boolean) {
-            return ((Boolean) value).booleanValue();
+            return ((Boolean)value).booleanValue();
         }
         if (value instanceof String) {
             return Boolean.valueOf(value.toString()).booleanValue();
@@ -188,10 +210,11 @@
 
     /**
      * Returns the <CODE>byte</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>byte</CODE>
      * @return the <CODE>byte</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public byte getByte(String name) throws JMSException {
@@ -201,7 +224,7 @@
             return 0;
         }
         if (value instanceof Byte) {
-            return ((Byte) value).byteValue();
+            return ((Byte)value).byteValue();
         }
         if (value instanceof String) {
             return Byte.valueOf(value.toString()).byteValue();
@@ -212,10 +235,11 @@
 
     /**
      * Returns the <CODE>short</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>short</CODE>
      * @return the <CODE>short</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public short getShort(String name) throws JMSException {
@@ -225,10 +249,10 @@
             return 0;
         }
         if (value instanceof Short) {
-            return ((Short) value).shortValue();
+            return ((Short)value).shortValue();
         }
         if (value instanceof Byte) {
-            return ((Byte) value).shortValue();
+            return ((Byte)value).shortValue();
         }
         if (value instanceof String) {
             return Short.valueOf(value.toString()).shortValue();
@@ -239,10 +263,11 @@
 
     /**
      * Returns the Unicode character value with the specified name.
-     *
+     * 
      * @param name the name of the Unicode character
      * @return the Unicode character value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public char getChar(String name) throws JMSException {
@@ -252,7 +277,7 @@
             throw new NullPointerException();
         }
         if (value instanceof Character) {
-            return ((Character) value).charValue();
+            return ((Character)value).charValue();
         } else {
             throw new MessageFormatException(" cannot read a short from " + value.getClass().getName());
         }
@@ -260,10 +285,11 @@
 
     /**
      * Returns the <CODE>int</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>int</CODE>
      * @return the <CODE>int</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public int getInt(String name) throws JMSException {
@@ -273,13 +299,13 @@
             return 0;
         }
         if (value instanceof Integer) {
-            return ((Integer) value).intValue();
+            return ((Integer)value).intValue();
         }
         if (value instanceof Short) {
-            return ((Short) value).intValue();
+            return ((Short)value).intValue();
         }
         if (value instanceof Byte) {
-            return ((Byte) value).intValue();
+            return ((Byte)value).intValue();
         }
         if (value instanceof String) {
             return Integer.valueOf(value.toString()).intValue();
@@ -290,10 +316,11 @@
 
     /**
      * Returns the <CODE>long</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>long</CODE>
      * @return the <CODE>long</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public long getLong(String name) throws JMSException {
@@ -303,16 +330,16 @@
             return 0;
         }
         if (value instanceof Long) {
-            return ((Long) value).longValue();
+            return ((Long)value).longValue();
         }
         if (value instanceof Integer) {
-            return ((Integer) value).longValue();
+            return ((Integer)value).longValue();
         }
         if (value instanceof Short) {
-            return ((Short) value).longValue();
+            return ((Short)value).longValue();
         }
         if (value instanceof Byte) {
-            return ((Byte) value).longValue();
+            return ((Byte)value).longValue();
         }
         if (value instanceof String) {
             return Long.valueOf(value.toString()).longValue();
@@ -323,10 +350,11 @@
 
     /**
      * Returns the <CODE>float</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>float</CODE>
      * @return the <CODE>float</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public float getFloat(String name) throws JMSException {
@@ -336,7 +364,7 @@
             return 0;
         }
         if (value instanceof Float) {
-            return ((Float) value).floatValue();
+            return ((Float)value).floatValue();
         }
         if (value instanceof String) {
             return Float.valueOf(value.toString()).floatValue();
@@ -347,10 +375,11 @@
 
     /**
      * Returns the <CODE>double</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>double</CODE>
      * @return the <CODE>double</CODE> value with the specified name
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public double getDouble(String name) throws JMSException {
@@ -360,10 +389,10 @@
             return 0;
         }
         if (value instanceof Double) {
-            return ((Double) value).doubleValue();
+            return ((Double)value).doubleValue();
         }
         if (value instanceof Float) {
-            return ((Float) value).floatValue();
+            return ((Float)value).floatValue();
         }
         if (value instanceof String) {
             return Float.valueOf(value.toString()).floatValue();
@@ -374,11 +403,12 @@
 
     /**
      * Returns the <CODE>String</CODE> value with the specified name.
-     *
+     * 
      * @param name the name of the <CODE>String</CODE>
-     * @return the <CODE>String</CODE> value with the specified name; if there is no item by this name, a null value is
-     *         returned
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @return the <CODE>String</CODE> value with the specified name; if there
+     *         is no item by this name, a null value is returned
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public String getString(String name) throws JMSException {
@@ -396,34 +426,42 @@
 
     /**
      * Returns the byte array value with the specified name.
-     *
+     * 
      * @param name the name of the byte array
-     * @return a copy of the byte array value with the specified name; if there is no item by this name, a null value is
-     *         returned.
-     * @throws JMSException           if the JMS provider fails to read the message due to some internal error.
+     * @return a copy of the byte array value with the specified name; if there
+     *         is no item by this name, a null value is returned.
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      * @throws MessageFormatException if this type conversion is invalid.
      */
     public byte[] getBytes(String name) throws JMSException {
         initializeReading();
-        Object value = map.get(name);            
-        if ( value instanceof byte[] ) { 
-            return (byte[]) value;
+        Object value = map.get(name);
+        if (value instanceof byte[]) {
+            return (byte[])value;
         } else {
             throw new MessageFormatException(" cannot read a byte[] from " + value.getClass().getName());
         }
     }
 
     /**
-     * Returns the value of the object with the specified name. <P> This method can be used to return, in objectified
-     * format, an object in the Java programming language ("Java object") that had been stored in the Map with the
-     * equivalent <CODE>setObject</CODE> method call, or its equivalent primitive <CODE>set <I>type </I></CODE> method.
-     * <P> Note that byte values are returned as <CODE>byte[]</CODE>, not <CODE>Byte[]</CODE>.
-     *
+     * Returns the value of the object with the specified name.
+     * <P>
+     * This method can be used to return, in objectified format, an object in
+     * the Java programming language ("Java object") that had been stored in the
+     * Map with the equivalent <CODE>setObject</CODE> method call, or its
+     * equivalent primitive <CODE>set <I>type </I></CODE> method.
+     * <P>
+     * Note that byte values are returned as <CODE>byte[]</CODE>, not
+     * <CODE>Byte[]</CODE>.
+     * 
      * @param name the name of the Java object
-     * @return a copy of the Java object value with the specified name, in objectified format (for example, if the
-     *         object was set as an <CODE>int</CODE>, an <CODE>Integer</CODE> is returned); if there is no item by this
-     *         name, a null value is returned
-     * @throws JMSException if the JMS provider fails to read the message due to some internal error.
+     * @return a copy of the Java object value with the specified name, in
+     *         objectified format (for example, if the object was set as an
+     *         <CODE>int</CODE>, an <CODE>Integer</CODE> is returned); if
+     *         there is no item by this name, a null value is returned
+     * @throws JMSException if the JMS provider fails to read the message due to
+     *                 some internal error.
      */
     public Object getObject(String name) throws JMSException {
         initializeReading();
@@ -431,8 +469,9 @@
     }
 
     /**
-     * Returns an <CODE>Enumeration</CODE> of all the names in the <CODE>MapMessage</CODE> object.
-     *
+     * Returns an <CODE>Enumeration</CODE> of all the names in the
+     * <CODE>MapMessage</CODE> object.
+     * 
      * @return an enumeration of all the names in this <CODE>MapMessage</CODE>
      * @throws JMSException
      */
@@ -453,11 +492,13 @@
 
     /**
      * Sets a <CODE>boolean</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>boolean</CODE>
+     * 
+     * @param name the name of the <CODE>boolean</CODE>
      * @param value the <CODE>boolean</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setBoolean(String name, boolean value) throws JMSException {
@@ -467,11 +508,13 @@
 
     /**
      * Sets a <CODE>byte</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>byte</CODE>
+     * 
+     * @param name the name of the <CODE>byte</CODE>
      * @param value the <CODE>byte</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setByte(String name, byte value) throws JMSException {
@@ -481,11 +524,13 @@
 
     /**
      * Sets a <CODE>short</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>short</CODE>
+     * 
+     * @param name the name of the <CODE>short</CODE>
      * @param value the <CODE>short</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setShort(String name, short value) throws JMSException {
@@ -495,11 +540,13 @@
 
     /**
      * Sets a Unicode character value with the specified name into the Map.
-     *
-     * @param name  the name of the Unicode character
+     * 
+     * @param name the name of the Unicode character
      * @param value the Unicode character value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setChar(String name, char value) throws JMSException {
@@ -509,11 +556,13 @@
 
     /**
      * Sets an <CODE>int</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>int</CODE>
+     * 
+     * @param name the name of the <CODE>int</CODE>
      * @param value the <CODE>int</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setInt(String name, int value) throws JMSException {
@@ -523,11 +572,13 @@
 
     /**
      * Sets a <CODE>long</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>long</CODE>
+     * 
+     * @param name the name of the <CODE>long</CODE>
      * @param value the <CODE>long</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setLong(String name, long value) throws JMSException {
@@ -537,11 +588,13 @@
 
     /**
      * Sets a <CODE>float</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>float</CODE>
+     * 
+     * @param name the name of the <CODE>float</CODE>
      * @param value the <CODE>float</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setFloat(String name, float value) throws JMSException {
@@ -551,11 +604,13 @@
 
     /**
      * Sets a <CODE>double</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>double</CODE>
+     * 
+     * @param name the name of the <CODE>double</CODE>
      * @param value the <CODE>double</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setDouble(String name, double value) throws JMSException {
@@ -565,11 +620,13 @@
 
     /**
      * Sets a <CODE>String</CODE> value with the specified name into the Map.
-     *
-     * @param name  the name of the <CODE>String</CODE>
+     * 
+     * @param name the name of the <CODE>String</CODE>
      * @param value the <CODE>String</CODE> value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setString(String name, String value) throws JMSException {
@@ -579,12 +636,15 @@
 
     /**
      * Sets a byte array value with the specified name into the Map.
-     *
-     * @param name  the name of the byte array
-     * @param value the byte array value to set in the Map; the array is copied so that the value for <CODE>name </CODE>
-     *              will not be altered by future modifications
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws NullPointerException         if the name is null, or if the name is an empty string.
+     * 
+     * @param name the name of the byte array
+     * @param value the byte array value to set in the Map; the array is copied
+     *                so that the value for <CODE>name </CODE> will not be
+     *                altered by future modifications
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws NullPointerException if the name is null, or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setBytes(String name, byte[] value) throws JMSException {
@@ -597,14 +657,17 @@
     }
 
     /**
-     * Sets a portion of the byte array value with the specified name into the Map.
-     *
-     * @param name   the name of the byte array
-     * @param value  the byte array value to set in the Map
+     * Sets a portion of the byte array value with the specified name into the
+     * Map.
+     * 
+     * @param name the name of the byte array
+     * @param value the byte array value to set in the Map
      * @param offset the initial offset within the byte array
      * @param length the number of bytes to use
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setBytes(String name, byte[] value, int offset, int length) throws JMSException {
@@ -615,15 +678,19 @@
     }
 
     /**
-     * Sets an object value with the specified name into the Map. <P> This method works only for the objectified
-     * primitive object types (<code>Integer</code>,<code>Double</code>, <code>Long</code> &nbsp;...),
-     * <code>String</code> objects, and byte arrays.
-     *
-     * @param name  the name of the Java object
+     * Sets an object value with the specified name into the Map.
+     * <P>
+     * This method works only for the objectified primitive object types (<code>Integer</code>,<code>Double</code>,
+     * <code>Long</code> &nbsp;...), <code>String</code> objects, and byte
+     * arrays.
+     * 
+     * @param name the name of the Java object
      * @param value the Java object value to set in the Map
-     * @throws JMSException                 if the JMS provider fails to write the message due to some internal error.
-     * @throws IllegalArgumentException     if the name is null or if the name is an empty string.
-     * @throws MessageFormatException       if the object is invalid.
+     * @throws JMSException if the JMS provider fails to write the message due
+     *                 to some internal error.
+     * @throws IllegalArgumentException if the name is null or if the name is an
+     *                 empty string.
+     * @throws MessageFormatException if the object is invalid.
      * @throws MessageNotWriteableException if the message is in read-only mode.
      */
     public void setObject(String name, Object value) throws JMSException {
@@ -640,32 +707,32 @@
     }
 
     /**
-     * Indicates whether an item exists in this <CODE>MapMessage</CODE> object.
-     *
+     * Indicates whether an item exists in this <CODE>MapMessage</CODE>
+     * object.
+     * 
      * @param name the name of the item to test
      * @return true if the item exists
-     * @throws JMSException if the JMS provider fails to determine if the item exists due to some internal error.
+     * @throws JMSException if the JMS provider fails to determine if the item
+     *                 exists due to some internal error.
      */
     public boolean itemExists(String name) throws JMSException {
         initializeReading();
         return map.containsKey(name);
     }
-    
+
     private void initializeReading() throws JMSException {
         loadContent();
     }
-    
+
     private void initializeWriting() throws MessageNotWriteableException {
         checkReadOnlyBody();
         setContent(null);
     }
 
     public String toString() {
-        return super.toString() + " ActiveMQMapMessage{ " +
-                "theTable = " + map +
-                " }";
+        return super.toString() + " ActiveMQMapMessage{ " + "theTable = " + map + " }";
     }
-    
+
     public Map getContentMap() throws JMSException {
         initializeReading();
         return map;

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQObjectMessage.java Wed Aug  8 11:56:59 2007
@@ -17,9 +17,6 @@
 
 package org.apache.activemq.command;
 
-
-
-
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.util.ByteArrayInputStream;
 import org.apache.activemq.util.ByteArrayOutputStream;
@@ -40,17 +37,21 @@
 import java.util.zip.InflaterInputStream;
 
 /**
- * An <CODE>ObjectMessage</CODE> object is used to send a message that contains a serializable object in the Java
- * programming language ("Java object"). It inherits from the <CODE>Message</CODE> interface and adds a body containing
- * a single reference to an object. Only <CODE>Serializable</CODE> Java objects can be used.
- * <p/>
- * <P>If a collection of Java objects must be sent, one of the <CODE>Collection</CODE> classes provided since JDK 1.2
- * can be used.
- * <p/>
- * <P>When a client receives an <CODE>ObjectMessage</CODE>, it is in read-only mode. If a client attempts to write to
- * the message at this point, a <CODE>MessageNotWriteableException</CODE> is thrown. If <CODE>clearBody</CODE> is
- * called, the message can now be both read from and written to.
- *
+ * An <CODE>ObjectMessage</CODE> object is used to send a message that
+ * contains a serializable object in the Java programming language ("Java
+ * object"). It inherits from the <CODE>Message</CODE> interface and adds a
+ * body containing a single reference to an object. Only
+ * <CODE>Serializable</CODE> Java objects can be used. <p/>
+ * <P>
+ * If a collection of Java objects must be sent, one of the
+ * <CODE>Collection</CODE> classes provided since JDK 1.2 can be used. <p/>
+ * <P>
+ * When a client receives an <CODE>ObjectMessage</CODE>, it is in read-only
+ * mode. If a client attempts to write to the message at this point, a
+ * <CODE>MessageNotWriteableException</CODE> is thrown. If
+ * <CODE>clearBody</CODE> is called, the message can now be both read from and
+ * written to.
+ * 
  * @openwire:marshaller code="26"
  * @see javax.jms.Session#createObjectMessage()
  * @see javax.jms.Session#createObjectMessage(Serializable)
@@ -61,7 +62,9 @@
  * @see javax.jms.TextMessage
  */
 public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMessage {
-    static final ClassLoader ACTIVEMQ_CLASSLOADER = ActiveMQObjectMessage.class.getClassLoader(); //TODO verify classloader
+    static final ClassLoader ACTIVEMQ_CLASSLOADER = ActiveMQObjectMessage.class.getClassLoader(); // TODO
+                                                                                                    // verify
+                                                                                                    // classloader
     public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_OBJECT_MESSAGE;
 
     protected transient Serializable object;
@@ -75,9 +78,9 @@
     private void copy(ActiveMQObjectMessage copy) {
         storeContent();
         super.copy(copy);
-        copy.object=null;
+        copy.object = null;
     }
-        
+
     public void storeContent() {
         ByteSequence bodyAsBytes = getContent();
         if (bodyAsBytes == null && object != null) {
@@ -85,7 +88,7 @@
                 ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
                 OutputStream os = bytesOut;
                 ActiveMQConnection connection = getConnection();
-                if (connection!=null && connection.isUseCompression()) {
+                if (connection != null && connection.isUseCompression()) {
                     compressed = true;
                     os = new DeflaterOutputStream(os);
                 }
@@ -110,14 +113,16 @@
         return "jms/object-message";
     }
 
-
     /**
-     * Clears out the message body. Clearing a message's body does not clear its header values or property entries.
-     * <p/>
-     * <P>If this message body was read-only, calling this method leaves the message body in the same state as an empty
-     * body in a newly created message.
-     *
-     * @throws JMSException if the JMS provider fails to clear the message body due to some internal error.
+     * Clears out the message body. Clearing a message's body does not clear its
+     * header values or property entries. <p/>
+     * <P>
+     * If this message body was read-only, calling this method leaves the
+     * message body in the same state as an empty body in a newly created
+     * message.
+     * 
+     * @throws JMSException if the JMS provider fails to clear the message body
+     *                 due to some internal error.
      */
 
     public void clearBody() throws JMSException {
@@ -126,16 +131,18 @@
     }
 
     /**
-     * Sets the serializable object containing this message's data. It is important to note that an
-     * <CODE>ObjectMessage</CODE> contains a snapshot of the object at the time <CODE>setObject()</CODE> is called;
-     * subsequent modifications of the object will have no effect on the <CODE>ObjectMessage</CODE> body.
-     *
+     * Sets the serializable object containing this message's data. It is
+     * important to note that an <CODE>ObjectMessage</CODE> contains a
+     * snapshot of the object at the time <CODE>setObject()</CODE> is called;
+     * subsequent modifications of the object will have no effect on the
+     * <CODE>ObjectMessage</CODE> body.
+     * 
      * @param newObject the message's data
-     * @throws JMSException if the JMS provider fails to set the object due to some internal error.
-     * @throws javax.jms.MessageFormatException
-     *                      if object serialization fails.
-     * @throws javax.jms.MessageNotWriteableException
-     *                      if the message is in read-only mode.
+     * @throws JMSException if the JMS provider fails to set the object due to
+     *                 some internal error.
+     * @throws javax.jms.MessageFormatException if object serialization fails.
+     * @throws javax.jms.MessageNotWriteableException if the message is in
+     *                 read-only mode.
      */
 
     public void setObject(Serializable newObject) throws JMSException {
@@ -143,30 +150,30 @@
         this.object = newObject;
         setContent(null);
         ActiveMQConnection connection = getConnection();
-        if( connection==null || !connection.isObjectMessageSerializationDefered() ) {
+        if (connection == null || !connection.isObjectMessageSerializationDefered()) {
             storeContent();
         }
     }
 
-
     /**
-     * Gets the serializable object containing this message's data. The default value is null.
-     *
+     * Gets the serializable object containing this message's data. The default
+     * value is null.
+     * 
      * @return the serializable object containing this message's data
      * @throws JMSException
      */
     public Serializable getObject() throws JMSException {
-        if (object == null && getContent()!=null ) {
+        if (object == null && getContent() != null) {
             try {
                 ByteSequence content = getContent();
                 InputStream is = new ByteArrayInputStream(content);
-                if( isCompressed() ) {
+                if (isCompressed()) {
                     is = new InflaterInputStream(is);
                 }
                 DataInputStream dataIn = new DataInputStream(is);
                 ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn);
                 try {
-                    object = (Serializable) objIn.readObject();
+                    object = (Serializable)objIn.readObject();
                 } catch (ClassNotFoundException ce) {
                     throw new IOException(ce.getMessage());
                 }
@@ -180,8 +187,9 @@
 
     public void onMessageRolledBack() {
         super.onMessageRolledBack();
-        
-        // lets force the object to be deserialized again - as we could have changed the object
+
+        // lets force the object to be deserialized again - as we could have
+        // changed the object
         object = null;
     }
 

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQQueue.java Wed Aug  8 11:56:59 2007
@@ -21,15 +21,16 @@
 
 /**
  * 
- * @org.apache.xbean.XBean element="queue" description="An ActiveMQ Queue Destination"
- *                  
+ * @org.apache.xbean.XBean element="queue" description="An ActiveMQ Queue
+ *                         Destination"
+ * 
  * @openwire:marshaller code="100"
  * @version $Revision: 1.5 $
  */
 public class ActiveMQQueue extends ActiveMQDestination implements Queue {
 
     private static final long serialVersionUID = -3885260014960795889L;
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.ACTIVEMQ_QUEUE;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_QUEUE;
 
     public ActiveMQQueue() {
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java Wed Aug  8 11:56:59 2007
@@ -1130,8 +1130,9 @@
         checkWriteOnlyBody();
         if (this.dataIn == null) {
             ByteSequence data = getContent();
-            if (data == null)
+            if (data == null) {
                 data = new ByteSequence(new byte[] {}, 0, 0);
+            }
             InputStream is = new ByteArrayInputStream(data);
             if (isCompressed()) {
                 is = new InflaterInputStream(is);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTempTopic.java Wed Aug  8 11:56:59 2007
@@ -26,20 +26,19 @@
 public class ActiveMQTempTopic extends ActiveMQTempDestination implements TemporaryTopic {
 
     private static final long serialVersionUID = -4325596784597300253L;
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.ACTIVEMQ_TEMP_TOPIC;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_TEMP_TOPIC;
 
     public ActiveMQTempTopic() {
     }
-    
+
     public ActiveMQTempTopic(String name) {
         super(name);
     }
-    
+
     public ActiveMQTempTopic(ConnectionId connectionId, long sequenceId) {
         super(connectionId.getValue(), sequenceId);
     }
 
-    
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQTextMessage.java Wed Aug  8 11:56:59 2007
@@ -138,8 +138,9 @@
     public int getSize() {
         if (size == 0 && content == null && text != null) {
             size = AVERAGE_MESSAGE_SIZE_OVERHEAD;
-            if (marshalledProperties != null)
+            if (marshalledProperties != null) {
                 size += marshalledProperties.getLength();
+            }
             size = text.length() * 2;
         }
         return super.getSize();

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/BrokerId.java Wed Aug  8 11:56:59 2007
@@ -37,10 +37,12 @@
     }
 
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (o == null || o.getClass() != BrokerId.class)
+        }
+        if (o == null || o.getClass() != BrokerId.class) {
             return false;
+        }
         BrokerId id = (BrokerId)o;
         return value.equals(id.value);
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionError.java Wed Aug  8 11:56:59 2007
@@ -18,7 +18,6 @@
 
 import org.apache.activemq.state.CommandVisitor;
 
-
 /**
  * 
  * @openwire:marshaller code="16"
@@ -26,38 +25,39 @@
  */
 public class ConnectionError extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.CONNECTION_ERROR;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_ERROR;
 
     protected ConnectionId connectionId;
     Throwable exception;
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
-       
+
     public Response visit(CommandVisitor visitor) throws Exception {
         return visitor.processConnectionError(this);
     }
 
     /**
      * @openwire:property version=1
-     */    
+     */
     public Throwable getException() {
         return exception;
     }
-    
+
     public void setException(Throwable exception) {
         this.exception = exception;
     }
 
     /**
      * @openwire:property version=1
-     */    
+     */
     public ConnectionId getConnectionId() {
         return connectionId;
     }
+
     public void setConnectionId(ConnectionId connectionId) {
         this.connectionId = connectionId;
     }
-    
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConnectionInfo.java Wed Aug  8 11:56:59 2007
@@ -18,16 +18,15 @@
 
 import org.apache.activemq.state.CommandVisitor;
 
-
 /**
  * 
  * @openwire:marshaller code="3"
  * @version $Revision: 1.11 $
  */
 public class ConnectionInfo extends BaseCommand {
-    
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.CONNECTION_INFO;
-    
+
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONNECTION_INFO;
+
     protected ConnectionId connectionId;
     protected String clientId;
     protected String userName;
@@ -35,19 +34,20 @@
     protected BrokerId[] brokerPath;
     protected boolean brokerMasterConnector;
     protected boolean manageable;
-    protected boolean clientMaster=true;
-    protected transient Object transportContext; 
-    
-    public ConnectionInfo() {        
-    }    
+    protected boolean clientMaster = true;
+    protected transient Object transportContext;
+
+    public ConnectionInfo() {
+    }
+
     public ConnectionInfo(ConnectionId connectionId) {
-        this.connectionId=connectionId;
+        this.connectionId = connectionId;
     }
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
-    
+
     public void copy(ConnectionInfo copy) {
         super.copy(copy);
         copy.clientId = clientId;
@@ -56,7 +56,7 @@
         copy.brokerPath = brokerPath;
         copy.brokerMasterConnector = brokerMasterConnector;
         copy.manageable = manageable;
-    } 
+    }
 
     /**
      * @openwire:property version=1 cache=true
@@ -64,20 +64,22 @@
     public ConnectionId getConnectionId() {
         return connectionId;
     }
+
     public void setConnectionId(ConnectionId connectionId) {
         this.connectionId = connectionId;
     }
-    
+
     /**
      * @openwire:property version=1
      */
     public String getClientId() {
         return clientId;
     }
+
     public void setClientId(String clientId) {
         this.clientId = clientId;
     }
-    
+
     public RemoveInfo createRemoveCommand() {
         RemoveInfo command = new RemoveInfo(getConnectionId());
         command.setResponseRequired(isResponseRequired());
@@ -90,6 +92,7 @@
     public String getPassword() {
         return password;
     }
+
     public void setPassword(String password) {
         this.password = password;
     }
@@ -100,85 +103,91 @@
     public String getUserName() {
         return userName;
     }
+
     public void setUserName(String userName) {
         this.userName = userName;
     }
 
     /**
-     * The route of brokers the command has moved through. 
+     * The route of brokers the command has moved through.
      * 
      * @openwire:property version=1 cache=true
      */
     public BrokerId[] getBrokerPath() {
         return brokerPath;
     }
+
     public void setBrokerPath(BrokerId[] brokerPath) {
         this.brokerPath = brokerPath;
     }
-    
+
     public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddConnection( this );
+        return visitor.processAddConnection(this);
     }
+
     /**
      * @openwire:property version=1
      */
-    public boolean isBrokerMasterConnector(){
+    public boolean isBrokerMasterConnector() {
         return brokerMasterConnector;
     }
+
     /**
      * @param brokerMasterConnector The brokerMasterConnector to set.
      */
-    public void setBrokerMasterConnector(boolean slaveBroker){
-        this.brokerMasterConnector=slaveBroker;
+    public void setBrokerMasterConnector(boolean slaveBroker) {
+        this.brokerMasterConnector = slaveBroker;
     }
+
     /**
      * @openwire:property version=1
      */
-    public boolean isManageable(){
+    public boolean isManageable() {
         return manageable;
     }
+
     /**
      * @param manageable The manageable to set.
      */
-    public void setManageable(boolean manageable){
-        this.manageable=manageable;
+    public void setManageable(boolean manageable) {
+        this.manageable = manageable;
     }
-    
+
     /**
-	 * Transports may wish to associate additional data with the connection.  For
-	 * example, an SSL transport may use this field to attach the client certificates
-	 * used when the conection was established.
+     * Transports may wish to associate additional data with the connection. For
+     * example, an SSL transport may use this field to attach the client
+     * certificates used when the conection was established.
      * 
      * @return the transport context.
      */
-	public Object getTransportContext() {
-		return transportContext;
-	}
-	
-	/**
-	 * Transports may wish to associate additional data with the connection.  For
-	 * example, an SSL transport may use this field to attach the client certificates
-	 * used when the conection was established.
-	 *  
-	 * @param transportContext value used to set the transport context
-	 */
-	public void setTransportContext(Object transportContext) {
-		this.transportContext = transportContext;
-	}
-    
+    public Object getTransportContext() {
+        return transportContext;
+    }
+
+    /**
+     * Transports may wish to associate additional data with the connection. For
+     * example, an SSL transport may use this field to attach the client
+     * certificates used when the conection was established.
+     * 
+     * @param transportContext value used to set the transport context
+     */
+    public void setTransportContext(Object transportContext) {
+        this.transportContext = transportContext;
+    }
+
     /**
      * @openwire:property version=2
      * @return the clientMaster
      */
-    public boolean isClientMaster(){
+    public boolean isClientMaster() {
         return this.clientMaster;
     }
-    
+
     /**
      * @param clientMaster the clientMaster to set
      */
-    public void setClientMaster(boolean clientMaster){
-        this.clientMaster=clientMaster;
+    public void setClientMaster(boolean clientMaster) {
+        this.clientMaster = clientMaster;
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ConsumerInfo.java Wed Aug  8 11:56:59 2007
@@ -46,14 +46,17 @@
     protected byte priority;
     protected BrokerId[] brokerPath;
     protected boolean optimizedAcknowledge;
-    protected transient int currentPrefetchSize;// used by the broker
-    protected boolean noRangeAcks; // if true, the consumer will not send range
-                                    // acks.
+    // used by the broker
+    protected transient int currentPrefetchSize;
+    // if true, the consumer will not send range
+    protected boolean noRangeAcks;
+    // acks.
 
     protected BooleanExpression additionalPredicate;
     protected transient boolean networkSubscription; // this subscription
-                                                        // originated from a
-                                                        // network connection
+
+    // originated from a
+    // network connection
 
     public ConsumerInfo() {
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/DataResponse.java Wed Aug  8 11:56:59 2007
@@ -22,15 +22,16 @@
  * @version $Revision$
  */
 public class DataResponse extends Response {
-    
+
     DataStructure data;
-    
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.DATA_RESPONSE;
-    
-    public DataResponse() {    
+
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_RESPONSE;
+
+    public DataResponse() {
     }
+
     public DataResponse(DataStructure data) {
-        this.data=data;
+        this.data = data;
     }
 
     public byte getDataStructureType() {
@@ -39,12 +40,13 @@
 
     /**
      * @openwire:property version=1
-     */    
+     */
     public DataStructure getData() {
         return data;
     }
+
     public void setData(DataStructure data) {
         this.data = data;
     }
-    
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/MessageDispatch.java Wed Aug  8 11:56:59 2007
@@ -18,7 +18,6 @@
 
 import org.apache.activemq.state.CommandVisitor;
 
-
 /**
  * 
  * @openwire:marshaller code="21"
@@ -26,7 +25,7 @@
  */
 public class MessageDispatch extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.MESSAGE_DISPATCH;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.MESSAGE_DISPATCH;
 
     protected ConsumerId consumerId;
     protected ActiveMQDestination destination;
@@ -36,11 +35,11 @@
     transient protected long deliverySequenceId;
     transient protected Object consumer;
     transient protected Runnable transmitCallback;
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
-    
+
     public boolean isMessageDispatch() {
         return true;
     }
@@ -51,6 +50,7 @@
     public ConsumerId getConsumerId() {
         return consumerId;
     }
+
     public void setConsumerId(ConsumerId consumerId) {
         this.consumerId = consumerId;
     }
@@ -61,16 +61,18 @@
     public ActiveMQDestination getDestination() {
         return destination;
     }
+
     public void setDestination(ActiveMQDestination destination) {
         this.destination = destination;
     }
-    
+
     /**
      * @openwire:property version=1
      */
     public Message getMessage() {
         return message;
     }
+
     public void setMessage(Message message) {
         this.message = message;
     }
@@ -78,16 +80,18 @@
     public long getDeliverySequenceId() {
         return deliverySequenceId;
     }
+
     public void setDeliverySequenceId(long deliverySequenceId) {
         this.deliverySequenceId = deliverySequenceId;
     }
-    
+
     /**
      * @openwire:property version=1
      */
     public int getRedeliveryCounter() {
         return redeliveryCounter;
     }
+
     public void setRedeliveryCounter(int deliveryCounter) {
         this.redeliveryCounter = deliveryCounter;
     }
@@ -104,12 +108,12 @@
         return visitor.processMessageDispatch(this);
     }
 
-	public Runnable getTransmitCallback() {
-		return transmitCallback;
-	}
-
-	public void setTransmitCallback(Runnable transmitCallback) {
-		this.transmitCallback = transmitCallback;
-	}
-    
+    public Runnable getTransmitCallback() {
+        return transmitCallback;
+    }
+
+    public void setTransmitCallback(Runnable transmitCallback) {
+        this.transmitCallback = transmitCallback;
+    }
+
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ProducerInfo.java Wed Aug  8 11:56:59 2007
@@ -25,14 +25,14 @@
  */
 public class ProducerInfo extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.PRODUCER_INFO;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PRODUCER_INFO;
 
     protected ProducerId producerId;
     protected ActiveMQDestination destination;
     protected BrokerId[] brokerPath;
     protected boolean dispatchAsync;
     protected int windowSize;
-    
+
     public ProducerInfo() {
     }
 
@@ -59,77 +59,80 @@
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
-    
+
     /**
      * @openwire:property version=1 cache=true
      */
     public ProducerId getProducerId() {
         return producerId;
     }
+
     public void setProducerId(ProducerId producerId) {
         this.producerId = producerId;
     }
-    
+
     /**
      * @openwire:property version=1 cache=true
      */
     public ActiveMQDestination getDestination() {
         return destination;
-    }    
+    }
+
     public void setDestination(ActiveMQDestination destination) {
         this.destination = destination;
     }
-    
+
     public RemoveInfo createRemoveCommand() {
         RemoveInfo command = new RemoveInfo(getProducerId());
         command.setResponseRequired(isResponseRequired());
         return command;
     }
-    
+
     /**
-     * The route of brokers the command has moved through. 
+     * The route of brokers the command has moved through.
      * 
      * @openwire:property version=1 cache=true
      */
     public BrokerId[] getBrokerPath() {
         return brokerPath;
     }
+
     public void setBrokerPath(BrokerId[] brokerPath) {
         this.brokerPath = brokerPath;
     }
 
     public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddProducer( this );
+        return visitor.processAddProducer(this);
     }
 
     /**
-     * If the broker should dispatch messages from this producer async.  Since sync
-     * dispatch could potentally block the producer thread, this could be an important
-     * setting for the producer.
+     * If the broker should dispatch messages from this producer async. Since
+     * sync dispatch could potentally block the producer thread, this could be
+     * an important setting for the producer.
      * 
      * @openwire:property version=2
      */
-	public boolean isDispatchAsync() {
-		return dispatchAsync;
-	}
-
-	public void setDispatchAsync(boolean dispatchAsync) {
-		this.dispatchAsync = dispatchAsync;
-	}
+    public boolean isDispatchAsync() {
+        return dispatchAsync;
+    }
+
+    public void setDispatchAsync(boolean dispatchAsync) {
+        this.dispatchAsync = dispatchAsync;
+    }
 
     /**
-     * Used to configure the producer window size.  A producer will
-     * send up to the configured window size worth of payload data to
-     * the broker before waiting for an Ack that allows him to send more.
+     * Used to configure the producer window size. A producer will send up to
+     * the configured window size worth of payload data to the broker before
+     * waiting for an Ack that allows him to send more.
      * 
      * @openwire:property version=3
      */
-	public int getWindowSize() {
-		return windowSize;
-	}
-
-	public void setWindowSize(int windowSize) {
-		this.windowSize = windowSize;
-	}
+    public int getWindowSize() {
+        return windowSize;
+    }
+
+    public void setWindowSize(int windowSize) {
+        this.windowSize = windowSize;
+    }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/RemoveInfo.java Wed Aug  8 11:56:59 2007
@@ -22,26 +22,27 @@
 
 /**
  * Removes a consumer, producer, session or connection.
- *  
+ * 
  * @openwire:marshaller code="12"
  * @version $Revision$
  */
 public class RemoveInfo extends BaseCommand {
-    
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.REMOVE_INFO;
+
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.REMOVE_INFO;
 
     protected DataStructure objectId;
 
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
-    }    
+    }
 
-    public RemoveInfo() {        
+    public RemoveInfo() {
     }
+
     public RemoveInfo(DataStructure objectId) {
-        this.objectId=objectId;
+        this.objectId = objectId;
     }
-    
+
     /**
      * @openwire:property version=1 cache=true
      */
@@ -56,32 +57,32 @@
     public Response visit(CommandVisitor visitor) throws Exception {
         switch (objectId.getDataStructureType()) {
         case ConnectionId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveConnection((ConnectionId) objectId);
+            return visitor.processRemoveConnection((ConnectionId)objectId);
         case SessionId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveSession((SessionId) objectId);
+            return visitor.processRemoveSession((SessionId)objectId);
         case ConsumerId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveConsumer((ConsumerId) objectId);
+            return visitor.processRemoveConsumer((ConsumerId)objectId);
         case ProducerId.DATA_STRUCTURE_TYPE:
-            return visitor.processRemoveProducer((ProducerId) objectId);
+            return visitor.processRemoveProducer((ProducerId)objectId);
         default:
-            throw new IOException("Unknown remove command type: "+ objectId.getDataStructureType());
+            throw new IOException("Unknown remove command type: " + objectId.getDataStructureType());
         }
     }
-    
+
     /**
      * Returns true if this event is for a removed connection
      */
     public boolean isConnectionRemove() {
         return objectId.getDataStructureType() == ConnectionId.DATA_STRUCTURE_TYPE;
     }
-    
+
     /**
      * Returns true if this event is for a removed session
      */
     public boolean isSessionRemove() {
         return objectId.getDataStructureType() == SessionId.DATA_STRUCTURE_TYPE;
     }
-    
+
     /**
      * Returns true if this event is for a removed consumer
      */

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionId.java Wed Aug  8 11:56:59 2007
@@ -21,62 +21,61 @@
  * @openwire:marshaller code="121"
  * @version $Revision$
  */
-public class SessionId implements DataStructure  {
+public class SessionId implements DataStructure {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.SESSION_ID;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_ID;
 
     protected String connectionId;
     protected long value;
-    
+
     protected transient int hashCode;
     protected transient String key;
     protected transient ConnectionId parentId;
-    
-    public SessionId() {        
+
+    public SessionId() {
     }
-        
+
     public SessionId(ConnectionId connectionId, long sessionId) {
         this.connectionId = connectionId.getValue();
-        this.value=sessionId;
+        this.value = sessionId;
     }
-    
+
     public SessionId(SessionId id) {
         this.connectionId = id.getConnectionId();
-        this.value=id.getValue();
+        this.value = id.getValue();
     }
 
     public SessionId(ProducerId id) {
         this.connectionId = id.getConnectionId();
-        this.value=id.getSessionId();
+        this.value = id.getSessionId();
     }
-    
+
     public SessionId(ConsumerId id) {
         this.connectionId = id.getConnectionId();
-        this.value=id.getSessionId();
+        this.value = id.getSessionId();
     }
-    
+
     public ConnectionId getParentId() {
-        if( parentId == null ) {
+        if (parentId == null) {
             parentId = new ConnectionId(this);
         }
         return parentId;
     }
 
     public int hashCode() {
-        if( hashCode == 0 ) {
+        if (hashCode == 0) {
             hashCode = connectionId.hashCode() ^ (int)value;
         }
         return hashCode;
     }
-    
+
     public boolean equals(Object o) {
-        if( this == o )
+        if (this == o)
             return true;
-        if( o == null || o.getClass()!=SessionId.class )
+        if (o == null || o.getClass() != SessionId.class)
             return false;
-        SessionId id = (SessionId) o;
-        return value==id.value 
-               && connectionId.equals(id.connectionId);
+        SessionId id = (SessionId)o;
+        return value == id.value && connectionId.equals(id.connectionId);
     }
 
     public byte getDataStructureType() {
@@ -88,7 +87,8 @@
      */
     public String getConnectionId() {
         return connectionId;
-    }    
+    }
+
     public void setConnectionId(String connectionId) {
         this.connectionId = connectionId;
     }
@@ -99,13 +99,14 @@
     public long getValue() {
         return value;
     }
+
     public void setValue(long sessionId) {
         this.value = sessionId;
     }
-    
+
     public String toString() {
-        if( key==null ) {
-            key = connectionId+":"+value;
+        if (key == null) {
+            key = connectionId + ":" + value;
         }
         return key;
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SessionInfo.java Wed Aug  8 11:56:59 2007
@@ -25,22 +25,22 @@
  */
 public class SessionInfo extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.SESSION_INFO;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SESSION_INFO;
 
     protected SessionId sessionId;
-    
+
     public SessionInfo() {
         sessionId = new SessionId();
     }
-    
+
     public SessionInfo(ConnectionInfo connectionInfo, long sessionId) {
         this.sessionId = new SessionId(connectionInfo.getConnectionId(), sessionId);
     }
-    
+
     public SessionInfo(SessionId sessionId) {
         this.sessionId = sessionId;
     }
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
@@ -50,11 +50,12 @@
      */
     public SessionId getSessionId() {
         return sessionId;
-    }    
+    }
+
     public void setSessionId(SessionId sessionId) {
         this.sessionId = sessionId;
     }
-    
+
     public RemoveInfo createRemoveCommand() {
         RemoveInfo command = new RemoveInfo(getSessionId());
         command.setResponseRequired(isResponseRequired());
@@ -62,7 +63,7 @@
     }
 
     public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processAddSession( this);
+        return visitor.processAddSession(this);
     }
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ShutdownInfo.java Wed Aug  8 11:56:59 2007
@@ -25,19 +25,18 @@
  */
 public class ShutdownInfo extends BaseCommand {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.SHUTDOWN_INFO;
-    
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.SHUTDOWN_INFO;
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
 
     public Response visit(CommandVisitor visitor) throws Exception {
-        return visitor.processShutdown( this );
+        return visitor.processShutdown(this);
     }
-    
-    public boolean isShutdownInfo(){
+
+    public boolean isShutdownInfo() {
         return true;
     }
-
 
 }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/SubscriptionInfo.java Wed Aug  8 11:56:59 2007
@@ -18,7 +18,6 @@
 
 import org.apache.activemq.util.IntrospectionSupport;
 
-
 /**
  * Used to represent a durable subscription.
  * 
@@ -27,14 +26,14 @@
  */
 public class SubscriptionInfo implements DataStructure {
 
-    public static final byte DATA_STRUCTURE_TYPE=CommandTypes.DURABLE_SUBSCRIPTION_INFO;
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DURABLE_SUBSCRIPTION_INFO;
 
     protected ActiveMQDestination subscribedDestination;
     protected ActiveMQDestination destination;
     protected String clientId;
     protected String subscriptionName;
     protected String selector;
-    
+
     public byte getDataStructureType() {
         return DATA_STRUCTURE_TYPE;
     }
@@ -51,8 +50,8 @@
     }
 
     /**
-     * This is the a resolved destination that the subscription is receiving messages from.
-     * This will never be a pattern or a composite destination.
+     * This is the a resolved destination that the subscription is receiving
+     * messages from. This will never be a pattern or a composite destination.
      * 
      * @openwire:property version=1 cache=true
      */
@@ -84,13 +83,13 @@
     }
 
     /**
-     * @param subscriptionName
-     *  * @deprecated
+     * @param subscriptionName *
+     * @deprecated
      */
     public void setSubcriptionName(String subscriptionName) {
         this.subscriptionName = subscriptionName;
     }
-    
+
     public String getSubscriptionName() {
         return subscriptionName;
     }
@@ -102,46 +101,51 @@
     public boolean isMarshallAware() {
         return false;
     }
-    
+
     public String toString() {
         return IntrospectionSupport.toString(this);
     }
-    
+
     public int hashCode() {
-        int h1 = clientId != null ? clientId.hashCode():-1;
-        int h2 = subscriptionName != null ? subscriptionName.hashCode():-1;
+        int h1 = clientId != null ? clientId.hashCode() : -1;
+        int h2 = subscriptionName != null ? subscriptionName.hashCode() : -1;
         return h1 ^ h2;
     }
-    
-    public boolean equals(Object obj){
-        boolean result=false;
-        if(obj instanceof SubscriptionInfo){
-            SubscriptionInfo other=(SubscriptionInfo)obj;
-            result=(clientId==null&&other.clientId==null||clientId!=null&&other.clientId!=null
-                    &&clientId.equals(other.clientId))
-                    &&(subscriptionName==null&&other.subscriptionName==null||subscriptionName!=null
-                            &&other.subscriptionName!=null&&subscriptionName.equals(other.subscriptionName));
+
+    public boolean equals(Object obj) {
+        boolean result = false;
+        if (obj instanceof SubscriptionInfo) {
+            SubscriptionInfo other = (SubscriptionInfo)obj;
+            result = (clientId == null && other.clientId == null || clientId != null
+                                                                    && other.clientId != null
+                                                                    && clientId.equals(other.clientId))
+                     && (subscriptionName == null && other.subscriptionName == null || subscriptionName != null
+                                                                                       && other.subscriptionName != null
+                                                                                       && subscriptionName
+                                                                                           .equals(other.subscriptionName));
         }
         return result;
     }
 
     /**
-     * The destination the client originally subscribed to.. This may not match the {@see getDestination} method
-     * if the subscribed destination uses patterns or composites.
-     *  
-     *  If the subscribed destinationis not set, this just ruturns the desitination.
-     *  
+     * The destination the client originally subscribed to.. This may not match
+     * the {@see getDestination} method if the subscribed destination uses
+     * patterns or composites.
+     * 
+     * If the subscribed destinationis not set, this just ruturns the
+     * desitination.
+     * 
      * @openwire:property version=3
      */
-	public ActiveMQDestination getSubscribedDestination() {
-		if( subscribedDestination == null ) {
-			return getDestination();
-		}
-		return subscribedDestination;
-	}
-
-	public void setSubscribedDestination(ActiveMQDestination subscribedDestination) {
-		this.subscribedDestination = subscribedDestination;
-	}
+    public ActiveMQDestination getSubscribedDestination() {
+        if (subscribedDestination == null) {
+            return getDestination();
+        }
+        return subscribedDestination;
+    }
+
+    public void setSubscribedDestination(ActiveMQDestination subscribedDestination) {
+        this.subscribedDestination = subscribedDestination;
+    }
 
 }