activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r587322 - in /activemq/activemq-cpp/tags/cms-1.2: RELEASE_NOTES.txt configure.ac src/main/cms/BytesMessage.h
Date Tue, 23 Oct 2007 00:20:41 GMT
Author: nmittler
Date: Mon Oct 22 17:20:38 2007
New Revision: 587322

URL: http://svn.apache.org/viewvc?rev=587322&view=rev
Log:
Updating CMS API to make the read methods in BytesMessage const.

Modified:
    activemq/activemq-cpp/tags/cms-1.2/RELEASE_NOTES.txt
    activemq/activemq-cpp/tags/cms-1.2/configure.ac
    activemq/activemq-cpp/tags/cms-1.2/src/main/cms/BytesMessage.h

Modified: activemq/activemq-cpp/tags/cms-1.2/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.2/RELEASE_NOTES.txt?rev=587322&r1=587321&r2=587322&view=diff
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.2/RELEASE_NOTES.txt (original)
+++ activemq/activemq-cpp/tags/cms-1.2/RELEASE_NOTES.txt Mon Oct 22 17:20:38 2007
@@ -1,8 +1,19 @@
 =========================================================================
+==  Release Notes for CMS 1.2                                          ==
+=========================================================================
+
+== Overview ==
+
+This version makes the read methods on the BytesMessage const.  For
+asynchronous consumers, the onMessage method in the MessageListener
+interface is passed a const Message.  Having the read methods const
+allows the user to use the message without having to do a const_cast.
+
+=========================================================================
 ==  Release Notes for CMS 1.1                                          ==
 =========================================================================
 
-== Changes since 1.0 ==
+== Overview ==
 
 This version adds a new interface CMSProperties, which hides the
 implementation of the class used for Properties operations.  Also the

Modified: activemq/activemq-cpp/tags/cms-1.2/configure.ac
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.2/configure.ac?rev=587322&r1=587321&r2=587322&view=diff
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.2/configure.ac (original)
+++ activemq/activemq-cpp/tags/cms-1.2/configure.ac Mon Oct 22 17:20:38 2007
@@ -26,7 +26,7 @@
 ## Define the Version variables
 ## -----------------------------------------------
 CMS_LIBRARY_NAME=cms
-CMS_VERSION=1.1
+CMS_VERSION=1.2
 CMS_LIBRARY_VERSION=0:0:0
 CMS_RELEASE=0.0
 CMS_API_VERSION=${CMS_VERSION}

Modified: activemq/activemq-cpp/tags/cms-1.2/src/main/cms/BytesMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.2/src/main/cms/BytesMessage.h?rev=587322&r1=587321&r2=587322&view=diff
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.2/src/main/cms/BytesMessage.h (original)
+++ activemq/activemq-cpp/tags/cms-1.2/src/main/cms/BytesMessage.h Mon Oct 22 17:20:38 2007
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #ifndef _CMS_BYTESMESSAGE_H_
 #define _CMS_BYTESMESSAGE_H_
 
