From commits-return-13231-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Sat Mar 06 22:30:56 2010 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 57490 invoked from network); 6 Mar 2010 22:30:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Mar 2010 22:30:56 -0000 Received: (qmail 46080 invoked by uid 500); 6 Mar 2010 22:30:37 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 46022 invoked by uid 500); 6 Mar 2010 22:30:37 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 46015 invoked by uid 99); 6 Mar 2010 22:30:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 22:30:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Mar 2010 22:30:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id AFC732388978; Sat, 6 Mar 2010 22:30:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r919862 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/commands/ main/activemq/core/ main/activemq/wireformat/openwire/marshal/ test/ Date: Sat, 06 Mar 2010 22:30:08 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100306223008.AFC732388978@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Sat Mar 6 22:30:07 2010 New Revision: 919862 URL: http://svn.apache.org/viewvc?rev=919862&view=rev Log: http://issues.apache.org/activemq/browse/AMQCPP-287 Implement compression support in ActiveMQMessage classes. Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessageTemplate.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp Sat Mar 6 22:30:07 2010 @@ -18,10 +18,14 @@ #include +#include #include #include #include +#include +#include + using namespace std; using namespace activemq; using namespace activemq::util; @@ -29,6 +33,51 @@ using namespace activemq::exceptions; using namespace decaf::io; using namespace decaf::lang; +using namespace decaf::util; +using namespace decaf::util::zip; + +//////////////////////////////////////////////////////////////////////////////// +namespace{ + + class ByteCounterOutputStream : public FilterOutputStream { + private: + + std::size_t* length; + + public: + + ByteCounterOutputStream( std::size_t* length, OutputStream* stream, bool own = false ) + : FilterOutputStream( stream, own ), length( length ) { + } + + virtual ~ByteCounterOutputStream() {} + + protected: + + virtual void doWriteByte( unsigned char value ) throw ( decaf::io::IOException ) { + (*length)++; + FilterOutputStream::doWriteByte( value ); + } + + virtual void doWriteArray( const unsigned char* buffer, std::size_t size ) + throw( decaf::io::IOException ) { + + (*length) += size; + FilterOutputStream::doWriteArray( buffer, size ); + } + + virtual void doWriteArrayBounded( const unsigned char* buffer, std::size_t size, + std::size_t offset, std::size_t length ) + throw ( decaf::io::IOException, + decaf::lang::exceptions::NullPointerException, + decaf::lang::exceptions::IndexOutOfBoundsException ) { + + (*this->length) += length; + FilterOutputStream::doWriteArrayBounded( buffer, size, offset, length ); + } + + }; +} //////////////////////////////////////////////////////////////////////////////// ActiveMQBytesMessage::ActiveMQBytesMessage() : @@ -137,6 +186,7 @@ ActiveMQMessageTemplate::clearBody(); this->dataOut.reset( NULL ); + this->bytesOut = NULL; this->dataIn.reset( NULL ); this->length = 0; } @@ -154,7 +204,7 @@ try{ storeContent(); - this->bytesOut.reset( NULL ); + this->bytesOut = NULL; this->dataIn.reset( NULL ); this->dataOut.reset( NULL ); this->length = 0; @@ -569,10 +619,25 @@ this->dataOut->close(); - this->setContent( this->bytesOut->toByteArrayRef() ); + if( !this->compressed ) { + this->setContent( this->bytesOut->toByteArrayRef() ); + } else { + + ByteArrayOutputStream buffer; + DataOutputStream doBuffer( &buffer ); + + // Start by writing the length of the written data before compression. + doBuffer.writeInt( this->length ); + + // Now write the Compressed bytes. + this->bytesOut->writeTo( &doBuffer ); + + // Now store the annotated content. + this->setContent( buffer.toByteArrayRef() ); + } this->dataOut.reset( NULL ); - this->bytesOut.reset( NULL ); + this->bytesOut = NULL; } } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() @@ -583,10 +648,24 @@ this->failIfWriteOnlyBody(); try { - if( this->dataIn.get() == NULL) { - ByteArrayInputStream* is = new ByteArrayInputStream( this->getContent() ); + if( this->dataIn.get() == NULL ) { + InputStream* is = new ByteArrayInputStream( this->getContent() ); + + if( this->isCompressed() ) { + + try{ + DataInputStream dis( is ); + this->length = dis.readInt(); + } catch( IOException& ex ) { + CMSExceptionSupport::create( ex ); + } + + is = new InflaterInputStream( is, true ); + + } else { + this->length = this->getContent().size(); + } this->dataIn.reset( new DataInputStream( is, true ) ); - this->length = this->getContent().size(); } } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() @@ -599,8 +678,18 @@ try{ if( this->dataOut.get() == NULL ) { this->length = 0; - this->bytesOut.reset( new ByteArrayOutputStream() ); - this->dataOut.reset( new DataOutputStream( this->bytesOut.get() ) ); + this->bytesOut = new ByteArrayOutputStream(); + + OutputStream* os = this->bytesOut; + + if( this->connection != NULL && this->connection->isUseCompression() ) { + this->compressed = true; + + os = new DeflaterOutputStream( os, true ); + os = new ByteCounterOutputStream( &length, os, true ); + } + + this->dataOut.reset( new DataOutputStream( os, true ) ); } } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.h Sat Mar 6 22:30:07 2010 @@ -44,7 +44,7 @@ * OutputStream that wraps around the command's content when in * write-only mode. */ - std::auto_ptr bytesOut; + decaf::io::ByteArrayOutputStream* bytesOut; /** * DataInputStream wrapper around the input stream. Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMapMessage.cpp Sat Mar 6 22:30:07 2010 @@ -20,10 +20,21 @@ #include +#include +#include +#include +#include +#include +#include +#include + using namespace std; using namespace decaf; +using namespace decaf::io; using namespace decaf::lang; using namespace decaf::lang::exceptions; +using namespace decaf::util; +using namespace decaf::util::zip; using namespace activemq; using namespace activemq::util; using namespace activemq::exceptions; @@ -92,8 +103,20 @@ ActiveMQMessageTemplate::beforeMarshal( wireFormat ); if( map.get() != NULL && !map->isEmpty() ) { - // Marshal as Content. - PrimitiveTypesMarshaller::marshal( map.get(), getContent() ); + + ByteArrayOutputStream* bytesOut = new ByteArrayOutputStream(); + + OutputStream* os = bytesOut; + + if( this->connection != NULL && this->connection->isUseCompression() ) { + os = new DeflaterOutputStream( os, true ); + } + + DataOutputStream dataOut( os, true ); + PrimitiveTypesMarshaller::marshalMap( map.get(), dataOut ); + dataOut.close(); + setContent( bytesOut->toByteArrayRef() ); + } else { clearBody(); } @@ -136,20 +159,27 @@ try { - if( map.get() == NULL ) { + if( map.get() == NULL && !getContent().empty() ) { - map.reset( new PrimitiveMap() ); + InputStream* is = new ByteArrayInputStream( getContent() ); - if( getContent().size() != 0 ){ - PrimitiveTypesMarshaller::unmarshal( map.get(), getContent() ); + if( isCompressed() == true ) { + is = new InflaterInputStream( is, true ); + is = new BufferedInputStream( is, true ); } + DataInputStream dataIn( is, true ); + + map.reset( PrimitiveTypesMarshaller::unmarshalMap( dataIn ) ); + if( map.get() == NULL ) { throw NullPointerException( __FILE__, __LINE__, "ActiveMQMapMessage::getMap() - All attempts to create a " "map have failed." ); } + } else if( map.get() == NULL ) { + map.reset( new PrimitiveMap() ); } } AMQ_CATCH_RETHROW( NullPointerException ) Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessageTemplate.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessageTemplate.h?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessageTemplate.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQMessageTemplate.h Sat Mar 6 22:30:07 2010 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -42,9 +43,13 @@ std::auto_ptr propertiesInterceptor; + protected: + + activemq::core::ActiveMQConnection* connection; + public: - ActiveMQMessageTemplate() : commands::Message() { + ActiveMQMessageTemplate() : commands::Message(), connection( NULL ) { this->propertiesInterceptor.reset( new wireformat::openwire::utils::MessagePropertyInterceptor( this, &this->getMessageProperties() ) ); @@ -52,6 +57,14 @@ virtual ~ActiveMQMessageTemplate() {} + activemq::core::ActiveMQConnection* getConnection() const { + return this->connection; + } + + void setConnection( activemq::core::ActiveMQConnection* connection ) { + this->connection = connection; + } + public: // cms::Message related methods /** Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp Sat Mar 6 22:30:07 2010 @@ -37,6 +37,9 @@ #include #include #include +#include +#include +#include using namespace std; using namespace cms; @@ -51,6 +54,8 @@ using namespace decaf::io; using namespace decaf::lang; using namespace decaf::lang::exceptions; +using namespace decaf::util; +using namespace decaf::util::zip; //////////////////////////////////////////////////////////////////////////////// ActiveMQStreamMessage::ActiveMQStreamMessage() : @@ -116,7 +121,7 @@ this->dataIn.reset( NULL ); this->dataOut.reset( NULL ); - this->bytesOut.reset( NULL ); + this->bytesOut = NULL; this->remainingBytes = -1; } @@ -132,7 +137,7 @@ try{ storeContent(); - this->bytesOut.reset(NULL); + this->bytesOut = NULL; this->dataIn.reset(NULL); this->dataOut.reset(NULL); this->remainingBytes = -1; @@ -900,8 +905,8 @@ this->dataOut->close(); this->setContent( this->bytesOut->toByteArrayRef() ); - this->dataOut.reset(NULL); - this->bytesOut.reset(NULL); + this->dataOut.reset( NULL ); + this->bytesOut = NULL; } } @@ -911,7 +916,13 @@ this->failIfWriteOnlyBody(); try { if( this->dataIn.get() == NULL) { - ByteArrayInputStream* is = new ByteArrayInputStream( this->getContent() ); + InputStream* is = new ByteArrayInputStream( this->getContent() ); + + if( isCompressed() ) { + is = new InflaterInputStream( is, true ); + is = new BufferedInputStream( is, true ); + } + this->dataIn.reset( new DataInputStream( is, true ) ); } } @@ -924,8 +935,16 @@ this->failIfReadOnlyBody(); try{ if( this->dataOut.get() == NULL ) { - this->bytesOut.reset( new ByteArrayOutputStream() ); - this->dataOut.reset( new DataOutputStream( this->bytesOut.get() ) ); + this->bytesOut = new ByteArrayOutputStream(); + + OutputStream* os = this->bytesOut; + + if( this->connection != NULL && this->connection->isUseCompression() ) { + this->compressed = true; + os = new DeflaterOutputStream( os, true ); + } + + this->dataOut.reset( new DataOutputStream( os, true ) ); } } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.h Sat Mar 6 22:30:07 2010 @@ -45,7 +45,7 @@ public ActiveMQMessageTemplate< cms::StreamMessage > { private: - mutable std::auto_ptr bytesOut; + decaf::io::ByteArrayOutputStream* bytesOut; mutable std::auto_ptr dataIn; mutable std::auto_ptr dataOut; Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp Sat Mar 6 22:30:07 2010 @@ -20,6 +20,8 @@ #include #include #include +#include +#include #include #include @@ -35,6 +37,8 @@ using namespace activemq::wireformat::openwire::utils; using namespace decaf::io; using namespace decaf::lang; +using namespace decaf::util; +using namespace decaf::util::zip; //////////////////////////////////////////////////////////////////////////////// ActiveMQTextMessage::ActiveMQTextMessage() : @@ -117,14 +121,21 @@ if( this->text.get() != NULL ) { - ByteArrayOutputStream bytesOut; - DataOutputStream dataOut( &bytesOut ); + ByteArrayOutputStream* bytesOut = new ByteArrayOutputStream; + OutputStream* os = bytesOut; + + if( this->connection != NULL && this->connection->isUseCompression() ) { + this->compressed = true; + os = new DeflaterOutputStream( os, true ); + } + + DataOutputStream dataOut( os, true ); OpenwireStringSupport::writeString( dataOut, this->text.get() ); dataOut.close(); - this->setContent( bytesOut.toByteArrayRef() ); + this->setContent( bytesOut->toByteArrayRef() ); this->text.reset( NULL ); } } @@ -159,13 +170,18 @@ try { - decaf::io::ByteArrayInputStream bais( getContent() ); - decaf::io::DataInputStream dataIn( &bais ); + InputStream* is = new ByteArrayInputStream( getContent() ); - dataIn.close(); + if( isCompressed() ) { + is = new InflaterInputStream( is, true ); + } + + DataInputStream dataIn( is, true ); this->text.reset( new std::string( OpenwireStringSupport::readString( dataIn ) ) ); + dataIn.close(); + } catch( IOException& ioe ) { throw CMSExceptionSupport::create( ioe ); } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp Sat Mar 6 22:30:07 2010 @@ -557,7 +557,9 @@ try{ this->checkClosed(); - return new commands::ActiveMQMessage(); + commands::ActiveMQMessage* message = new commands::ActiveMQMessage(); + message->setConnection( this->connection ); + return message; } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() } @@ -569,7 +571,9 @@ try{ this->checkClosed(); - return new commands::ActiveMQBytesMessage(); + commands::ActiveMQBytesMessage* message = new commands::ActiveMQBytesMessage(); + message->setConnection( this->connection ); + return message; } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() } @@ -597,7 +601,9 @@ try{ this->checkClosed(); - return new commands::ActiveMQStreamMessage(); + commands::ActiveMQStreamMessage* message = new commands::ActiveMQStreamMessage(); + message->setConnection( this->connection ); + return message; } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() } @@ -609,7 +615,9 @@ try{ this->checkClosed(); - return new commands::ActiveMQTextMessage(); + commands::ActiveMQTextMessage* message = new commands::ActiveMQTextMessage(); + message->setConnection( this->connection ); + return message; } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() } @@ -635,7 +643,9 @@ try{ this->checkClosed(); - return new commands::ActiveMQMapMessage(); + commands::ActiveMQMapMessage* message = new commands::ActiveMQMapMessage(); + message->setConnection( this->connection ); + return message; } AMQ_CATCH_ALL_THROW_CMSEXCEPTION() } Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp Sat Mar 6 22:30:07 2010 @@ -25,6 +25,9 @@ #include #include +#include + +using namespace std; using namespace activemq; using namespace activemq::util; using namespace activemq::exceptions; @@ -37,13 +40,12 @@ using namespace decaf::lang; /////////////////////////////////////////////////////////////////////////////// -void PrimitiveTypesMarshaller::marshal( const activemq::util::PrimitiveMap* map, - std::vector& dest ) - throw ( decaf::lang::Exception ) { +void PrimitiveTypesMarshaller::marshal( const PrimitiveMap* map, std::vector& buffer ) + throw ( decaf::lang::Exception ) { try { - ByteArrayOutputStream bytesOut( dest ); + ByteArrayOutputStream bytesOut( buffer ); DataOutputStream dataOut( &bytesOut ); if( map == NULL ) { @@ -57,20 +59,19 @@ } /////////////////////////////////////////////////////////////////////////////// -void PrimitiveTypesMarshaller::unmarshal( - activemq::util::PrimitiveMap* map, - const std::vector& src ) throw ( decaf::lang::Exception ) { +void PrimitiveTypesMarshaller::unmarshal( PrimitiveMap* map, const std::vector& buffer ) + throw ( decaf::lang::Exception ) { try { - if( map == NULL || src.empty() ) { + if( map == NULL || buffer.empty() ) { return; } // Clear old data map->clear(); - ByteArrayInputStream bytesIn( src ); + ByteArrayInputStream bytesIn( buffer ); DataInputStream dataIn( &bytesIn ); PrimitiveTypesMarshaller::unmarshalPrimitiveMap( dataIn, *map ); } @@ -79,12 +80,12 @@ } /////////////////////////////////////////////////////////////////////////////// -void PrimitiveTypesMarshaller::marshal( const activemq::util::PrimitiveList* list, - std::vector& dest ) - throw ( decaf::lang::Exception ) { +void PrimitiveTypesMarshaller::marshal( const util::PrimitiveList* list, std::vector& buffer ) + throw ( decaf::lang::Exception ) { + try { - ByteArrayOutputStream bytesOut( dest ); + ByteArrayOutputStream bytesOut( buffer ); DataOutputStream dataOut( &bytesOut ); if( list == NULL ) { @@ -98,20 +99,19 @@ } /////////////////////////////////////////////////////////////////////////////// -void PrimitiveTypesMarshaller::unmarshal( activemq::util::PrimitiveList* list, - const std::vector& src ) - throw ( decaf::lang::Exception ) { +void PrimitiveTypesMarshaller::unmarshal( util::PrimitiveList* list, const std::vector& buffer ) + throw ( decaf::lang::Exception ) { try { - if( list == NULL || src.empty() ) { + if( list == NULL || buffer.empty() ) { return; } // Clear old data list->clear(); - ByteArrayInputStream bytesIn( src ); + ByteArrayInputStream bytesIn( buffer ); DataInputStream dataIn( &bytesIn ); PrimitiveTypesMarshaller::unmarshalPrimitiveList( dataIn, *list ); } @@ -120,6 +120,66 @@ } /////////////////////////////////////////////////////////////////////////////// +void PrimitiveTypesMarshaller::marshalMap( const PrimitiveMap* map, DataOutputStream& dataOut ) + throw ( decaf::lang::Exception ) { + + try { + + if( map == NULL ) { + dataOut.writeInt( -1 ); + } else { + PrimitiveTypesMarshaller::marshalPrimitiveMap( dataOut, *map ); + } + } + AMQ_CATCH_RETHROW( decaf::lang::Exception ) + AMQ_CATCHALL_THROW( decaf::lang::Exception ) +} + +/////////////////////////////////////////////////////////////////////////////// +PrimitiveMap* PrimitiveTypesMarshaller::unmarshalMap( DataInputStream& dataIn ) + throw ( decaf::lang::Exception ) { + + try { + + std::auto_ptr map( new PrimitiveMap() ); + PrimitiveTypesMarshaller::unmarshalPrimitiveMap( dataIn, *( map.get() ) ); + return map.release(); + } + AMQ_CATCH_RETHROW( decaf::lang::Exception ) + AMQ_CATCHALL_THROW( decaf::lang::Exception ) +} + +/////////////////////////////////////////////////////////////////////////////// +void PrimitiveTypesMarshaller::marshalList( const PrimitiveList* list, DataOutputStream& dataOut ) + throw ( decaf::lang::Exception ) { + + try { + + if( list == NULL ) { + dataOut.writeInt( -1 ); + } else { + PrimitiveTypesMarshaller::marshalPrimitiveList( dataOut, *list ); + } + } + AMQ_CATCH_RETHROW( decaf::lang::Exception ) + AMQ_CATCHALL_THROW( decaf::lang::Exception ) +} + +/////////////////////////////////////////////////////////////////////////////// +PrimitiveList* PrimitiveTypesMarshaller::unmarshalList( DataInputStream& dataIn ) + throw ( decaf::lang::Exception ) { + + try { + + std::auto_ptr list( new PrimitiveList() ); + PrimitiveTypesMarshaller::unmarshalPrimitiveList( dataIn, *( list.get() ) ); + return list.release(); + } + AMQ_CATCH_RETHROW( decaf::lang::Exception ) + AMQ_CATCHALL_THROW( decaf::lang::Exception ) +} + +/////////////////////////////////////////////////////////////////////////////// void PrimitiveTypesMarshaller::marshalPrimitiveMap( decaf::io::DataOutputStream& dataOut, const decaf::util::Map& map ) Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.h Sat Mar 6 22:30:07 2010 @@ -45,62 +45,110 @@ virtual ~PrimitiveTypesMarshaller() {} /** - * Static Marshal of a primitive map object. + * Marshal a primitive map object to the given byte buffer. * * @param map * Map to Marshal. - * @param dest - * Reference to a byte array to house the data. + * @param buffer + * The byte buffer to write the marshaled data to. * - * @throws Exception + * @throws Exception if an error occurs during the marshaling process. */ - static void marshal( const util::PrimitiveMap* map, - std::vector& dest ) - throw ( decaf::lang::Exception ); + static void marshal( const util::PrimitiveMap* map, std::vector& buffer ) + throw ( decaf::lang::Exception ); /** - * Static Map Unmarshaler, takes an array of bytes and returns a - * new instance of a PrimitiveMap object. Caller owns the pointer. + * Unmarshal a PrimitiveMap from the provided Byte buffer. * * @param map - * Map to Unmarshal into - * @param src - * Reference to a byte array to read data from. + * The Map to populate with values from the marshaled data. + * @param buffer + * The byte buffer containing the marshaled Map. * - * @throws Exception + * @throws Exception if an error occurs during the unmarshal process. */ - static void unmarshal( util::PrimitiveMap* map, - const std::vector& src ) - throw ( decaf::lang::Exception ); + static void unmarshal( util::PrimitiveMap* map, const std::vector& buffer ) + throw ( decaf::lang::Exception ); /** - * Static Marshal of a primitive map object. + * Marshal a primitive list object to the given byte buffer. + * + * @param map + * The PrimitiveList to Marshal. + * @param buffer + * The byte buffer to write the marshaled data to. + * + * @throws Exception if an error occurs during the marshaling process. + */ + static void marshal( const util::PrimitiveList* list, std::vector& buffer ) + throw ( decaf::lang::Exception ); + + /** + * Unmarshal a PrimitiveList from the provided byte buffer. + * + * @param map + * The List to populate with values from the marshaled data. + * @param buffer + * The byte buffer containing the marshaled Map. + * + * @throws Exception if an error occurs during the unmarshal process. + */ + static void unmarshal( util::PrimitiveList* list, const std::vector& buffer ) + throw ( decaf::lang::Exception ); + + public: + + /** + * Marshal a primitive map object to the given DataOutputStream. + * + * @param map + * Map to Marshal. + * @param dataOut + * Reference to a DataOutputStream to write the marshaled data to. + * + * @throws Exception if an error occurs during the marshaling process. + */ + static void marshalMap( const util::PrimitiveMap* map, decaf::io::DataOutputStream& dataOut ) + throw ( decaf::lang::Exception ); + + /** + * Unmarshal a PrimitiveMap from the provided DataInputStream. + * + * @param dataIn + * The DataInputStream instance to read the marshaled PrimitiveMap from. + * + * @return a pointer to a newly allocated PrimitiveMap instnace. + * + * @throws Exception if an error occurs during the unmarshal process. + */ + static util::PrimitiveMap* unmarshalMap( decaf::io::DataInputStream& dataIn ) + throw ( decaf::lang::Exception ); + + /** + * Marshal a PrimitiveList to the given DataOutputStream. * * @param list * The list object to Marshal - * @param dest - * Reference to a byte array to house the data + * @param dataOut + * Reference to a DataOutputStream to write the marshaled data to. * - * @throws Exception + * @throws Exception if an error occurs during the marshaling process. */ - static void marshal( const util::PrimitiveList* list, - std::vector& dest ) - throw ( decaf::lang::Exception ); + static void marshalList( const util::PrimitiveList* list, decaf::io::DataOutputStream& dataOut ) + throw ( decaf::lang::Exception ); /** - * Static Map Unmarshaler, takes an array of bytes and returns a - * new instance of a PrimitiveMap object. Caller owns the pointer. + * Unmarshal a PrimitiveList from the given DataInputStream. * - * @param list - * The list object to Un-marshal - * @param src - * Reference to a byte array to read data from. - * - * @throws Exception - */ - static void unmarshal( util::PrimitiveList* list, - const std::vector& src ) - throw ( decaf::lang::Exception ); + * @param dataIn + * The DataInputStream instance to read the marshaled PrimitiveList from. + * + * @return a pointer to a newly allocated PrimitiveList instnace. + * + * @throws Exception if an error occurs during the unmarshal process. + */ + static util::PrimitiveList* unmarshalList( decaf::io::DataInputStream& dataIn ) + throw ( decaf::lang::Exception ); protected: Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp?rev=919862&r1=919861&r2=919862&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Sat Mar 6 22:30:07 2010 @@ -18,283 +18,283 @@ // All CPP Unit tests are registered in here so we can disable them and // enable them easily in one place. -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::OpenwireStringSupportTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::MessageDispatchChannelTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayPerspectiveTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest ); -// -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerInfoTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::BrokerIdTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTopicTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTextMessageTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempTopicTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQTempQueueTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQQueueTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMessageTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQMapMessageTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQDestinationTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQBytesMessageTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::commands::ActiveMQStreamMessageTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::BaseDataStreamMarshallerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::marshal::PrimitiveTypesMarshallerTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::BooleanStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::HexTableTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::OpenwireStringSupportTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::utils::MessagePropertyInterceptorTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::openwire::OpenWireFormatTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsAccessorTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsDestinationAccessorTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::CmsTemplateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::DynamicDestinationResolverTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::cmsutil::SessionPoolTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionFactoryTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQConnectionTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::ActiveMQSessionTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::core::MessageDispatchChannelTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTrackerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConnectionStateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ConsumerStateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::ProducerStateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::SessionStateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::state::TransactionStateTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::failover::FailoverTransportTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::correlator::ResponseCorrelatorTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::mock::MockTransportFactoryTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::inactivity::InactivityMonitorTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::TransportRegistryTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::transport::IOTransportTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::exceptions::ActiveMQExceptionTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::LongSequenceGeneratorTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueNodeTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::MemoryUsageTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::DedicatedTaskRunnerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::threads::CompositeTaskRunnerTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::wireformat::WireFormatRegistryTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::ByteArrayAdapterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::util::TimerTaskHeapTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayPerspectiveTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ByteArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::BufferFactoryTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::CharArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::DoubleArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::FloatArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::LongArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::IntArrayBufferTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::nio::ShortArrayBufferTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIEncoderDecoderTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::internal::net::URIHelperTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::nio::BufferTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::WriterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ReaderTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamWriterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamReaderTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::PointerTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLEncoderTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URLDecoderTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ConcurrentStlMapTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::TimeUnitTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicBooleanTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicIntegerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::atomic::AtomicReferenceTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::locks::LockSupportTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::ListTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StlMapTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PropertiesTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::TimerTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::PriorityQueueTest ); + +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::InflaterTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest ); #include CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::DeflaterOutputStreamTest ); #include