Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 58787 invoked from network); 11 Jan 2009 20:24:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2009 20:24:15 -0000 Received: (qmail 86471 invoked by uid 500); 11 Jan 2009 20:24:14 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 86454 invoked by uid 500); 11 Jan 2009 20:24:14 -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 86441 invoked by uid 99); 11 Jan 2009 20:24:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Jan 2009 12:24:14 -0800 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; Sun, 11 Jan 2009 20:24:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 750452388C1F; Sun, 11 Jan 2009 12:22:59 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r733509 [25/33] - in /activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire: ./ marshal/ marshal/v1/ marshal/v2/ marshal/v3/ utils/ Date: Sun, 11 Jan 2009 20:22:43 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090111202259.750452388C1F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTEXTMESSAGEMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTEXTMESSAGEMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API ActiveMQTextMessageMarshaller : public MessageMarshaller { + public: + + ActiveMQTextMessageMarshaller() {} + virtual ~ActiveMQTextMessageMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTEXTMESSAGEMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTextMessageMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ActiveMQTopicMarshaller::createObject() const { + return new ActiveMQTopic(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ActiveMQTopicMarshaller::getDataStructureType() const { + return ActiveMQTopic::ID_ACTIVEMQTOPIC; +} + +/////////////////////////////////////////////////////////////////////////////// +void ActiveMQTopicMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ActiveMQDestinationMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ActiveMQTopicMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + int rc = ActiveMQDestinationMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ActiveMQTopicMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ActiveMQDestinationMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ActiveMQTopicMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + ActiveMQDestinationMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ActiveMQTopicMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ActiveMQDestinationMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTOPICMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTOPICMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API ActiveMQTopicMarshaller : public ActiveMQDestinationMarshaller { + public: + + ActiveMQTopicMarshaller() {} + virtual ~ActiveMQTopicMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_ACTIVEMQTOPICMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ActiveMQTopicMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +void BaseCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + transport::Command* info = + dynamic_cast( dataStructure ); + info->setCommandId( dataIn->readInt() ); + info->setResponseRequired( bs->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int BaseCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + transport::Command* info = + dynamic_cast( dataStructure ); + + int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + bs->writeBoolean( info->isResponseRequired() ); + + return rc + 4; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BaseCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + transport::Command* info = + dynamic_cast( dataStructure ); + dataOut->writeInt( info->getCommandId() ); + bs->readBoolean(); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BaseCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + transport::Command* info = + dynamic_cast( dataStructure ); + info->setCommandId( dataIn->readInt() ); + info->setResponseRequired( dataIn->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BaseCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + transport::Command* info = + dynamic_cast( dataStructure ); + BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + dataOut->writeInt( info->getCommandId() ); + dataOut->writeBoolean( info->isResponseRequired() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,115 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BASECOMMANDMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BASECOMMANDMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for BaseCommandMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API BaseCommandMarshaller : public BaseDataStreamMarshaller { + public: + + BaseCommandMarshaller() {} + virtual ~BaseCommandMarshaller() {} + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BASECOMMANDMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BaseCommandMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,131 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* BrokerIdMarshaller::createObject() const { + return new BrokerId(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char BrokerIdMarshaller::getDataStructureType() const { + return BrokerId::ID_BROKERID; +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + BrokerId* info = + dynamic_cast( dataStructure ); + info->setValue( tightUnmarshalString( dataIn, bs ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int BrokerIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BrokerId* info = + dynamic_cast( dataStructure ); + + int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalString1( info->getValue(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + BrokerId* info = + dynamic_cast( dataStructure ); + tightMarshalString2( info->getValue(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + BrokerId* info = + dynamic_cast( dataStructure ); + info->setValue( looseUnmarshalString( dataIn ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + BrokerId* info = + dynamic_cast( dataStructure ); + BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalString( info->getValue(), dataOut ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERIDMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERIDMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for BrokerIdMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API BrokerIdMarshaller : public BaseDataStreamMarshaller { + public: + + BrokerIdMarshaller() {} + virtual ~BrokerIdMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERIDMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerIdMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,210 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* BrokerInfoMarshaller::createObject() const { + return new BrokerInfo(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char BrokerInfoMarshaller::getDataStructureType() const { + return BrokerInfo::ID_BROKERINFO; +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + BrokerInfo* info = + dynamic_cast( dataStructure ); + info->setBrokerId( dynamic_cast< BrokerId* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); + info->setBrokerURL( tightUnmarshalString( dataIn, bs ) ); + + if( bs->readBoolean() ) { + short size = dataIn->readShort(); + info->getPeerBrokerInfos().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getPeerBrokerInfos().push_back( dynamic_cast< BrokerInfo* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + } + } + else { + info->getPeerBrokerInfos().clear(); + } + info->setBrokerName( tightUnmarshalString( dataIn, bs ) ); + info->setSlaveBroker( bs->readBoolean() ); + info->setMasterBroker( bs->readBoolean() ); + info->setFaultTolerantConfiguration( bs->readBoolean() ); + info->setDuplexConnection( bs->readBoolean() ); + info->setNetworkConnection( bs->readBoolean() ); + info->setConnectionId( tightUnmarshalLong( wireFormat, dataIn, bs ) ); + info->setBrokerUploadUrl( tightUnmarshalString( dataIn, bs ) ); + info->setNetworkProperties( tightUnmarshalString( dataIn, bs ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int BrokerInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BrokerInfo* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getBrokerId(), bs ); + rc += tightMarshalString1( info->getBrokerURL(), bs ); + rc += tightMarshalObjectArray1( wireFormat, info->getPeerBrokerInfos(), bs ); + rc += tightMarshalString1( info->getBrokerName(), bs ); + bs->writeBoolean( info->isSlaveBroker() ); + bs->writeBoolean( info->isMasterBroker() ); + bs->writeBoolean( info->isFaultTolerantConfiguration() ); + bs->writeBoolean( info->isDuplexConnection() ); + bs->writeBoolean( info->isNetworkConnection() ); + rc += tightMarshalLong1( wireFormat, info->getConnectionId(), bs ); + rc += tightMarshalString1( info->getBrokerUploadUrl(), bs ); + rc += tightMarshalString1( info->getNetworkProperties(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + BrokerInfo* info = + dynamic_cast( dataStructure ); + tightMarshalCachedObject2( wireFormat, info->getBrokerId(), dataOut, bs ); + tightMarshalString2( info->getBrokerURL(), dataOut, bs ); + tightMarshalObjectArray2( wireFormat, info->getPeerBrokerInfos(), dataOut, bs ); + tightMarshalString2( info->getBrokerName(), dataOut, bs ); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + tightMarshalLong2( wireFormat, info->getConnectionId(), dataOut, bs ); + tightMarshalString2( info->getBrokerUploadUrl(), dataOut, bs ); + tightMarshalString2( info->getNetworkProperties(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + BrokerInfo* info = + dynamic_cast( dataStructure ); + info->setBrokerId( dynamic_cast< BrokerId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setBrokerURL( looseUnmarshalString( dataIn ) ); + + if( dataIn->readBoolean() ) { + short size = dataIn->readShort(); + info->getPeerBrokerInfos().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getPeerBrokerInfos().push_back( dynamic_cast( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + } + } + else { + info->getPeerBrokerInfos().clear(); + } + info->setBrokerName( looseUnmarshalString( dataIn ) ); + info->setSlaveBroker( dataIn->readBoolean() ); + info->setMasterBroker( dataIn->readBoolean() ); + info->setFaultTolerantConfiguration( dataIn->readBoolean() ); + info->setDuplexConnection( dataIn->readBoolean() ); + info->setNetworkConnection( dataIn->readBoolean() ); + info->setConnectionId( looseUnmarshalLong( wireFormat, dataIn ) ); + info->setBrokerUploadUrl( looseUnmarshalString( dataIn ) ); + info->setNetworkProperties( looseUnmarshalString( dataIn ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void BrokerInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + BrokerInfo* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalCachedObject( wireFormat, info->getBrokerId(), dataOut ); + looseMarshalString( info->getBrokerURL(), dataOut ); + looseMarshalObjectArray( wireFormat, info->getPeerBrokerInfos(), dataOut ); + looseMarshalString( info->getBrokerName(), dataOut ); + dataOut->writeBoolean( info->isSlaveBroker() ); + dataOut->writeBoolean( info->isMasterBroker() ); + dataOut->writeBoolean( info->isFaultTolerantConfiguration() ); + dataOut->writeBoolean( info->isDuplexConnection() ); + dataOut->writeBoolean( info->isNetworkConnection() ); + looseMarshalLong( wireFormat, info->getConnectionId(), dataOut ); + looseMarshalString( info->getBrokerUploadUrl(), dataOut ); + looseMarshalString( info->getNetworkProperties(), dataOut ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERINFOMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERINFOMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for BrokerInfoMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API BrokerInfoMarshaller : public BaseCommandMarshaller { + public: + + BrokerInfoMarshaller() {} + virtual ~BrokerInfoMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_BROKERINFOMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/BrokerInfoMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,149 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConnectionControlMarshaller::createObject() const { + return new ConnectionControl(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConnectionControlMarshaller::getDataStructureType() const { + return ConnectionControl::ID_CONNECTIONCONTROL; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionControlMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConnectionControl* info = + dynamic_cast( dataStructure ); + info->setClose( bs->readBoolean() ); + info->setExit( bs->readBoolean() ); + info->setFaultTolerant( bs->readBoolean() ); + info->setResume( bs->readBoolean() ); + info->setSuspend( bs->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ConnectionControlMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConnectionControl* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + bs->writeBoolean( info->isClose() ); + bs->writeBoolean( info->isExit() ); + bs->writeBoolean( info->isFaultTolerant() ); + bs->writeBoolean( info->isResume() ); + bs->writeBoolean( info->isSuspend() ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionControlMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionControlMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConnectionControl* info = + dynamic_cast( dataStructure ); + info->setClose( dataIn->readBoolean() ); + info->setExit( dataIn->readBoolean() ); + info->setFaultTolerant( dataIn->readBoolean() ); + info->setResume( dataIn->readBoolean() ); + info->setSuspend( dataIn->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionControlMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConnectionControl* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + dataOut->writeBoolean( info->isClose() ); + dataOut->writeBoolean( info->isExit() ); + dataOut->writeBoolean( info->isFaultTolerant() ); + dataOut->writeBoolean( info->isResume() ); + dataOut->writeBoolean( info->isSuspend() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONCONTROLMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONCONTROLMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConnectionControlMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API ConnectionControlMarshaller : public BaseCommandMarshaller { + public: + + ConnectionControlMarshaller() {} + virtual ~ConnectionControlMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONCONTROLMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionControlMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.cpp?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.cpp Sun Jan 11 12:22:34 2009 @@ -0,0 +1,140 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Java Classes in the +// activemq-core module +// + +using namespace std; +using namespace activemq; +using namespace activemq::exceptions; +using namespace activemq::commands; +using namespace activemq::wireformat; +using namespace activemq::wireformat::openwire; +using namespace activemq::wireformat::openwire::marshal; +using namespace activemq::wireformat::openwire::utils; +using namespace activemq::wireformat::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConnectionErrorMarshaller::createObject() const { + return new ConnectionError(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConnectionErrorMarshaller::getDataStructureType() const { + return ConnectionError::ID_CONNECTIONERROR; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionErrorMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConnectionError* info = + dynamic_cast( dataStructure ); + info->setException( dynamic_cast< BrokerError* >( + tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) ); + info->setConnectionId( dynamic_cast< ConnectionId* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ConnectionErrorMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConnectionError* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalBrokerError1( wireFormat, info->getException(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getConnectionId(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionErrorMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConnectionError* info = + dynamic_cast( dataStructure ); + tightMarshalBrokerError2( wireFormat, info->getException(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getConnectionId(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionErrorMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConnectionError* info = + dynamic_cast( dataStructure ); + info->setException( dynamic_cast< BrokerError* >( + looseUnmarshalBrokerError( wireFormat, dataIn ) ) ); + info->setConnectionId( dynamic_cast< ConnectionId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionErrorMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConnectionError* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalBrokerError( wireFormat, info->getException(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getConnectionId(), dataOut ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.h?rev=733509&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.h Sun Jan 11 12:22:34 2009 @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONERRORMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONERRORMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConnectionErrorMarshaller + * + * NOTE!: This file is autogenerated - do not modify! + * if you need to make a change, please see the Java Classes + * in the activemq-openwire-generator module + */ + class AMQCPP_API ConnectionErrorMarshaller : public BaseCommandMarshaller { + public: + + ConnectionErrorMarshaller() {} + virtual ~ConnectionErrorMarshaller() {} + + /** + * Creates a new instance of this marshalable type. + * @return new DataStructure object pointer caller owns it. + */ + virtual commands::DataStructure* createObject() const; + + /** + * Get the Data Structure Type that identifies this Marshaller + * @return byte holding the data structure type value + */ + virtual unsigned char getDataStructureType() const; + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be un-marshaled + * @param dataIn - BinaryReader that provides that data + * @param bs - BooleanStream + */ + virtual void tightUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write the booleans that this object uses to a BooleanStream + * @param wireFormat - describis the wire format of the broker + * @param o - Object to be marshaled + * @param bs - BooleanStream + * @returns int + */ + virtual int tightMarshal1( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryReader that provides that data sink + * @param bs - BooleanStream + */ + virtual void tightMarshal2( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut, + utils::BooleanStream* bs ) throw( decaf::io::IOException ); + + /** + * Un-marshal an object instance from the data input stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataIn - BinaryReader that provides that data source + */ + virtual void looseUnmarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException ); + + /** + * Write a object instance to data output stream + * @param wireFormat - describs the wire format of the broker + * @param o - Object to be marshaled + * @param dataOut - BinaryWriter that provides that data sink + */ + virtual void looseMarshal( OpenWireFormat* wireFormat, + commands::DataStructure* dataStructure, + decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException ); + + }; + +}}}}} + +#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V3_CONNECTIONERRORMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/src/main/activemq/wireformat/openwire/marshal/v3/ConnectionErrorMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native