activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593309 [2/8] - in /activemq/activemq-cpp/trunk/src: examples/ examples/consumers/ examples/producers/ main/ main/activemq/concurrent/ main/activemq/connector/ main/activemq/connector/openwire/ main/activemq/connector/openwire/marshal/ main...
Date Thu, 08 Nov 2007 21:02:22 GMT
Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.cpp Thu Nov  8 13:02:02 2007
@@ -24,10 +24,11 @@
 using namespace activemq;
 using namespace activemq::exceptions;
 using namespace activemq::transport;
-using namespace activemq::concurrent;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::commands;
+using namespace decaf::util::concurrent;
+using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
 OpenWireFormatNegotiator::OpenWireFormatNegotiator( OpenWireFormat* openWireFormat,
@@ -51,7 +52,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void OpenWireFormatNegotiator::oneway( Command* command )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException, UnsupportedOperationException ) {
 
     try{
 
@@ -72,7 +73,7 @@
 
         next->oneway( command );
     }
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )
@@ -80,7 +81,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Response* OpenWireFormatNegotiator::request( Command* command )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException, UnsupportedOperationException ) {
 
     try{
 
@@ -101,7 +102,7 @@
 
         return next->request( command );
     }
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireFormatNegotiator.h Thu Nov  8 13:02:02 2007
@@ -20,9 +20,9 @@
 
 #include <activemq/transport/TransportFilter.h>
 #include <activemq/transport/Command.h>
-#include <activemq/concurrent/Mutex.h>
-#include <activemq/concurrent/CountDownLatch.h>
-#include <activemq/concurrent/Concurrent.h>
+#include <decaf/util/concurrent/Mutex.h>
+#include <decaf/util/concurrent/CountDownLatch.h>
+#include <decaf/util/concurrent/Concurrent.h>
 #include <activemq/connector/openwire/OpenWireFormat.h>
 
 namespace activemq{
@@ -45,8 +45,8 @@
         /**
          * Latch objects to count down till we receive the wireFormat info
          */
-        concurrent::CountDownLatch wireInfoSentDownLatch;
-        concurrent::CountDownLatch readyCountDownLatch;
+        decaf::util::concurrent::CountDownLatch wireInfoSentDownLatch;
+        decaf::util::concurrent::CountDownLatch readyCountDownLatch;
 
         /**
          * The OpenWireFormat object that we use in negotiation.
@@ -84,7 +84,7 @@
          * by this transport.
          */
         virtual void oneway( transport::Command* command )
-            throw( transport::CommandIOException, exceptions::UnsupportedOperationException );
+            throw( transport::CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Sends the given request to the server and waits for the response.
@@ -95,7 +95,7 @@
          * @throws CommandIOException if an error occurs with the request.
          */
         virtual transport::Response* request( transport::Command* command )
-            throw( transport::CommandIOException, exceptions::UnsupportedOperationException );
+            throw( transport::CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * This is called in the context of the nested transport's

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.cpp Thu Nov  8 13:02:02 2007
@@ -75,7 +75,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void OpenWireResponseBuilder::buildIncomingCommands(
-    const transport::Command* command, util::Queue<transport::Command*>& queue ){
+    const transport::Command* command, decaf::util::Queue<transport::Command*>& queue ){
 
     // Delegate this to buildResponse
     if( command->isResponseRequired() ) {

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/OpenWireResponseBuilder.h Thu Nov  8 13:02:02 2007
@@ -32,7 +32,7 @@
 
         virtual transport::Response* buildResponse( const transport::Command* command );
         virtual void buildIncomingCommands(
-            const transport::Command* command, util::Queue<transport::Command*>& queue );
+            const transport::Command* command, decaf::util::Queue<transport::Command*>& queue );
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp Thu Nov  8 13:02:02 2007
@@ -24,13 +24,12 @@
 #include <activemq/connector/openwire/commands/BrokerError.h>
 #include <activemq/connector/openwire/utils/HexTable.h>
 #include <activemq/exceptions/ActiveMQException.h>
-#include <activemq/util/Long.h>
-#include <activemq/util/Integer.h>
+#include <decaf/lang/Long.h>
+#include <decaf/lang/Integer.h>
 #include <activemq/util/Config.h>
 
 using namespace std;
 using namespace activemq;
-using namespace activemq::io;
 using namespace activemq::util;
 using namespace activemq::exceptions;
 using namespace activemq::connector;
@@ -38,6 +37,9 @@
 using namespace activemq::connector::openwire::marshal;
 using namespace activemq::connector::openwire::commands;
 using namespace activemq::connector::openwire::utils;
+using namespace decaf::io;
+using namespace decaf::util;
+using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
 utils::HexTable BaseDataStreamMarshaller::hexTable;
@@ -45,8 +47,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::tightUnmarshalCachedObject(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn,
-    utils::BooleanStream* bs ) throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn,
+    utils::BooleanStream* bs ) throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->tightUnmarshalNestedObject( dataIn, bs );
@@ -61,7 +63,7 @@
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->tightMarshalNestedObject1( data, bs );
@@ -75,9 +77,9 @@
 void BaseDataStreamMarshaller::tightMarshalCachedObject2(
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
-    io::DataOutputStream* dataOut,
+    decaf::io::DataOutputStream* dataOut,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         wireFormat->tightMarshalNestedObject2( data, dataOut, bs );
@@ -91,8 +93,8 @@
 void BaseDataStreamMarshaller::looseMarshalCachedObject(
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
-    io::DataOutputStream* dataOut )
-        throw ( io::IOException ) {
+    decaf::io::DataOutputStream* dataOut )
+        throw ( decaf::io::IOException ) {
 
     try{
         wireFormat->looseMarshalNestedObject( data, dataOut );
@@ -105,7 +107,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::looseUnmarshalCachedObject(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn ) throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->looseUnmarshalNestedObject( dataIn );
@@ -120,7 +122,7 @@
     OpenWireFormat* wireFormat,
     commands::DataStructure* object,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->tightMarshalNestedObject1( object, bs );
@@ -134,9 +136,9 @@
 void BaseDataStreamMarshaller::tightMarshalNestedObject2(
     OpenWireFormat* wireFormat,
     commands::DataStructure* object,
-    io::DataOutputStream* dataOut,
+    decaf::io::DataOutputStream* dataOut,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         wireFormat->tightMarshalNestedObject2( object, dataOut, bs );
@@ -149,9 +151,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::tightUnmarshalNestedObject(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn,
+    decaf::io::DataInputStream* dataIn,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->tightUnmarshalNestedObject( dataIn, bs );
@@ -164,8 +166,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::looseUnmarshalNestedObject(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn )
-        throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn )
+        throw ( decaf::io::IOException ) {
 
     try{
         return wireFormat->looseUnmarshalNestedObject( dataIn );
@@ -179,8 +181,8 @@
 void BaseDataStreamMarshaller::looseMarshalNestedObject(
     OpenWireFormat* wireFormat,
     commands::DataStructure* object,
-    io::DataOutputStream* dataOut )
-        throw ( io::IOException ) {
+    decaf::io::DataOutputStream* dataOut )
+        throw ( decaf::io::IOException ) {
 
     try{
         wireFormat->looseMarshalNestedObject( object, dataOut );
@@ -192,8 +194,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::string BaseDataStreamMarshaller::tightUnmarshalString(
-    io::DataInputStream* dataIn,
-    utils::BooleanStream* bs ) throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn,
+    utils::BooleanStream* bs ) throw ( decaf::io::IOException ) {
 
     try{
 
@@ -216,7 +218,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 int BaseDataStreamMarshaller::tightMarshalString1( const std::string& value,
                                                    utils::BooleanStream* bs )
-                                                    throw ( io::IOException ) {
+                                                    throw ( decaf::io::IOException ) {
     try{
 
         bs->writeBoolean( value != "" );
@@ -271,8 +273,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BaseDataStreamMarshaller::tightMarshalString2(
     const std::string& value,
-    io::DataOutputStream* dataOut,
-    utils::BooleanStream* bs ) throw ( io::IOException ) {
+    decaf::io::DataOutputStream* dataOut,
+    utils::BooleanStream* bs ) throw ( decaf::io::IOException ) {
 
     try{
 
@@ -295,7 +297,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BaseDataStreamMarshaller::looseMarshalString(
     const std::string value,
-    io::DataOutputStream* dataOut ) throw ( io::IOException ) {
+    decaf::io::DataOutputStream* dataOut ) throw ( decaf::io::IOException ) {
 
     try{
 
@@ -311,7 +313,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::string BaseDataStreamMarshaller::looseUnmarshalString(
-    io::DataInputStream* dataIn ) throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException ) {
 
     try{
         if( dataIn->readBoolean() ) {
@@ -329,7 +331,7 @@
 int BaseDataStreamMarshaller::tightMarshalLong1( OpenWireFormat* wireFormat AMQCPP_UNUSED,
                                                  long long value,
                                                  utils::BooleanStream* bs )
-                                                    throw ( io::IOException ) {
+                                                    throw ( decaf::io::IOException ) {
 
     try{
 
@@ -365,9 +367,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BaseDataStreamMarshaller::tightMarshalLong2( OpenWireFormat* wireFormat AMQCPP_UNUSED,
                                                   long long value,
-                                                  io::DataOutputStream* dataOut,
+                                                  decaf::io::DataOutputStream* dataOut,
                                                   utils::BooleanStream* bs )
-                                                    throw ( io::IOException ) {
+                                                    throw ( decaf::io::IOException ) {
     try{
 
         if( bs->readBoolean() ) {
@@ -393,9 +395,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 long long BaseDataStreamMarshaller::tightUnmarshalLong(
     OpenWireFormat* wireFormat AMQCPP_UNUSED,
-    io::DataInputStream* dataIn,
+    decaf::io::DataInputStream* dataIn,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         if( bs->readBoolean() ) {
@@ -423,8 +425,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 void BaseDataStreamMarshaller::looseMarshalLong( OpenWireFormat* wireFormat AMQCPP_UNUSED,
                                                  long long value,
-                                                 io::DataOutputStream* dataOut )
-                                                    throw ( io::IOException ) {
+                                                 decaf::io::DataOutputStream* dataOut )
+                                                    throw ( decaf::io::IOException ) {
 
     try{
         dataOut->writeLong( value );
@@ -437,8 +439,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 long long BaseDataStreamMarshaller::looseUnmarshalLong(
     OpenWireFormat* wireFormat AMQCPP_UNUSED,
-    io::DataInputStream* dataIn )
-        throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn )
+        throw ( decaf::io::IOException ) {
 
     try{
         return dataIn->readLong();
@@ -451,8 +453,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::tightUnmarshalBrokerError(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn,
-    utils::BooleanStream* bs ) throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn,
+    utils::BooleanStream* bs ) throw ( decaf::io::IOException ) {
 
     try{
 
@@ -500,7 +502,7 @@
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -546,9 +548,9 @@
 void BaseDataStreamMarshaller::tightMarshalBrokerError2(
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
-    io::DataOutputStream* dataOut,
+    decaf::io::DataOutputStream* dataOut,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -588,8 +590,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 commands::DataStructure* BaseDataStreamMarshaller::looseUnmarshalBrokerError(
     OpenWireFormat* wireFormat,
-    io::DataInputStream* dataIn )
-        throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn )
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -637,8 +639,8 @@
 void BaseDataStreamMarshaller::looseMarshalBrokerError(
     OpenWireFormat* wireFormat,
     commands::DataStructure* data,
-    io::DataOutputStream* dataOut )
-        throw ( io::IOException ) {
+    decaf::io::DataOutputStream* dataOut )
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -680,9 +682,9 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::vector<unsigned char> BaseDataStreamMarshaller::tightUnmarshalByteArray(
-    io::DataInputStream* dataIn,
+    decaf::io::DataInputStream* dataIn,
     utils::BooleanStream* bs )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -703,8 +705,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::vector<unsigned char> BaseDataStreamMarshaller::looseUnmarshalByteArray(
-    io::DataInputStream* dataIn )
-        throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn )
+        throw ( decaf::io::IOException ) {
 
     try{
 
@@ -725,10 +727,10 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::vector<unsigned char> BaseDataStreamMarshaller::tightUnmarshalConstByteArray(
-    io::DataInputStream* dataIn,
+    decaf::io::DataInputStream* dataIn,
     utils::BooleanStream* bs AMQCPP_UNUSED,
     int size )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         std::vector<unsigned char> data;
@@ -743,9 +745,9 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::vector<unsigned char> BaseDataStreamMarshaller::looseUnmarshalConstByteArray(
-    io::DataInputStream* dataIn,
+    decaf::io::DataInputStream* dataIn,
     int size )
-        throw ( io::IOException ) {
+        throw ( decaf::io::IOException ) {
 
     try{
         std::vector<unsigned char> data;
@@ -807,8 +809,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 std::string BaseDataStreamMarshaller::readAsciiString(
-    io::DataInputStream* dataIn )
-        throw ( io::IOException ) {
+    decaf::io::DataInputStream* dataIn )
+        throw ( decaf::io::IOException ) {
 
     try{
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h Thu Nov  8 13:02:02 2007
@@ -55,7 +55,7 @@
         virtual int tightMarshal1( OpenWireFormat* format AMQCPP_UNUSED,
                                    commands::DataStructure* command AMQCPP_UNUSED,
                                    utils::BooleanStream* bs AMQCPP_UNUSED )
-                                       throw ( io::IOException ) { return 0; }
+                                       throw ( decaf::io::IOException ) { return 0; }
 
         /**
          * Tight Marhsal to the given stream
@@ -67,9 +67,9 @@
          */
         virtual void tightMarshal2( OpenWireFormat* format AMQCPP_UNUSED,
                                     commands::DataStructure* command AMQCPP_UNUSED,
-                                    io::DataOutputStream* ds AMQCPP_UNUSED,
+                                    decaf::io::DataOutputStream* ds AMQCPP_UNUSED,
                                     utils::BooleanStream* bs AMQCPP_UNUSED )
-                                        throw ( io::IOException ) {}
+                                        throw ( decaf::io::IOException ) {}
 
         /**
          * Tight Un-marhsal to the given stream
@@ -81,9 +81,9 @@
          */
         virtual void tightUnmarshal( OpenWireFormat* format AMQCPP_UNUSED,
                                      commands::DataStructure* command AMQCPP_UNUSED,
-                                     io::DataInputStream* dis AMQCPP_UNUSED,
+                                     decaf::io::DataInputStream* dis AMQCPP_UNUSED,
                                      utils::BooleanStream* bs AMQCPP_UNUSED )
-                                        throw ( io::IOException ) {}
+                                        throw ( decaf::io::IOException ) {}
 
         /**
          * Tight Marhsal to the given stream
@@ -94,8 +94,8 @@
          */
         virtual void looseMarshal( OpenWireFormat* format AMQCPP_UNUSED,
                                    commands::DataStructure* command AMQCPP_UNUSED,
-                                   io::DataOutputStream* ds AMQCPP_UNUSED )
-                                       throw ( io::IOException ) {}
+                                   decaf::io::DataOutputStream* ds AMQCPP_UNUSED )
+                                       throw ( decaf::io::IOException ) {}
 
         /**
          * Loose Un-marhsal to the given stream
@@ -106,8 +106,8 @@
          */
         virtual void looseUnmarshal( OpenWireFormat* format AMQCPP_UNUSED,
                                      commands::DataStructure* command AMQCPP_UNUSED,
-                                     io::DataInputStream* dis AMQCPP_UNUSED )
-                                        throw ( io::IOException ) {}
+                                     decaf::io::DataInputStream* dis AMQCPP_UNUSED )
+                                        throw ( decaf::io::IOException ) {}
 
     public:      // Statics
 
@@ -153,8 +153,8 @@
          */
         virtual commands::DataStructure* tightUnmarshalCachedObject(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn,
-            utils::BooleanStream* bs ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) throw ( decaf::io::IOException );
 
         /**
          * Tightly marshalls the passed DataStructure based object to the passed
@@ -168,7 +168,7 @@
         virtual int tightMarshalCachedObject1( OpenWireFormat* wireFormat,
                                                commands::DataStructure* data,
                                                utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Tightly marshalls the passed DataStructure based object to the passed
@@ -181,9 +181,9 @@
          */
         virtual void tightMarshalCachedObject2( OpenWireFormat* wireFormat,
                                                 commands::DataStructure* data,
-                                                io::DataOutputStream* dataOut,
+                                                decaf::io::DataOutputStream* dataOut,
                                                 utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Loosely marshalls the passed DataStructure based object to the passed
@@ -196,8 +196,8 @@
          */
         virtual void looseMarshalCachedObject( OpenWireFormat* wireFormat,
                                                commands::DataStructure* data,
-                                               io::DataOutputStream* dataOut )
-                                                    throw ( io::IOException );
+                                               decaf::io::DataOutputStream* dataOut )
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Loose Unmarshall the cached object
@@ -208,7 +208,7 @@
          */
         virtual commands::DataStructure* looseUnmarshalCachedObject(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException );
 
         /**
          * Tightly marshalls the passed DataStructure based object to the passed
@@ -222,7 +222,7 @@
         virtual int tightMarshalNestedObject1( OpenWireFormat* wireFormat,
                                                commands::DataStructure* object,
                                                utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Tightly marshalls the passed DataStructure based object to the passed
@@ -235,9 +235,9 @@
          */
         virtual void tightMarshalNestedObject2( OpenWireFormat* wireFormat,
                                                 commands::DataStructure* object,
-                                                io::DataOutputStream* dataOut,
+                                                decaf::io::DataOutputStream* dataOut,
                                                 utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Tight Unmarshall the nested object
@@ -249,8 +249,8 @@
          */
         virtual commands::DataStructure* tightUnmarshalNestedObject(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn,
-            utils::BooleanStream* bs ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) throw ( decaf::io::IOException );
 
         /**
          * Loose Unmarshall the nested object
@@ -261,7 +261,7 @@
          */
         virtual commands::DataStructure* looseUnmarshalNestedObject(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException );
 
         /**
          * Loose marshall the nested object
@@ -272,8 +272,8 @@
          */
         virtual void looseMarshalNestedObject( OpenWireFormat* wireFormat,
                                                commands::DataStructure* object,
-                                               io::DataOutputStream* dataOut )
-                                                    throw ( io::IOException );
+                                               decaf::io::DataOutputStream* dataOut )
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Performs Tight Unmarshalling of String Objects
@@ -282,9 +282,9 @@
          * @returns the unmarshalled string.
          * @throws IOException if an error occurs.
          */
-        virtual std::string tightUnmarshalString( io::DataInputStream* dataIn,
+        virtual std::string tightUnmarshalString( decaf::io::DataInputStream* dataIn,
                                                   utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Tight Marshals the String to a Booleans Stream Object, returns
@@ -296,7 +296,7 @@
          */
         virtual int tightMarshalString1( const std::string& value,
                                          utils::BooleanStream* bs )
-                                            throw ( io::IOException );
+                                            throw ( decaf::io::IOException );
 
         /**
          * Tight Marshals the passed string to the streams passed
@@ -306,9 +306,9 @@
          * @throws IOException if an error occurs.
          */
         virtual void tightMarshalString2( const std::string& value,
-                                          io::DataOutputStream* dataOut,
+                                          decaf::io::DataOutputStream* dataOut,
                                           utils::BooleanStream* bs )
-                                                throw ( io::IOException );
+                                                throw ( decaf::io::IOException );
 
         /**
          * Loose Marshal the String to the DataOuputStream passed
@@ -317,8 +317,8 @@
          * @throws IOException if an error occurs.
          */
         virtual void looseMarshalString( const std::string value,
-                                         io::DataOutputStream* dataOut )
-                                            throw ( io::IOException );
+                                         decaf::io::DataOutputStream* dataOut )
+                                            throw ( decaf::io::IOException );
 
         /**
          * Loose Un-Marshal the String to the DataOuputStream passed
@@ -326,8 +326,8 @@
          * @return the unmarshalled string
          * @throws IOException if an error occurs.
          */
-        virtual std::string looseUnmarshalString( io::DataInputStream* dataIn )
-            throw ( io::IOException );
+        virtual std::string looseUnmarshalString( decaf::io::DataInputStream* dataIn )
+            throw ( decaf::io::IOException );
 
         /**
          * Tightly marshal the long long to the BooleanStream passed.
@@ -340,7 +340,7 @@
         virtual int tightMarshalLong1( OpenWireFormat* wireFormat,
                                        long long value,
                                        utils::BooleanStream* bs )
-                                            throw ( io::IOException );
+                                            throw ( decaf::io::IOException );
 
         /**
          * Tightly marshal the long long to the Streams passed.
@@ -352,9 +352,9 @@
          */
         virtual void tightMarshalLong2( OpenWireFormat* wireFormat,
                                         long long value,
-                                        io::DataOutputStream* dataOut,
+                                        decaf::io::DataOutputStream* dataOut,
                                         utils::BooleanStream* bs )
-                                            throw ( io::IOException );
+                                            throw ( decaf::io::IOException );
 
         /**
          * Tight marshal the long long type.
@@ -365,9 +365,9 @@
          * @throws IOException if an error occurs.
          */
         virtual long long tightUnmarshalLong( OpenWireFormat* wireFormat,
-                                              io::DataInputStream* dataIn,
+                                              decaf::io::DataInputStream* dataIn,
                                               utils::BooleanStream* bs )
-                                                throw ( io::IOException );
+                                                throw ( decaf::io::IOException );
 
         /**
          * Tightly marshal the long long to the BooleanStream passed.
@@ -378,8 +378,8 @@
          */
         virtual void looseMarshalLong( OpenWireFormat* wireFormat,
                                        long long value,
-                                       io::DataOutputStream* dataOut )
-                                            throw ( io::IOException );
+                                       decaf::io::DataOutputStream* dataOut )
+                                            throw ( decaf::io::IOException );
 
         /**
          * Loose marshal the long long type.
@@ -389,8 +389,8 @@
          * @throws IOException if an error occurs.
          */
         virtual long long looseUnmarshalLong( OpenWireFormat* wireFormat,
-                                              io::DataInputStream* dataIn )
-                                                throw ( io::IOException );
+                                              decaf::io::DataInputStream* dataIn )
+                                                throw ( decaf::io::IOException );
 
         /**
          * Tight Unmarshal an array of char
@@ -400,8 +400,8 @@
          * @throws IOException if an error occurs.
          */
         virtual std::vector<unsigned char> tightUnmarshalByteArray(
-            io::DataInputStream* dataIn,
-            utils::BooleanStream* bs ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) throw ( decaf::io::IOException );
 
         /**
          * Loose Unmarshal an array of char
@@ -410,7 +410,7 @@
          * @throws IOException if an error occurs.
          */
         virtual std::vector<unsigned char> looseUnmarshalByteArray(
-            io::DataInputStream* dataIn ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException );
 
         /**
          * Tight Unmarshal a fixed size array from that data input stream
@@ -422,9 +422,9 @@
          * @throws IOException if an error occurs.
          */
         virtual std::vector<unsigned char> tightUnmarshalConstByteArray(
-            io::DataInputStream* dataIn,
+            decaf::io::DataInputStream* dataIn,
             utils::BooleanStream* bs,
-            int size ) throw ( io::IOException );
+            int size ) throw ( decaf::io::IOException );
 
         /**
          * Tight Unmarshal a fixed size array from that data input stream
@@ -436,8 +436,8 @@
          * @throws IOException if an error occurs.
          */
         virtual std::vector<unsigned char> looseUnmarshalConstByteArray(
-            io::DataInputStream* dataIn,
-            int size ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn,
+            int size ) throw ( decaf::io::IOException );
 
         /**
          * Tight Unarshall the Error object
@@ -449,8 +449,8 @@
          */
         virtual commands::DataStructure* tightUnmarshalBrokerError(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn,
-            utils::BooleanStream* bs ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn,
+            utils::BooleanStream* bs ) throw ( decaf::io::IOException );
 
         /**
          * Tight Marshall the Error object
@@ -463,7 +463,7 @@
         virtual int tightMarshalBrokerError1( OpenWireFormat* wireFormat,
                                               commands::DataStructure* data,
                                               utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Tight Marshall the Error object
@@ -475,9 +475,9 @@
          */
         virtual void tightMarshalBrokerError2( OpenWireFormat* wireFormat,
                                                commands::DataStructure* data,
-                                               io::DataOutputStream* dataOut,
+                                               decaf::io::DataOutputStream* dataOut,
                                                utils::BooleanStream* bs )
-                                                    throw ( io::IOException );
+                                                    throw ( decaf::io::IOException );
 
         /**
          * Loose Unarshall the Error object
@@ -488,7 +488,7 @@
          */
         virtual commands::DataStructure* looseUnmarshalBrokerError(
             OpenWireFormat* wireFormat,
-            io::DataInputStream* dataIn ) throw ( io::IOException );
+            decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException );
 
         /**
          * Tight Marshall the Error object
@@ -499,8 +499,8 @@
          */
         virtual void looseMarshalBrokerError( OpenWireFormat* wireFormat,
                                               commands::DataStructure* data,
-                                              io::DataOutputStream* dataOut )
-                                                  throw ( io::IOException );
+                                              decaf::io::DataOutputStream* dataOut )
+                                                  throw ( decaf::io::IOException );
 
         /**
          * Tightly Marshal an array of DataStructure objects to the provided
@@ -516,7 +516,7 @@
         int tightMarshalObjectArray1( OpenWireFormat* wireFormat,
                                       std::vector<T*> objects,
                                       utils::BooleanStream* bs )
-                                        throw ( io::IOException )
+                                        throw ( decaf::io::IOException )
         {
             try{
                 if( !objects.empty() )
@@ -535,9 +535,9 @@
                     return 0;
                 }
             }
-            AMQ_CATCH_RETHROW( io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
-            AMQ_CATCHALL_THROW( io::IOException )
+            AMQ_CATCH_RETHROW( decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 
         /**
@@ -553,9 +553,9 @@
         template<typename T>
         void tightMarshalObjectArray2( OpenWireFormat* wireFormat,
                                        std::vector<T*> objects,
-                                       io::DataOutputStream* dataOut,
+                                       decaf::io::DataOutputStream* dataOut,
                                        utils::BooleanStream* bs )
-                                        throw ( io::IOException ) {
+                                        throw ( decaf::io::IOException ) {
 
             try {
 
@@ -568,9 +568,9 @@
                     }
                 }
             }
-            AMQ_CATCH_RETHROW( io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
-            AMQ_CATCHALL_THROW( io::IOException )
+            AMQ_CATCH_RETHROW( decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 
         /**
@@ -585,8 +585,8 @@
         template<typename T>
         void looseMarshalObjectArray( OpenWireFormat* wireFormat,
                                       std::vector<T*> objects,
-                                      io::DataOutputStream* dataOut )
-                                        throw ( io::IOException ) {
+                                      decaf::io::DataOutputStream* dataOut )
+                                        throw ( decaf::io::IOException ) {
 
             try {
 
@@ -600,9 +600,9 @@
                     }
                 }
             }
-            AMQ_CATCH_RETHROW( io::IOException )
-            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
-            AMQ_CATCHALL_THROW( io::IOException )
+            AMQ_CATCH_RETHROW( decaf::io::IOException )
+            AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+            AMQ_CATCHALL_THROW( decaf::io::IOException )
         }
 
     protected:
@@ -613,8 +613,8 @@
          * @param dataIn - DataInputStream to read from
          * @return string value read from stream
          */
-        virtual std::string readAsciiString( io::DataInputStream* dataIn )
-            throw ( io::IOException );
+        virtual std::string readAsciiString( decaf::io::DataInputStream* dataIn )
+            throw ( decaf::io::IOException );
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/DataStreamMarshaller.h Thu Nov  8 13:02:02 2007
@@ -18,9 +18,9 @@
 #ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_DATASTREAMMARSHALLER_H_
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_DATASTREAMMARSHALLER_H_
 
-#include <activemq/io/DataInputStream.h>
-#include <activemq/io/DataOutputStream.h>
-#include <activemq/io/IOException.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
 #include <activemq/connector/openwire/commands/DataStructure.h>
 #include <activemq/connector/openwire/utils/BooleanStream.h>
 #include <activemq/connector/openwire/OpenWireFormat.h>
@@ -28,92 +28,92 @@
 namespace activemq{
 namespace connector{
 namespace openwire{
-    
+
     /**
      * Base class for all classes that marshal commands for Openwire
      */
     class DataStreamMarshaller
     {
     public:
-    
+
         virtual ~DataStreamMarshaller() {}
-    
+
         /**
          * Gets the DataStructureType that this class marshals/unmarshals
          * @returns byte Id of this classes DataStructureType
          */
         virtual unsigned char getDataStructureType() const = 0;
-        
+
         /**
          * Creates a new instance of the class that this class is a marshaling
          * director for.
          * @returns newly allocated Command
          */
         virtual commands::DataStructure* createObject() const = 0;
-    
+
         /**
          * Tight Marhsal to the given stream
-         * @param format - The OpenwireFormat properties 
+         * @param format - The OpenwireFormat properties
          * @param command -  the object to Marshal
          * @param bs - boolean stream to marshal to.
          * @throws IOException if an error occurs.
          */
-        virtual int tightMarshal1( OpenWireFormat* format, 
-                                   commands::DataStructure* command, 
-                                   utils::BooleanStream* bs ) 
-                                       throw ( io::IOException ) = 0;
+        virtual int tightMarshal1( OpenWireFormat* format,
+                                   commands::DataStructure* command,
+                                   utils::BooleanStream* bs )
+                                       throw ( decaf::io::IOException ) = 0;
 
         /**
          * Tight Marhsal to the given stream
-         * @param format - The OpenwireFormat properties 
+         * @param format - The OpenwireFormat properties
          * @param command -  the object to Marshal
          * @param ds - the DataOutputStream to Marshal to
          * @param bs - boolean stream to marshal to.
          * @throws IOException if an error occurs.
          */
-        virtual void tightMarshal2( OpenWireFormat* format, 
-                                    commands::DataStructure* command, 
-                                    io::DataOutputStream* ds, 
-                                    utils::BooleanStream* bs ) 
-                                        throw ( io::IOException ) = 0;
+        virtual void tightMarshal2( OpenWireFormat* format,
+                                    commands::DataStructure* command,
+                                    decaf::io::DataOutputStream* ds,
+                                    utils::BooleanStream* bs )
+                                        throw ( decaf::io::IOException ) = 0;
 
         /**
          * Tight Un-marhsal to the given stream
-         * @param format - The OpenwireFormat properties 
+         * @param format - The OpenwireFormat properties
          * @param command -  the object to Un-Marshal
          * @param dis - the DataInputStream to Un-Marshal from
          * @param bs - boolean stream to unmarshal from.
          * @throws IOException if an error occurs.
          */
-        virtual void tightUnmarshal( OpenWireFormat* format, 
-                                     commands::DataStructure* command, 
-                                     io::DataInputStream* dis, 
-                                     utils::BooleanStream* bs ) 
-                                        throw ( io::IOException ) = 0;
-    
+        virtual void tightUnmarshal( OpenWireFormat* format,
+                                     commands::DataStructure* command,
+                                     decaf::io::DataInputStream* dis,
+                                     utils::BooleanStream* bs )
+                                        throw ( decaf::io::IOException ) = 0;
+
         /**
          * Tight Marhsal to the given stream
-         * @param format - The OpenwireFormat properties 
+         * @param format - The OpenwireFormat properties
          * @param command -  the object to Marshal
          * @param ds - DataOutputStream to marshal to
          * @throws IOException if an error occurs.
          */
-        virtual void looseMarshal( OpenWireFormat* format, 
-                                   commands::DataStructure* command, 
-                                   io::DataOutputStream* ds ) 
-                                       throw ( io::IOException ) = 0;
+        virtual void looseMarshal( OpenWireFormat* format,
+                                   commands::DataStructure* command,
+                                   decaf::io::DataOutputStream* ds )
+                                       throw ( decaf::io::IOException ) = 0;
 
         /**
          * Loose Un-marhsal to the given stream
-         * @param format - The OpenwireFormat properties 
+         * @param format - The OpenwireFormat properties
          * @param command -  the object to Un-Marshal
          * @param dis - the DataInputStream to Un-Marshal from
          * @throws IOException if an error occurs.
          */
-        virtual void looseUnmarshal( OpenWireFormat* format, 
-                                     commands::DataStructure* command, 
-                                     io::DataInputStream* dis ) 
-                                        throw ( io::IOException ) = 0;
+        virtual void looseUnmarshal( OpenWireFormat* format,
+                                     commands::DataStructure* command,
+                                     decaf::io::DataInputStream* dis )
+                                        throw ( decaf::io::IOException ) = 0;
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/MarshalAware.h Thu Nov  8 13:02:02 2007
@@ -19,7 +19,7 @@
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSHAL_MARSHALAWARE_H_
 
 #include <vector>
-#include <activemq/io/IOException.h>
+#include <decaf/io/IOException.h>
 
 namespace activemq{
 namespace connector{
@@ -52,7 +52,7 @@
          * @param wireFormat - the wireformat object to control marshaling
          */
         virtual void beforeMarshal( OpenWireFormat* wireFormat )
-            throw ( io::IOException ) = 0;
+            throw ( decaf::io::IOException ) = 0;
 
         /**
          * Called after marshaling is started to cleanup the object being
@@ -60,7 +60,7 @@
          * @param wireFormat - the wireformat object to control marshaling
          */
         virtual void afterMarshal( OpenWireFormat* wireFormat )
-            throw ( io::IOException ) = 0;
+            throw ( decaf::io::IOException ) = 0;
 
         /**
          * Called before unmarshaling is started to prepare the object to be
@@ -68,7 +68,7 @@
          * @param wireFormat - the wireformat object to control unmarshaling
          */
         virtual void beforeUnmarshal( OpenWireFormat* wireFormat )
-            throw ( io::IOException ) = 0;
+            throw ( decaf::io::IOException ) = 0;
 
         /**
          * Called after unmarshaling is started to cleanup the object being
@@ -76,7 +76,7 @@
          * @param wireFormat - the wireformat object to control unmarshaling
          */
         virtual void afterUnmarshal( OpenWireFormat* wireFormat )
-            throw ( io::IOException ) = 0;
+            throw ( decaf::io::IOException ) = 0;
 
         /**
          * Called to set the data to this object that will contain the objects

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.cpp Thu Nov  8 13:02:02 2007
@@ -17,20 +17,22 @@
 
 #include "PrimitiveMapMarshaller.h"
 
-#include <activemq/io/ByteArrayInputStream.h>
-#include <activemq/io/ByteArrayOutputStream.h>
-#include <activemq/io/DataInputStream.h>
-#include <activemq/io/DataOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
 #include <activemq/connector/openwire/utils/OpenwireStringSupport.h>
+#include <activemq/exceptions/ActiveMQException.h>
 
 using namespace activemq;
-using namespace activemq::io;
 using namespace activemq::util;
 using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::utils;
 using namespace activemq::connector::openwire::marshal;
+using namespace decaf;
+using namespace decaf::io;
 
 ///////////////////////////////////////////////////////////////////////////////
 void PrimitiveMapMarshaller::marshal( const util::PrimitiveMap* map,
@@ -126,7 +128,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 void PrimitiveMapMarshaller::marshalPrimitive( io::DataOutputStream& dataOut,
                                                util::PrimitiveMap::ValueNode& value )
-                                                    throw ( io::IOException ) {
+                                                    throw ( decaf::io::IOException ) {
 
     try {
 
@@ -209,7 +211,7 @@
 void PrimitiveMapMarshaller::unmarshalPrimitive( io::DataInputStream& dataIn,
                                                  const std::string& key,
                                                  util::PrimitiveMap& map )
-                                                    throw ( io::IOException ) {
+                                                    throw ( decaf::io::IOException ) {
 
     try {
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/PrimitiveMapMarshaller.h Thu Nov  8 13:02:02 2007
@@ -18,10 +18,11 @@
 #ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSHAL_PRIMITIVEMAPMARSHALLER_H_
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSHAL_PRIMITIVEMAPMARSHALLER_H_
 
+#include <cms/CMSException.h>
 #include <activemq/util/PrimitiveMap.h>
-#include <activemq/io/DataOutputStream.h>
-#include <activemq/io/DataInputStream.h>
-#include <activemq/io/IOException.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/IOException.h>
 
 namespace activemq{
 namespace connector{
@@ -76,9 +77,9 @@
          * @param value - the ValueNode to write.
          * @throws CMSException
          */
-        static void marshalPrimitive( io::DataOutputStream& dataOut,
+        static void marshalPrimitive( decaf::io::DataOutputStream& dataOut,
                                       util::PrimitiveMap::ValueNode& value )
-                                        throw ( io::IOException );
+                                        throw ( decaf::io::IOException );
 
         /**
          * Unmarshals a Primitive Type from the stream, and returns it as a
@@ -88,10 +89,10 @@
          * @param map - Map to insert data into.
          * @throws CMSException
          */
-        static void unmarshalPrimitive( io::DataInputStream& dataIn,
+        static void unmarshalPrimitive( decaf::io::DataInputStream& dataIn,
                                         const std::string& key,
                                         util::PrimitiveMap& map )
-                                            throw ( io::IOException );
+                                            throw ( decaf::io::IOException );
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.cpp Thu Nov  8 13:02:02 2007
@@ -17,13 +17,17 @@
 
 #include <activemq/connector/openwire/utils/BooleanStream.h>
 
+#include <activemq/exceptions/ActiveMQException.h>
+
 using namespace std;
 using namespace activemq;
-using namespace activemq::io;
 using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::utils;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
 
 ///////////////////////////////////////////////////////////////////////////////
 BooleanStream::BooleanStream()
@@ -105,7 +109,7 @@
         }
 
         // Dump the payload
-        dataOut->write( &data[0], arrayLimit );
+        dataOut->write( &data[0], 0, arrayLimit );
         clear();
     }
     AMQ_CATCH_RETHROW( IOException )

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/BooleanStream.h Thu Nov  8 13:02:02 2007
@@ -18,8 +18,8 @@
 #ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_UTILS_BOOLEANSTREAM_H_
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_UTILS_BOOLEANSTREAM_H_
 
-#include <activemq/io/DataInputStream.h>
-#include <activemq/io/DataOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
 
 namespace activemq{
 namespace connector{
@@ -28,27 +28,27 @@
 
     /**
      * Manages the writing and reading of boolean data streams
-     * to and from a data source such as a DataInputStream or 
+     * to and from a data source such as a DataInputStream or
      * DataOutputStream.  The booleans are stored as single bits in the
      * stream, with the stream size pre-pended to the stream when the
      * data is marshalled.
-     * 
+     *
      * The serialized form of the size field can be between 1 and 3 bytes.
      * If the number of used bytes < 64, size=1 byte
      * If the number of used bytes >=64 and < 256 (size of an unsigned byte), size=2 bytes
      * If the number of used bytes >=256, size=3 bytes
-     * 
+     *
      * The high-order 2 bits (128 and 64) of the first byte of the size field are
      * used to encode the information about the number of bytes in the size field.  The
      * only time the first byte will contain a value >=64 is if there are more bytes in
      * the size field.  If the first byte < 64, the value of the byte is simply the size
-     * value.  If the first byte = 0xC0, the following unsigned byte is the size field.  
+     * value.  If the first byte = 0xC0, the following unsigned byte is the size field.
      * If the first byte = 0x80, the following short (two bytes) are the size field.
      */
     class BooleanStream
     {
     public:
-    
+
         BooleanStream();
         virtual ~BooleanStream();
 
@@ -56,57 +56,57 @@
          * Read a boolean data element from the internal data buffer
          * @returns boolean from the stream
          */
-        bool readBoolean() throw ( io::IOException );
+        bool readBoolean() throw ( decaf::io::IOException );
 
         /**
          * Writes a Boolean value to the internal data buffer
          * @param value - boolean data to write.
          */
-        void writeBoolean( bool value ) throw ( io::IOException );
+        void writeBoolean( bool value ) throw ( decaf::io::IOException );
 
         /**
          * Marshal the data to a DataOutputStream
          * @param dataOut - Stream to write the data to.
          */
-        void marshal( io::DataOutputStream* dataOut ) throw ( io::IOException );
-        
+        void marshal( decaf::io::DataOutputStream* dataOut ) throw ( decaf::io::IOException );
+
         /**
          * Marshal the data to a STL vector of unsigned chars
          * @param dataOut - reference to a vector to write the data to.
          */
-        void marshal( std::vector< unsigned char >& dataOut );        
+        void marshal( std::vector< unsigned char >& dataOut );
 
         /**
          * Unmarshal a Boolean data stream from the Input Stream
          * @param dataIn - Input Stream to read data from.
          */
-        void unmarshal( io::DataInputStream* dataIn ) throw ( io::IOException );
+        void unmarshal( decaf::io::DataInputStream* dataIn ) throw ( decaf::io::IOException );
 
         /**
          * Clears to old position markers, data starts at the beginning
          */
         void clear();
-    
+
         /**
          * Calc the size that data is marshalled to
          * @returns int size of marshalled data.
          */
         int marshalledSize();
-        
+
     private:
-    
+
         // Internal Buffer of data
         std::vector<unsigned char> data;
-        
+
         // Limit on buffer size
         short arrayLimit;
-        
+
         // Byte we are on from the buffer
         short arrayPos;
-        
+
         // Bit we are on in the byte we are on from the buffer
         unsigned char bytePos;
-    
+
     };
 
 }}}}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.cpp Thu Nov  8 13:02:02 2007
@@ -17,24 +17,26 @@
 
 #include "HexTable.h"
 
-#include <activemq/util/Integer.h>
+#include <decaf/lang/Integer.h>
+#include <activemq/exceptions/ActiveMQException.h>
 
 using namespace std;
 using namespace activemq;
-using namespace activemq::util;
 using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::utils;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
 HexTable::HexTable(){
-    
-    const char values[] = 
-        { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 
+
+    const char values[] =
+        { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b',
           'c', 'd', 'e', 'f' };
     const int count = 16;
-    
+
     for( int i = 0; i < count; ++i ) {
         for( int j = 0; j < count; ++j ) {
             string entry( 1, values[i] );
@@ -45,28 +47,28 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-const std::string& HexTable::operator[]( std::size_t index ) 
-    throw ( exceptions::IndexOutOfBoundsException ) {
+const std::string& HexTable::operator[]( std::size_t index )
+    throw ( IndexOutOfBoundsException ) {
     if( size() < index ) {
         throw IndexOutOfBoundsException(
             __FILE__, __LINE__,
             ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
               Integer::toString( (int)index ) ).c_str() );
     }
-    
+
     return table[index];
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-const std::string& HexTable::operator[]( std::size_t index ) const 
-    throw ( exceptions::IndexOutOfBoundsException ) {
-        
+const std::string& HexTable::operator[]( std::size_t index ) const
+    throw ( IndexOutOfBoundsException ) {
+
     if( size() < index ) {
         throw IndexOutOfBoundsException(
             __FILE__, __LINE__,
             ( string( "HexTable::operator[] - Index passed is out of Bounds" ) +
               Integer::toString( (int)index ) ).c_str() );
     }
-    
+
     return table[index];
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/HexTable.h Thu Nov  8 13:02:02 2007
@@ -21,25 +21,25 @@
 #include <vector>
 #include <string>
 
-#include <activemq/exceptions/IndexOutOfBoundsException.h>
+#include <decaf/lang/exceptions/IndexOutOfBoundsException.h>
 
 namespace activemq{
 namespace connector{
 namespace openwire{
 namespace utils{
-    
+
     /**
      * The HexTable class maps hexidecimal strings to the value of an index
      * into the table, i.e. the class will return "FF" for the index 255 in
-     * the table.  
+     * the table.
      */
     class HexTable
     {
     public:
-    
-    	HexTable();
-    	virtual ~HexTable() {}
-        
+
+        HexTable();
+        virtual ~HexTable() {}
+
         /**
          * Index operator for this Table, will throw an exeption if the
          * index requested is out of bounds for this table.
@@ -47,9 +47,11 @@
          * @returns string contianing the hex value if the index
          * @throws IndexOutOfBoundsException
          */
-        virtual const std::string& operator[]( std::size_t index ) throw ( exceptions::IndexOutOfBoundsException );
-        virtual const std::string& operator[]( std::size_t index ) const throw ( exceptions::IndexOutOfBoundsException );
-        
+        virtual const std::string& operator[]( std::size_t index )
+            throw ( decaf::lang::exceptions::IndexOutOfBoundsException );
+        virtual const std::string& operator[]( std::size_t index ) const
+            throw ( decaf::lang::exceptions::IndexOutOfBoundsException );
+
         /**
          * Returns the max size of this Table.
          * @returns int size value
@@ -57,12 +59,12 @@
         virtual std::size_t size() const{
             return table.size();
         }
-        
+
     private:
-    
+
         // Vector of Strings mapping hex to the value of the index.
         std::vector<std::string> table;
-        
+
     };
 
 }}}}

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.cpp Thu Nov  8 13:02:02 2007
@@ -17,19 +17,20 @@
 
 #include "OpenwireStringSupport.h"
 
-#include <activemq/util/Integer.h>
+#include <decaf/lang/Integer.h>
+#include <activemq/exceptions/ActiveMQException.h>
 
 using namespace activemq;
-using namespace activemq::io;
-using namespace activemq::util;
 using namespace activemq::exceptions;
 using namespace activemq::connector;
 using namespace activemq::connector::openwire;
 using namespace activemq::connector::openwire::utils;
+using namespace decaf::io;
+using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
-std::string OpenwireStringSupport::readString( io::DataInputStream& dataIn )
-    throw ( io::IOException ) {
+std::string OpenwireStringSupport::readString( decaf::io::DataInputStream& dataIn )
+    throw ( decaf::io::IOException ) {
 
     try {
 
@@ -84,15 +85,15 @@
 
         return "";
     }
-    AMQ_CATCH_RETHROW( io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, io::IOException )
-    AMQ_CATCHALL_THROW( io::IOException )
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void OpenwireStringSupport::writeString( io::DataOutputStream& dataOut,
+void OpenwireStringSupport::writeString( decaf::io::DataOutputStream& dataOut,
                                          const std::string* str )
-                                            throw ( io::IOException ) {
+                                            throw ( decaf::io::IOException ) {
 
     try {
 
@@ -150,7 +151,7 @@
             dataOut.writeShort( (short)-1 );
         }
     }
-    AMQ_CATCH_RETHROW( io::IOException )
-    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, io::IOException )
-    AMQ_CATCHALL_THROW( io::IOException )
+    AMQ_CATCH_RETHROW( decaf::io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( ActiveMQException, decaf::io::IOException )
+    AMQ_CATCHALL_THROW( decaf::io::IOException )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/utils/OpenwireStringSupport.h Thu Nov  8 13:02:02 2007
@@ -19,8 +19,8 @@
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_UTILS_OPENWIRESTRINGSUPPORT_H_
 
 #include <string>
-#include <activemq/io/DataInputStream.h>
-#include <activemq/io/DataOutputStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
 
 namespace activemq{
 namespace connector{
@@ -30,12 +30,12 @@
     class OpenwireStringSupport
     {
     protected:
-    
+
         OpenwireStringSupport() {}
         virtual ~OpenwireStringSupport() {}
 
     public:
-    
+
         /**
          * Static method used for reading a string that uses the Openwire format
          * from a DataInputStream, this can throw an IOException for the same
@@ -45,8 +45,8 @@
          * @returns A string that has been read
          * @throws IOException on Errror.
          */
-        static std::string readString( io::DataInputStream& dataIn )
-            throw ( io::IOException );
+        static std::string readString( decaf::io::DataInputStream& dataIn )
+            throw ( decaf::io::IOException );
 
         /**
          * Static method used for writing a string that uses the Openwire format
@@ -54,12 +54,12 @@
          * reason as a DataOutputStream.writeUTF might.
          * @param dataOut - DataOutputStream to write to
          * @param str - A pointer to a string that should be written, NULL needs
-         *              to be an option here as its written as -1. 
+         *              to be an option here as its written as -1.
          * @throws IOException on Errror.
          */
-        static void writeString( io::DataOutputStream& dataOut, 
+        static void writeString( decaf::io::DataOutputStream& dataOut,
                                  const std::string* str )
-            throw ( io::IOException );
+            throw ( decaf::io::IOException );
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.cpp Thu Nov  8 13:02:02 2007
@@ -17,18 +17,19 @@
 #include "StompCommandReader.h"
 
 #include <activemq/connector/stomp/commands/CommandConstants.h>
-#include <activemq/concurrent/Thread.h>
-#include <activemq/util/Character.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Character.h>
 
 using namespace std;
 using namespace activemq;
-using namespace activemq::concurrent;
 using namespace activemq::connector;
 using namespace activemq::connector::stomp;
 using namespace activemq::transport;
-using namespace activemq::io;
 using namespace activemq::exceptions;
-using namespace activemq::util;
+using namespace decaf::lang;
+using namespace decaf::io;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
 StompCommandReader::StompCommandReader(void)
@@ -43,7 +44,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Command* StompCommandReader::readCommand() 
+Command* StompCommandReader::readCommand()
     throw ( CommandIOException )
 {
     StompFrame* frame = NULL;
@@ -51,16 +52,16 @@
     {
         // Create a new Frame for reading to.
         frame = new StompFrame();
-       
+
         // Read the command header.
         readStompCommandHeader( *frame );
-       
+
         // Read the headers.
         readStompHeaders( *frame );
-       
+
         // Read the body.
         readStompBody( *frame );
-       
+
         // Return the Command, caller must delete it.
         return marshaler.marshal( frame );
     }
@@ -87,16 +88,16 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void StompCommandReader::readStompCommandHeader( StompFrame& frame ) 
+void StompCommandReader::readStompCommandHeader( StompFrame& frame )
    throw ( CommandIOException )
-{  
+{
     try{
-        while( true ) 
+        while( true )
         {
             // The command header is formatted
             // just like any other stomp header.
             readStompHeaderLine();
-    
+
             // Ignore all white space before the command.
             long long offset = -1;
             for( size_t ix = 0; ix < buffer.size()-1; ++ix )
@@ -107,14 +108,14 @@
                     break;
                 }
             }
-        
+
             if( offset >= 0 )
             {
                 // Set the command in the frame - copy the memory.
                 frame.setCommand( reinterpret_cast<char*>(&buffer[(size_t)offset]) );
                 break;
             }
-        
+
         }
     }
     AMQ_CATCH_RETHROW( CommandIOException )
@@ -123,18 +124,18 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void StompCommandReader::readStompHeaders( StompFrame& frame ) 
+void StompCommandReader::readStompHeaders( StompFrame& frame )
    throw ( CommandIOException )
 {
     try{
         // Read the command;
         bool endOfHeaders = false;
-    
+
         while( !endOfHeaders )
-        {        
+        {
             // Read in the next header line.
             std::size_t numChars = readStompHeaderLine();
-    
+
             if( numChars == 0 )
             {
                 // should never get here
@@ -142,7 +143,7 @@
                     __FILE__, __LINE__,
                     "StompCommandReader::readStompHeaders: no characters read" );
             }
-          
+
             // Check for an empty line to demark the end of the header section.
             // if its not the end then we have a header to process, so parse it.
             if( numChars == 1 && buffer[0] == '\0' )
@@ -158,14 +159,14 @@
                     if( buffer[ix] == ':' )
                     {
                         // Null-terminate the key.
-                        buffer[ix] = '\0'; 
-    
+                        buffer[ix] = '\0';
+
                         const char* key = reinterpret_cast<char*>(&buffer[0]);
                         const char* value = reinterpret_cast<char*>(&buffer[ix+1]);
-                   
+
                         // Assign the header key/value pair.
                         frame.getProperties().setProperty(key, value);
-                   
+
                         // Break out of the for loop.
                         break;
                     }
@@ -179,34 +180,34 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::size_t StompCommandReader::readStompHeaderLine() 
+std::size_t StompCommandReader::readStompHeaderLine()
     throw ( CommandIOException )
 {
     try{
         // Clear any data from the buffer.
         buffer.clear();
-            
+
         std::size_t count = 0;
-      
+
         while( true )
         {
             // Read the next char from the stream.
             buffer.push_back( inputStream->read() );
-          
+
             // Increment the position pointer.
             count++;
-          
+
             // If we reached the line terminator, return the total number
             // of characters read.
             if( buffer[count-1] == '\n' )
             {
-                // Overwrite the line feed with a null character. 
+                // Overwrite the line feed with a null character.
                 buffer[count-1] = '\0';
-             
+
                 return count;
             }
         }
-       
+
         // If we get here something bad must have happened.
         throw StompConnectorException(
             __FILE__, __LINE__,
@@ -218,36 +219,36 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void StompCommandReader::readStompBody( StompFrame& frame ) 
+void StompCommandReader::readStompBody( StompFrame& frame )
    throw ( CommandIOException )
 {
     try{
         // Clear any data from the buffer.
         buffer.clear();
-        
+
         unsigned long content_length = 0;
-       
+
         if(frame.getProperties().hasProperty(
             commands::CommandConstants::toString(
                 commands::CommandConstants::HEADER_CONTENTLENGTH)))
         {
             char* stopped_string = NULL;
-          
-            string length = 
+
+            string length =
                 frame.getProperties().getProperty(
                     commands::CommandConstants::toString(
                         commands::CommandConstants::HEADER_CONTENTLENGTH));
-                
+
             content_length = strtoul(
-                length.c_str(), 
-                &stopped_string, 
+                length.c_str(),
+                &stopped_string,
                 10 );
          }
-    
+
          if( content_length != 0 )
          {
-            // For this case its assumed that content length indicates how 
-            // much to read.  We reserve space in the buffer for it to 
+            // For this case its assumed that content length indicates how
+            // much to read.  We reserve space in the buffer for it to
             // minimize the number of reallocs that might occur.  We are
             // assuming that content length doesn't count the trailing null
             // that indicates the end of frame.  The reserve won't do anything
@@ -256,17 +257,17 @@
             // this is a char vector and we already reserve enough space.
             // Resize doesn't realloc the vector smaller if content_length
             // is less than capacity of the buffer, it just move the end
-            // iterator.  Reserve adds the benefit that the mem is set to 
+            // iterator.  Reserve adds the benefit that the mem is set to
             // zero.  Over time as larger messages come in thsi will cause
             // us to adapt to that size so that future messages that are
             // around that size won't alloc any new memory.
-    
+
             buffer.reserve( content_length );
             buffer.resize( content_length );
-    
+
             // Read the Content Length now
             read( &buffer[0], content_length );
-    
+
             // Content Length read, now pop the end terminator off (\0\n).
             if(inputStream->read() != '\0' )
             {
@@ -280,64 +281,64 @@
         {
             // Content length was either zero, or not set, so we read until the
             // first null is encounted.
-          
+
             while( true )
             {
                 char byte = inputStream->read();
-             
+
                 buffer.push_back(byte);
-            
+
                 content_length++;
-    
+
                 if( byte != '\0' )
-                {            
+                {
                     continue;
                 }
-    
+
                 break;  // Read null and newline we are done.
             }
         }
-    
+
         if( content_length != 0 )
         {
             // Set the body contents in the frame - copy the memory
             frame.getBody() = buffer;
-        }    
+        }
     }
     AMQ_CATCH_EXCEPTION_CONVERT( IOException, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::size_t StompCommandReader::read( unsigned char* buffer, std::size_t count ) 
-   throw( io::IOException )
+std::size_t StompCommandReader::read( unsigned char* buffer, std::size_t count )
+   throw( decaf::io::IOException )
 {
     try{
         if( inputStream == NULL )
         {
-            throw IOException( 
-                __FILE__, __LINE__, 
+            throw IOException(
+                __FILE__, __LINE__,
                 "StompCommandReader::read(char*,int) - input stream is NULL" );
         }
-       
+
         // Just delegate to the input stream.
-        return inputStream->read( buffer, count );
+        return inputStream->read( buffer, 0, count );
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
- 
+
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char StompCommandReader::readByte() throw( io::IOException )
+unsigned char StompCommandReader::readByte() throw( decaf::io::IOException )
 {
         try{
         if( inputStream == NULL )
         {
-            throw IOException( 
-                __FILE__, __LINE__, 
+            throw IOException(
+                __FILE__, __LINE__,
                 "StompCommandReader::read(char*,int) - input stream is NULL" );
         }
-       
+
         return inputStream->read();
     }
     AMQ_CATCH_RETHROW( IOException )

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/stomp/StompCommandReader.h Thu Nov  8 13:02:02 2007
@@ -18,7 +18,7 @@
 #define _ACTIVEMQ_CONNECTOR_STOMP_STOMPCOMMANDREADER_H_
 
 #include <activemq/transport/CommandReader.h>
-#include <activemq/io/InputStream.h>
+#include <decaf/io/InputStream.h>
 #include <activemq/transport/CommandIOException.h>
 #include <activemq/transport/Command.h>
 #include <activemq/connector/stomp/StompFrame.h>
@@ -29,20 +29,19 @@
 namespace connector{
 namespace stomp{
 
-    class StompCommandReader : public transport::CommandReader
-    {
+    class StompCommandReader : public transport::CommandReader {
     private:
-   
+
         /**
          * The target input stream.
          */
-        io::InputStream* inputStream;
-      
+        decaf::io::InputStream* inputStream;
+
         /**
          * Vector Object used to buffer data
          */
         std::vector<unsigned char> buffer;
-        
+
         /**
          * Marshaler of Stomp Commands
          */
@@ -59,7 +58,7 @@
          * Constructor.
          * @param is the target input stream.
          */
-        StompCommandReader( io::InputStream* is );
+        StompCommandReader( decaf::io::InputStream* is );
 
         virtual ~StompCommandReader() {}
 
@@ -68,22 +67,22 @@
          * @return The next command available on the stream.
          * @throws CommandIOException if a problem occurs during the read.
          */
-        virtual transport::Command* readCommand() 
+        virtual transport::Command* readCommand()
             throw ( transport::CommandIOException );
 
         /**
          * Sets the target input stream.
          * @param Target Input Stream
          */
-        virtual void setInputStream( io::InputStream* is ){
+        virtual void setInputStream( decaf::io::InputStream* is ){
             inputStream = is;
         }
-      
+
         /**
          * Gets the target input stream.
          * @return Target Input Stream
          */
-        virtual io::InputStream* getInputStream(){
+        virtual decaf::io::InputStream* getInputStream(){
             return inputStream;
         }
 
@@ -94,32 +93,32 @@
          * @return The number of bytes read.
          * @throws IOException thrown if an error occurs.
          */
-        virtual std::size_t read( unsigned char* buffer, std::size_t count ) 
-            throw( io::IOException );
-       
+        virtual std::size_t read( unsigned char* buffer, std::size_t count )
+            throw( decaf::io::IOException );
+
         /**
          * Attempts to read a byte from the input stream
          * @return The byte.
          * @throws IOException thrown if an error occurs.
          */
-        virtual unsigned char readByte() throw( io::IOException );
+        virtual unsigned char readByte() throw( decaf::io::IOException );
 
     private:
-    
+
         /**
          * Read the Stomp Command from the Frame
          * @param reference to a Stomp Frame
          * @throws StompConnectorException
          */
-        void readStompCommandHeader( StompFrame& frame ) 
+        void readStompCommandHeader( StompFrame& frame )
             throw ( transport::CommandIOException );
 
-        /** 
+        /**
          * Read all the Stomp Headers for the incoming Frame
          * @param Frame to place data into
          * @throws StompConnectorException
          */
-        void readStompHeaders( StompFrame& frame ) 
+        void readStompHeaders( StompFrame& frame )
             throw ( transport::CommandIOException );
 
         /**
@@ -133,9 +132,9 @@
          * Reads the Stomp Body from the Wire and store it in the frame.
          * @param Stomp Frame to place data in
          */
-        void readStompBody( StompFrame& frame ) 
-            throw ( transport::CommandIOException );                
-    
+        void readStompBody( StompFrame& frame )
+            throw ( transport::CommandIOException );
+
     };
 
 }}}



Mime
View raw message