Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 93817 invoked from network); 13 Aug 2008 23:43:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2008 23:43:36 -0000 Received: (qmail 33492 invoked by uid 500); 13 Aug 2008 23:43:35 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 33440 invoked by uid 500); 13 Aug 2008 23:43:34 -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 33350 invoked by uid 99); 13 Aug 2008 23:43:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2008 16:43:34 -0700 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; Wed, 13 Aug 2008 23:42:44 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 165422388A50; Wed, 13 Aug 2008 16:43:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r685729 [4/17] - in /activemq/activemq-cpp/trunk/src: main/ main/activemq/connector/openwire/ main/activemq/connector/openwire/commands/ main/activemq/connector/openwire/marshal/v3/ main/java/org/apache/activemq/openwire/tool/ test/ test/ac... Date: Wed, 13 Aug 2008 23:43:02 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080813234313.165422388A50@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::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 ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionErrorMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONERRORMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_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 + +namespace activemq{ +namespace connector{ +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 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONERRORMARSHALLER_H_*/ + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConnectionIdMarshaller::createObject() const { + return new ConnectionId(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConnectionIdMarshaller::getDataStructureType() const { + return ConnectionId::ID_CONNECTIONID; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConnectionId* 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 ConnectionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConnectionId* 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 ConnectionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConnectionId* 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 ConnectionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConnectionId* 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 ConnectionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConnectionId* 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 ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionIdMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONIDMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONIDMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace connector{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConnectionIdMarshaller + * + * 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 ConnectionIdMarshaller : public BaseDataStreamMarshaller + { + public: + + ConnectionIdMarshaller() {} + virtual ~ConnectionIdMarshaller() {} + + /** + * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONIDMARSHALLER_H_*/ + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -0,0 +1,190 @@ +/* + * 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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConnectionInfoMarshaller::createObject() const { + return new ConnectionInfo(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConnectionInfoMarshaller::getDataStructureType() const { + return ConnectionInfo::ID_CONNECTIONINFO; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConnectionInfo* info = + dynamic_cast( dataStructure ); + info->setConnectionId( dynamic_cast< ConnectionId* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); + info->setClientId( tightUnmarshalString( dataIn, bs ) ); + info->setPassword( tightUnmarshalString( dataIn, bs ) ); + info->setUserName( tightUnmarshalString( dataIn, bs ) ); + + if( bs->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( dynamic_cast< BrokerId* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + info->setBrokerMasterConnector( bs->readBoolean() ); + info->setManageable( bs->readBoolean() ); + info->setClientMaster( bs->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ConnectionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConnectionInfo* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs ); + rc += tightMarshalString1( info->getClientId(), bs ); + rc += tightMarshalString1( info->getPassword(), bs ); + rc += tightMarshalString1( info->getUserName(), bs ); + rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs ); + bs->writeBoolean( info->isBrokerMasterConnector() ); + bs->writeBoolean( info->isManageable() ); + bs->writeBoolean( info->isClientMaster() ); + + 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 ConnectionInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConnectionInfo* info = + dynamic_cast( dataStructure ); + tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs ); + tightMarshalString2( info->getClientId(), dataOut, bs ); + tightMarshalString2( info->getPassword(), dataOut, bs ); + tightMarshalString2( info->getUserName(), dataOut, bs ); + tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs ); + 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 ConnectionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConnectionInfo* info = + dynamic_cast( dataStructure ); + info->setConnectionId( dynamic_cast< ConnectionId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setClientId( looseUnmarshalString( dataIn ) ); + info->setPassword( looseUnmarshalString( dataIn ) ); + info->setUserName( looseUnmarshalString( dataIn ) ); + + if( dataIn->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( dynamic_cast( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + info->setBrokerMasterConnector( dataIn->readBoolean() ); + info->setManageable( dataIn->readBoolean() ); + info->setClientMaster( dataIn->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConnectionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConnectionInfo* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut ); + looseMarshalString( info->getClientId(), dataOut ); + looseMarshalString( info->getPassword(), dataOut ); + looseMarshalString( info->getUserName(), dataOut ); + looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut ); + dataOut->writeBoolean( info->isBrokerMasterConnector() ); + dataOut->writeBoolean( info->isManageable() ); + dataOut->writeBoolean( info->isClientMaster() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConnectionInfoMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONINFOMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONINFOMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace connector{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConnectionInfoMarshaller + * + * 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 ConnectionInfoMarshaller : public BaseCommandMarshaller + { + public: + + ConnectionInfoMarshaller() {} + virtual ~ConnectionInfoMarshaller() {} + + /** + * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONNECTIONINFOMARSHALLER_H_*/ + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -0,0 +1,157 @@ +/* + * 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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConsumerControlMarshaller::createObject() const { + return new ConsumerControl(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConsumerControlMarshaller::getDataStructureType() const { + return ConsumerControl::ID_CONSUMERCONTROL; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerControlMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConsumerControl* info = + dynamic_cast( dataStructure ); + info->setClose( bs->readBoolean() ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + info->setPrefetch( dataIn->readInt() ); + info->setFlush( bs->readBoolean() ); + info->setStart( bs->readBoolean() ); + info->setStop( bs->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ConsumerControlMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConsumerControl* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + bs->writeBoolean( info->isClose() ); + rc += tightMarshalNestedObject1( wireFormat, info->getConsumerId(), bs ); + bs->writeBoolean( info->isFlush() ); + bs->writeBoolean( info->isStart() ); + bs->writeBoolean( info->isStop() ); + + 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 ConsumerControlMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConsumerControl* info = + dynamic_cast( dataStructure ); + bs->readBoolean(); + tightMarshalNestedObject2( wireFormat, info->getConsumerId(), dataOut, bs ); + dataOut->writeInt( info->getPrefetch() ); + 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 ConsumerControlMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConsumerControl* info = + dynamic_cast( dataStructure ); + info->setClose( dataIn->readBoolean() ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setPrefetch( dataIn->readInt() ); + info->setFlush( dataIn->readBoolean() ); + info->setStart( dataIn->readBoolean() ); + info->setStop( dataIn->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerControlMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConsumerControl* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + dataOut->writeBoolean( info->isClose() ); + looseMarshalNestedObject( wireFormat, info->getConsumerId(), dataOut ); + dataOut->writeInt( info->getPrefetch() ); + dataOut->writeBoolean( info->isFlush() ); + dataOut->writeBoolean( info->isStart() ); + dataOut->writeBoolean( info->isStop() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerControlMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERCONTROLMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERCONTROLMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace connector{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConsumerControlMarshaller + * + * 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 ConsumerControlMarshaller : public BaseCommandMarshaller + { + public: + + ConsumerControlMarshaller() {} + virtual ~ConsumerControlMarshaller() {} + + /** + * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERCONTROLMARSHALLER_H_*/ + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -0,0 +1,141 @@ +/* + * 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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConsumerIdMarshaller::createObject() const { + return new ConsumerId(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConsumerIdMarshaller::getDataStructureType() const { + return ConsumerId::ID_CONSUMERID; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConsumerId* info = + dynamic_cast( dataStructure ); + info->setConnectionId( tightUnmarshalString( dataIn, bs ) ); + info->setSessionId( tightUnmarshalLong( wireFormat, dataIn, bs ) ); + info->setValue( tightUnmarshalLong( 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 ConsumerIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConsumerId* info = + dynamic_cast( dataStructure ); + + int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalString1( info->getConnectionId(), bs ); + rc += tightMarshalLong1( wireFormat, info->getSessionId(), bs ); + rc += tightMarshalLong1( wireFormat, 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 ConsumerIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConsumerId* info = + dynamic_cast( dataStructure ); + tightMarshalString2( info->getConnectionId(), dataOut, bs ); + tightMarshalLong2( wireFormat, info->getSessionId(), dataOut, bs ); + tightMarshalLong2( wireFormat, 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 ConsumerIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConsumerId* info = + dynamic_cast( dataStructure ); + info->setConnectionId( looseUnmarshalString( dataIn ) ); + info->setSessionId( looseUnmarshalLong( wireFormat, dataIn ) ); + info->setValue( looseUnmarshalLong( wireFormat, dataIn ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConsumerId* info = + dynamic_cast( dataStructure ); + BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalString( info->getConnectionId(), dataOut ); + looseMarshalLong( wireFormat, info->getSessionId(), dataOut ); + looseMarshalLong( wireFormat, info->getValue(), dataOut ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerIdMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERIDMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERIDMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace connector{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConsumerIdMarshaller + * + * 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 ConsumerIdMarshaller : public BaseDataStreamMarshaller + { + public: + + ConsumerIdMarshaller() {} + virtual ~ConsumerIdMarshaller() {} + + /** + * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERIDMARSHALLER_H_*/ + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.cpp?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.cpp Wed Aug 13 16:42:56 2008 @@ -0,0 +1,236 @@ +/* + * 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::connector; +using namespace activemq::connector::openwire; +using namespace activemq::connector::openwire::commands; +using namespace activemq::connector::openwire::marshal; +using namespace activemq::connector::openwire::utils; +using namespace activemq::connector::openwire::marshal::v3; +using namespace decaf; +using namespace decaf::io; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ConsumerInfoMarshaller::createObject() const { + return new ConsumerInfo(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ConsumerInfoMarshaller::getDataStructureType() const { + return ConsumerInfo::ID_CONSUMERINFO; +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ConsumerInfo* info = + dynamic_cast( dataStructure ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); + info->setBrowser( bs->readBoolean() ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ); + info->setPrefetchSize( dataIn->readInt() ); + info->setMaximumPendingMessageLimit( dataIn->readInt() ); + info->setDispatchAsync( bs->readBoolean() ); + info->setSelector( tightUnmarshalString( dataIn, bs ) ); + info->setSubscriptionName( tightUnmarshalString( dataIn, bs ) ); + info->setNoLocal( bs->readBoolean() ); + info->setExclusive( bs->readBoolean() ); + info->setRetroactive( bs->readBoolean() ); + info->setPriority( dataIn->readByte() ); + + if( bs->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( dynamic_cast< BrokerId* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ); + info->setNetworkSubscription( bs->readBoolean() ); + info->setOptimizedAcknowledge( bs->readBoolean() ); + info->setNoRangeAcks( bs->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ConsumerInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ConsumerInfo* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs ); + bs->writeBoolean( info->isBrowser() ); + rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs ); + bs->writeBoolean( info->isDispatchAsync() ); + rc += tightMarshalString1( info->getSelector(), bs ); + rc += tightMarshalString1( info->getSubscriptionName(), bs ); + bs->writeBoolean( info->isNoLocal() ); + bs->writeBoolean( info->isExclusive() ); + bs->writeBoolean( info->isRetroactive() ); + rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getAdditionalPredicate(), bs ); + bs->writeBoolean( info->isNetworkSubscription() ); + bs->writeBoolean( info->isOptimizedAcknowledge() ); + bs->writeBoolean( info->isNoRangeAcks() ); + + return rc + 9; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ConsumerInfo* info = + dynamic_cast( dataStructure ); + tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs ); + bs->readBoolean(); + tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs ); + dataOut->writeInt( info->getPrefetchSize() ); + dataOut->writeInt( info->getMaximumPendingMessageLimit() ); + bs->readBoolean(); + tightMarshalString2( info->getSelector(), dataOut, bs ); + tightMarshalString2( info->getSubscriptionName(), dataOut, bs ); + bs->readBoolean(); + bs->readBoolean(); + bs->readBoolean(); + dataOut->write( info->getPriority() ); + tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs ); + tightMarshalNestedObject2( wireFormat, info->getAdditionalPredicate(), dataOut, bs ); + 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 ConsumerInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ConsumerInfo* info = + dynamic_cast( dataStructure ); + info->setConsumerId( dynamic_cast< ConsumerId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setBrowser( dataIn->readBoolean() ); + info->setDestination( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ); + info->setPrefetchSize( dataIn->readInt() ); + info->setMaximumPendingMessageLimit( dataIn->readInt() ); + info->setDispatchAsync( dataIn->readBoolean() ); + info->setSelector( looseUnmarshalString( dataIn ) ); + info->setSubscriptionName( looseUnmarshalString( dataIn ) ); + info->setNoLocal( dataIn->readBoolean() ); + info->setExclusive( dataIn->readBoolean() ); + info->setRetroactive( dataIn->readBoolean() ); + info->setPriority( dataIn->readByte() ); + + if( dataIn->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( dynamic_cast( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ); + info->setNetworkSubscription( dataIn->readBoolean() ); + info->setOptimizedAcknowledge( dataIn->readBoolean() ); + info->setNoRangeAcks( dataIn->readBoolean() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ConsumerInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ConsumerInfo* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut ); + dataOut->writeBoolean( info->isBrowser() ); + looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut ); + dataOut->writeInt( info->getPrefetchSize() ); + dataOut->writeInt( info->getMaximumPendingMessageLimit() ); + dataOut->writeBoolean( info->isDispatchAsync() ); + looseMarshalString( info->getSelector(), dataOut ); + looseMarshalString( info->getSubscriptionName(), dataOut ); + dataOut->writeBoolean( info->isNoLocal() ); + dataOut->writeBoolean( info->isExclusive() ); + dataOut->writeBoolean( info->isRetroactive() ); + dataOut->write( info->getPriority() ); + looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut ); + looseMarshalNestedObject( wireFormat, info->getAdditionalPredicate(), dataOut ); + dataOut->writeBoolean( info->isNetworkSubscription() ); + dataOut->writeBoolean( info->isOptimizedAcknowledge() ); + dataOut->writeBoolean( info->isNoRangeAcks() ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + Added: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.h?rev=685729&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.h (added) +++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/v3/ConsumerInfoMarshaller.h Wed Aug 13 16:42:56 2008 @@ -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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERINFOMARSHALLER_H_ +#define _ACTIVEMQ_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERINFOMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace connector{ +namespace openwire{ +namespace marshal{ +namespace v3{ + + /** + * Marshalling code for Open Wire Format for ConsumerInfoMarshaller + * + * 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 ConsumerInfoMarshaller : public BaseCommandMarshaller + { + public: + + ConsumerInfoMarshaller() {} + virtual ~ConsumerInfoMarshaller() {} + + /** + * 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_CONNECTOR_OPENWIRE_MARSAHAL_V3_CONSUMERINFOMARSHALLER_H_*/ +