@@ -22,55 +22,54 @@
 #include <cms/Message.h>
 
 namespace cms{
-   
+
     class CMS_API BytesMessage : public Message{
-      
     public:
-   
+
         virtual ~BytesMessage(){}
 
         /**
-         * sets the bytes given to the message body.  
+         * sets the bytes given to the message body.
          * @param Byte Buffer to copy
          * @param Number of bytes in Buffer to copy
          * @throws CMSException
          */
-        virtual void setBodyBytes( 
-            const unsigned char* buffer, std::size_t numBytes ) 
+        virtual void setBodyBytes(
+            const unsigned char* buffer, std::size_t numBytes )
                 throw( CMSException ) = 0;
-            
+
         /**
          * Gets the bytes that are contained in this message, user should
-         * copy this data into a user allocated buffer.  Call 
+         * copy this data into a user allocated buffer.  Call
          * <code>getBodyLength</code> to determine the number of bytes
          * to expect.
          * @return const pointer to a byte buffer
          */
         virtual const unsigned char* getBodyBytes() const = 0;
-      
+
         /**
          * Returns the number of bytes contained in the body of this message.
          * @return number of bytes.
          */
         virtual std::size_t getBodyLength() const = 0;
-        
+
         /**
-         * Puts the message body in read-only mode and repositions the stream 
+         * Puts the message body in read-only mode and repositions the stream
          * of bytes to the beginning.
          * @throws CMSException
          */
         virtual void reset() throw ( cms::CMSException ) = 0;
-        
+
         /**
          * Reads a Boolean from the Bytes message stream
          * @returns boolean value from stream
          * @throws CMSException
          */
-        virtual bool readBoolean() throw ( cms::CMSException ) = 0;
-        
+        virtual bool readBoolean() const throw ( cms::CMSException ) = 0;
+
         /**
-         * Writes a boolean to the bytes message stream as a 1-byte value. 
-         * The value true is written as the value (byte)1; the value false 
+         * Writes a boolean to the bytes message stream as a 1-byte value.
+         * The value true is written as the value (byte)1; the value false
          * is written as the value (byte)0.
          * @param value - boolean to write to the stream
          * @throws CMSException
@@ -82,7 +81,7 @@
          * @returns unsigned char value from stream
          * @throws CMSException
          */
-        virtual unsigned char readByte() throw ( cms::CMSException ) = 0;
+        virtual unsigned char readByte() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a byte to the bytes message stream as a 1-byte value
@@ -95,22 +94,22 @@
          * Reads a byte array from the bytes message stream.
          *
          * If the length of vector value is less than the number of bytes
-         * remaining to be read from the stream, the vector should be filled. A 
+         * remaining to be read from the stream, the vector should be filled. A
          * subsequent call reads the next increment, and so on.
          *
-         * If the number of bytes remaining in the stream is less than the 
-         * length of vector value, the bytes should be read into the vector. The 
+         * If the number of bytes remaining in the stream is less than the
+         * length of vector value, the bytes should be read into the vector. The
          * return value of the total number of bytes read will be less than the
-         * length of the vector, indicating that there are no more bytes left to 
+         * length of the vector, indicating that there are no more bytes left to
          * be read from the stream. The next read of the stream returns -1.
-         * 
+         *
          * @param value - buffer to place data in
-         * @returns the total number of bytes read into the buffer, or -1 if 
-         *          there is no more data because the end of the stream has 
+         * @returns the total number of bytes read into the buffer, or -1 if
+         *          there is no more data because the end of the stream has
          *          been reached
          * @throws CMSException if an error occurs.
          */
-        virtual std::size_t readBytes( std::vector<unsigned char>& value ) 
+        virtual std::size_t readBytes( std::vector<unsigned char>& value ) const
             throw ( cms::CMSException ) = 0;
 
         /**
@@ -119,35 +118,35 @@
          * @param value - bytes to write to the stream
          * @throws CMSException
          */
-        virtual void writeBytes( const std::vector<unsigned char>& value ) 
+        virtual void writeBytes( const std::vector<unsigned char>& value )
             throw ( cms::CMSException ) = 0;
 
         /**
          * Reads a portion of the bytes message stream.
-         * 
-         * If the length of array value is less than the number of bytes 
-         * remaining to be read from the stream, the array should be filled. A 
+         *
+         * If the length of array value is less than the number of bytes
+         * remaining to be read from the stream, the array should be filled. A
          * subsequent call reads the next increment, and so on.
-         * 
-         * If the number of bytes remaining in the stream is less than the 
-         * length of array value, the bytes should be read into the array. The 
-         * return value of the total number of bytes read will be less than the 
-         * length of the array, indicating that there are no more bytes left to 
+         *
+         * If the number of bytes remaining in the stream is less than the
+         * length of array value, the bytes should be read into the array. The
+         * return value of the total number of bytes read will be less than the
+         * length of the array, indicating that there are no more bytes left to
          * be read from the stream. The next read of the stream returns -1.
-         * 
-         * If length is negative, or length is greater than the length of the 
-         * array value, then an IndexOutOfBoundsException is thrown. No bytes 
+         *
+         * If length is negative, or length is greater than the length of the
+         * array value, then an IndexOutOfBoundsException is thrown. No bytes
          * will be read from the stream for this exception case.
-         * 
+         *
          * @param value - the buffer into which the data is read
-         * @param length - the number of bytes to read; must be less than or 
+         * @param length - the number of bytes to read; must be less than or
          *                 equal to value.length
-         * @returns the total number of bytes read into the buffer, or -1 if 
-         *          there is no more data because the end of the stream has 
+         * @returns the total number of bytes read into the buffer, or -1 if
+         *          there is no more data because the end of the stream has
          *          been reached
          * @throws CMSException
          */
-        virtual std::size_t readBytes( unsigned char*& buffer, std::size_t length ) 
+        virtual std::size_t readBytes( unsigned char*& buffer, std::size_t length ) const
             throw ( cms::CMSException ) = 0;
 
         /**
@@ -167,7 +166,7 @@
          * @returns char value from stream
          * @throws CMSException
          */
-        virtual char readChar() throw ( cms::CMSException ) = 0;
+        virtual char readChar() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a char to the bytes message stream as a 1-byte value
@@ -181,7 +180,7 @@
          * @returns double value from stream
          * @throws CMSException
          */
-        virtual float readFloat() throw ( cms::CMSException ) = 0;
+        virtual float readFloat() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a float to the bytes message stream as a 4 byte value
@@ -195,7 +194,7 @@
          * @returns double value from stream
          * @throws CMSException
          */
-        virtual double readDouble() throw ( cms::CMSException ) = 0;
+        virtual double readDouble() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a double to the bytes message stream as a 8 byte value
@@ -209,7 +208,7 @@
          * @returns short value from stream
          * @throws CMSException
          */
-        virtual short readShort() throw ( cms::CMSException ) = 0;
+        virtual short readShort() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a signed short to the bytes message stream as a 2 byte value
@@ -223,7 +222,7 @@
          * @returns unsigned short value from stream
          * @throws CMSException
          */
-        virtual unsigned short readUnsignedShort() throw ( cms::CMSException ) = 0;
+        virtual unsigned short readUnsignedShort() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a unsigned short to the bytes message stream as a 2 byte value
@@ -237,7 +236,7 @@
          * @returns int value from stream
          * @throws CMSException
          */
-        virtual int readInt() throw ( cms::CMSException ) = 0;
+        virtual int readInt() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a signed int to the bytes message stream as a 4 byte value
@@ -251,7 +250,7 @@
          * @returns long long value from stream
          * @throws CMSException
          */
-        virtual long long readLong() throw ( cms::CMSException ) = 0;
+        virtual long long readLong() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes a long long to the bytes message stream as a 8 byte value
@@ -265,7 +264,7 @@
          * @returns String from stream
          * @throws CMSException
          */
-        virtual std::string readString() throw ( cms::CMSException ) = 0;
+        virtual std::string readString() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes an ASCII String to the Bytes message stream
@@ -279,7 +278,7 @@
          * @returns String from stream
          * @throws CMSException
          */
-        virtual std::string readUTF() throw ( cms::CMSException ) = 0;
+        virtual std::string readUTF() const throw ( cms::CMSException ) = 0;
 
         /**
          * Writes an UTF String to the BytesMessage stream
@@ -289,6 +288,7 @@
         virtual void writeUTF( const std::string& value ) throw ( cms::CMSException )
= 0;
 
         virtual BytesMessage* clone() const = 0;
+
    };
 }
 



Mime
View raw message