activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r501184 - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands: ActiveMQBytesMessage.cpp ActiveMQBytesMessage.h
Date Mon, 29 Jan 2007 21:09:44 GMT
Author: tabish
Date: Mon Jan 29 13:09:43 2007
New Revision: 501184

URL: http://svn.apache.org/viewvc?view=rev&rev=501184
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp?view=diff&rev=501184&r1=501183&r2=501184
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.cpp
Mon Jan 29 13:09:43 2007
@@ -25,7 +25,9 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQBytesMessage::ActiveMQBytesMessage() : 
-    ActiveMQMessageBase< cms::BytesMessage >()
+    ActiveMQMessageBase< cms::BytesMessage >(),
+    dataInputStream( &inputStream ),
+    dataOutputStream( &outputStream )
 {
 }
 

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h?view=diff&rev=501184&r1=501183&r2=501184
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQBytesMessage.h
Mon Jan 29 13:09:43 2007
@@ -25,6 +25,10 @@
 
 #include <activemq/connector/openwire/commands/ActiveMQMessageBase.h>
 #include <activemq/util/Config.h>
+#include <activemq/io/ByteArrayInputStream.h>
+#include <activemq/io/ByteArrayOutputStream.h>
+#include <activemq/io/DataInputStream.h>
+#include <activemq/io/DataOutputStream.h>
 #include <cms/BytesMessage.h>
 #include <vector>
 #include <string>
@@ -341,6 +345,37 @@
          * @throws CMSException
          */
         virtual void writeUTF( const std::string& value ) throw ( cms::CMSException );
+
+    private:
+
+        /**
+         * Flag that indicates what state the stream is in.  If true, the
+         * message may only be read from.  If false, the message may only be
+         * written to.
+         */
+        bool readOnly;
+        
+        /**
+         * InputStream that wraps around the command's content when in 
+         * read-only mode.
+         */
+        io::ByteArrayInputStream inputStream;
+        
+        /**
+         * OutputStream that wraps around the command's content when in 
+         * write-only mode.
+         */
+        io::ByteArrayOutputStream outputStream;
+        
+        /**
+         * DataInputStream wrapper around the input stream.
+         */
+        io::DataInputStream dataInputStream;
+        
+        /**
+         * DataOutputStream wrapper around the output stream.
+         */
+        io::DataOutputStream dataOutputStream;
 
     };
 



Mime
View raw message