activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r733487 [3/10] - /activemq/activemq-cpp/trunk/src/main/activemq/commands/
Date Sun, 11 Jan 2009 16:36:05 GMT
Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTempTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTempTopic.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTempTopic.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTempTopic.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,184 @@
+/*
+ * 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_COMMANDS_ACTIVEMQTEMPTOPIC_H_
+#define _ACTIVEMQ_COMMANDS_ACTIVEMQTEMPTOPIC_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/ActiveMQTempDestination.h>
+#include <cms/TemporaryTopic.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    class AMQCPP_API ActiveMQTempTopic : public ActiveMQTempDestination,
+                                         public cms::TemporaryTopic {
+    public:
+
+        const static unsigned char ID_ACTIVEMQTEMPTOPIC = 103;
+
+    public:
+
+        ActiveMQTempTopic();
+        ActiveMQTempTopic( const std::string& name );
+        virtual ~ActiveMQTempTopic();
+
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ActiveMQTempTopic* cloneDataStructure() const {
+            ActiveMQTempTopic* message = new ActiveMQTempTopic();
+            message->copyDataStructure( this );
+            return message;
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+            ActiveMQTempDestination::copyDataStructure( src );
+        }
+
+        /**
+         * Converts the Destination Name into a String
+         * @return string name
+         */
+        virtual std::string toString() const {
+            std::ostringstream stream;
+
+            stream << "Begin Class = ActiveMQTempTopic" << std::endl;
+            stream << ActiveMQTempDestination::toString();
+            stream << "End Class = ActiveMQTempTopic" << std::endl;
+
+            return stream.str();
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const {
+            return ActiveMQDestination::equals( value );
+        }
+
+        /**
+         * @returns the cms::Destination interface pointer that the
+         *          objects that derive from this class implement.
+         */
+        virtual const cms::Destination* getCMSDestination() const {
+            return this;
+        }
+
+    public:   // CMS Destination
+
+        /**
+         * Retrieve the Destination Type for this Destination
+         * @return The Destination Type
+         */
+        virtual cms::Destination::DestinationType getDestinationType() const {
+            return cms::Destination::TEMPORARY_TOPIC;
+        }
+
+        /**
+         * Converts the Destination to a String value representing the
+         * Provider specific name fot this destination, which is not
+         * necessarily equal to the User Supplied name of the Destination
+         * @return Provider specific Name
+         */
+        virtual std::string toProviderString() const {
+            return this->getPhysicalName();
+        }
+
+        /**
+         * Creates a new instance of this destination type that is a
+         * copy of this one, and returns it.
+         * @returns cloned copy of this object
+         */
+        virtual cms::Destination* clone() const {
+            return dynamic_cast<cms::Destination*>(
+                this->cloneDataStructure() );
+        }
+
+        /**
+         * Copies the contents of the given Destinastion object to this one.
+         * @param source The source Destination object.
+         */
+        virtual void copy( const cms::Destination& source ) {
+            this->copyDataStructure(
+                dynamic_cast<const DataStructure*>( &source ) );
+        }
+
+        /**
+         * Retrieve any properties that might be part of the destination
+         * that was specified.  This is a deviation from the JMS spec
+         * but necessary due to C++ restrictions.
+         * @return const reference to a properties object.
+         */
+        virtual const cms::CMSProperties& getCMSProperties() const {
+            return this->getOptions();
+        }
+
+    public:  // CMS Temporary Topic
+
+        /**
+         * Gets the name of this topic.
+         * @return The topic name.
+         */
+        virtual std::string getTopicName()
+            const throw( cms::CMSException ) {
+
+            try{
+                return this->getPhysicalName();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+        }
+
+        /**
+         * Destroy's the Temp Destination at the Broker
+         * @throws CMSException
+         */
+        virtual void destroy() throw ( cms::CMSException ) {
+            try{
+                close();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+        }
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQTEMPTOPIC_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTempTopic.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.cpp?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.cpp Sun Jan 11 08:36:02 2009
@@ -0,0 +1,81 @@
+/*
+ * 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 <activemq/commands/ActiveMQTextMessage.h>
+
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/DataOutputStream.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace decaf::lang;
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQTextMessage::ActiveMQTextMessage() :
+    ActiveMQMessageBase<cms::TextMessage>() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQTextMessage::~ActiveMQTextMessage() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ActiveMQTextMessage::getDataStructureType() const {
+    return ActiveMQTextMessage::ID_ACTIVEMQTEXTMESSAGE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string ActiveMQTextMessage::getText() const throw( cms::CMSException ) {
+
+    try{
+        if( getContent().size() <= 4 ) {
+            return "";
+        }
+
+        return std::string( (const char*)&getContent()[4], getContent().size()-4 );
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQTextMessage::setText( const char* msg ) throw( cms::CMSException ) {
+    try{
+        setText( std::string(msg) );
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQTextMessage::setText( const std::string& msg ) throw( cms::CMSException ) {
+    try{
+        std::vector<unsigned char>& content = getContent();
+        content.clear();
+        decaf::io::ByteArrayOutputStream bos( content );
+        decaf::io::DataOutputStream dos( &bos );
+
+        dos.writeInt( (int)msg.length() );
+        dos.write( (const unsigned char*)msg.c_str(), 0, msg.length() );
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
+}

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,130 @@
+/*
+ * 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_COMMANDS_ACTIVEMQTEXTMESSAGE_H_
+#define _ACTIVEMQ_COMMANDS_ACTIVEMQTEXTMESSAGE_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/ActiveMQMessageBase.h>
+#include <cms/TextMessage.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    class AMQCPP_API ActiveMQTextMessage :
+        public ActiveMQMessageBase<cms::TextMessage> {
+    public:
+
+        const static unsigned char ID_ACTIVEMQTEXTMESSAGE = 28;
+
+    public:
+
+        ActiveMQTextMessage();
+        virtual ~ActiveMQTextMessage();
+
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ActiveMQTextMessage* cloneDataStructure() const {
+            ActiveMQTextMessage* message = new ActiveMQTextMessage();
+            message->copyDataStructure( this );
+            return message;
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+            ActiveMQMessageBase<cms::TextMessage>::copyDataStructure( src );
+        }
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const {
+            std::ostringstream stream;
+
+            stream << "Begin Class = ActiveMQTextMessage" << std::endl;
+            stream << ActiveMQMessageBase<cms::TextMessage>::toString();
+            stream << "End Class = ActiveMQTextMessage" << std::endl;
+
+            return stream.str();
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const {
+            return ActiveMQMessageBase<cms::TextMessage>::equals( value );
+        }
+
+    public:   // CMS Message
+
+        /**
+         * Clone this message exactly, returns a new instance that the
+         * caller is required to delete.
+         * @return new copy of this message
+         */
+        virtual cms::TextMessage* clone(void) const {
+            return dynamic_cast<cms::TextMessage*>(
+                this->cloneDataStructure() );
+        }
+
+    public:   // cms::TextMessage
+
+        /**
+         * Gets the message character buffer.
+         * @return The message character buffer.
+         */
+        virtual std::string getText() const throw( cms::CMSException );
+
+        /**
+         * Sets the message contents, does not take ownership of the passed
+         * char*, but copies it instead.
+         * @param msg The message buffer.
+         */
+        virtual void setText( const char* msg ) throw( cms::CMSException );
+
+        /**
+         * Sets the message contents
+         * @param msg The message buffer.
+         */
+        virtual void setText( const std::string& msg ) throw( cms::CMSException );
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_ACTIVEMQTEXTMESSAGE_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTextMessage.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.cpp?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.cpp Sun Jan 11 08:36:02 2009
@@ -0,0 +1,39 @@
+/*
+ * 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 <activemq/commands/ActiveMQTopic.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::commands;
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQTopic::ActiveMQTopic() : ActiveMQDestination() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQTopic::ActiveMQTopic( const std::string& name ) :
+    ActiveMQDestination( name )
+{}
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQTopic::~ActiveMQTopic() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ActiveMQTopic::getDataStructureType() const {
+    return ActiveMQTopic::ID_ACTIVEMQTOPIC;
+}

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,174 @@
+/*
+ * 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_COMMANDS_ACTIVEMQTOPIC_H_
+#define _ACTIVEMQ_COMMANDS_ACTIVEMQTOPIC_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/ActiveMQDestination.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/Exception.h>
+#include <cms/Topic.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    class AMQCPP_API ActiveMQTopic : public ActiveMQDestination,
+                                     public cms::Topic {
+    public:
+
+        const static unsigned char ID_ACTIVEMQTOPIC = 101;
+
+    public:
+
+        ActiveMQTopic();
+        ActiveMQTopic( const std::string& name );
+        virtual ~ActiveMQTopic();
+
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ActiveMQTopic* cloneDataStructure() const {
+            ActiveMQTopic* message = new ActiveMQTopic();
+            message->copyDataStructure( this );
+            return message;
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+            ActiveMQDestination::copyDataStructure( src );
+        }
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const {
+            std::ostringstream stream;
+
+            stream << "Begin Class = ActiveMQTopic" << std::endl;
+            stream << ActiveMQDestination::toString();
+            stream << "End Class = ActiveMQTopic" << std::endl;
+
+            return stream.str();
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const {
+            return ActiveMQDestination::equals( value );
+        }
+
+        /**
+         * @returns the cms::Destination interface pointer that the
+         *          objects that derive from this class implement.
+         */
+        virtual const cms::Destination* getCMSDestination() const {
+            return this;
+        }
+
+    public:   // CMS Destination
+
+        /**
+         * Retrieve the Destination Type for this Destination
+         * @return The Destination Type
+         */
+        virtual cms::Destination::DestinationType getDestinationType() const {
+            return cms::Destination::TOPIC;
+        }
+
+        /**
+         * Converts the Destination to a String value representing the
+         * Provider specific name fot this destination, which is not
+         * necessarily equal to the User Supplied name of the Destination
+         * @return Provider specific Name
+         */
+        virtual std::string toProviderString(void) const {
+            return this->getPhysicalName();
+        }
+
+        /**
+         * Creates a new instance of this destination type that is a
+         * copy of this one, and returns it.
+         * @returns cloned copy of this object
+         */
+        virtual cms::Destination* clone() const {
+            return dynamic_cast<cms::Destination*>(
+                this->cloneDataStructure() );
+        }
+
+        /**
+         * Copies the contents of the given Destinastion object to this one.
+         * @param source The source Destination object.
+         */
+        virtual void copy( const cms::Destination& source ) {
+            this->copyDataStructure(
+                dynamic_cast<const DataStructure*>( &source ) );
+        }
+
+        /**
+         * Retrieve any properties that might be part of the destination
+         * that was specified.  This is a deviation from the JMS spec
+         * but necessary due to C++ restrictions.
+         * @return const reference to a properties object.
+         */
+        virtual const cms::CMSProperties& getCMSProperties() const {
+            return this->getOptions();
+        }
+
+    public:  // CMS Topic
+
+        /**
+         * Gets the name of this topic.
+         * @return The topic name.
+         */
+        virtual std::string getTopicName(void)
+            const throw( cms::CMSException ) {
+
+            try{
+                return this->getPhysicalName();
+            }
+            AMQ_CATCH_RETHROW( exceptions::ActiveMQException )
+            AMQ_CATCH_EXCEPTION_CONVERT( decaf::lang::Exception, exceptions::ActiveMQException )
+            AMQ_CATCHALL_THROW( exceptions::ActiveMQException )
+        }
+
+    };
+
+}}
+
+#endif /*#define _ACTIVEMQ_COMMANDS_ACTIVEMQTOPIC_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQTopic.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseCommand.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseCommand.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseCommand.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseCommand.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,132 @@
+/*
+ * 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_COMMANDS_BASECOMMAND_H_
+#define _ACTIVEMQ_COMMANDS_BASECOMMAND_H_
+
+#include <activemq/util/Config.h>
+#include <activemq/transport/Command.h>
+#include <activemq/transport/Response.h>
+#include <activemq/commands/BaseDataStructure.h>
+
+namespace activemq{
+namespace commands{
+
+    template< typename T >
+    class AMQCPP_API BaseCommand : public T,
+                                   public BaseDataStructure {
+    public:
+
+        BaseCommand() {
+            this->commandId = 0;
+            this->responseRequired = false;
+        }
+
+        virtual ~BaseCommand() {}
+
+        /**
+         * Sets the Command Id of this Message
+         * @param id Command Id
+         */
+        virtual void setCommandId( int id ) {
+            this->commandId = id;
+        }
+
+        /**
+         * Gets the Command Id of this Message
+         * @return Command Id
+         */
+        virtual int getCommandId() const {
+            return commandId;
+        }
+
+        /**
+         * Set if this Message requires a Response
+         * @param required true if response is required
+         */
+        virtual void setResponseRequired( const bool required ) {
+            this->responseRequired = required;
+        }
+
+        /**
+         * Is a Response required for this Command
+         * @return true if a response is required.
+         */
+        virtual bool isResponseRequired() const {
+            return responseRequired;
+        }
+
+        /**
+         * Returns a Cloned copy of this command, the caller is responsible
+         * for deallocating the returned object.
+         * @returns new copy of this command.
+         */
+        virtual transport::Command* cloneCommand() const {
+            return dynamic_cast<transport::Command*>( this->cloneDataStructure() );
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+
+            const BaseCommand<T>* command =
+                dynamic_cast< const BaseCommand<T>* >( src );
+
+            this->setResponseRequired( command->isResponseRequired() );
+            this->setCommandId( command->getCommandId() );
+        }
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const {
+            std::ostringstream stream;
+
+            stream << "Begin Class = BaseCommand" << std::endl;
+            stream << BaseDataStructure::toString();
+            stream << "  Response Required = " << responseRequired << std::endl;
+            stream << "  Command Id = " << commandId << std::endl;
+            stream << "End Class = BaseCommand" << std::endl;
+
+            return stream.str();
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const {
+            return BaseDataStructure::equals( value );
+        }
+
+    private:
+
+        bool responseRequired;
+        int commandId;
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_BASECOMMAND_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseCommand.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseDataStructure.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseDataStructure.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseDataStructure.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseDataStructure.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,126 @@
+/*
+ * 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_COMMANDS_BASEDATASTRUCTURE_H_
+#define _ACTIVEMQ_COMMANDS_BASEDATASTRUCTURE_H_
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/WireFormat.h>
+
+#include <string>
+#include <sstream>
+
+namespace activemq{
+namespace commands{
+
+    class AMQCPP_API BaseDataStructure : public DataStructure {
+    public:
+
+        virtual ~BaseDataStructure() {}
+
+        /**
+         * Determine if this object is aware of marshaling and should have
+         * its before and after marshaling methods called.  Defaults to false.
+         * @returns true if aware of marshaling
+         */
+        virtual bool isMarshalAware() const {
+            return false;
+        }
+
+        /**
+         * Perform any processing needed before an marshal
+         * @param wireformat - the OpenWireFormat object in use.
+         */
+        virtual void beforeMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )
+            throw ( decaf::io::IOException ) {}
+
+        /**
+         * Perform any processing needed after an unmarshal
+         * @param wireformat - the OpenWireFormat object in use.
+         */
+        virtual void afterMarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )
+            throw ( decaf::io::IOException ) {}
+
+        /**
+         * Perform any processing needed before an unmarshal
+         * @param wireformat - the OpenWireFormat object in use.
+         */
+        virtual void beforeUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )
+            throw ( decaf::io::IOException ) {}
+
+        /**
+         * Perform any processing needed after an unmarshal
+         * @param wireformat - the OpenWireFormat object in use.
+         */
+        virtual void afterUnmarshal( wireformat::WireFormat* wireFormat AMQCPP_UNUSED )
+            throw ( decaf::io::IOException ) {}
+
+        /**
+         * Called to set the data to this object that will contain the objects
+         * marshaled form.
+         * @param wireFormat - the wireformat object to control unmarshaling
+         * @param data - vector of object binary data
+         */
+        virtual void setMarshaledForm( wireformat::WireFormat* wireFormat AMQCPP_UNUSED,
+                                       const std::vector<char>& data AMQCPP_UNUSED ) {}
+
+        /**
+         * Called to get the data to this object that will contain the objects
+         * marshaled form.
+         * @param wireFormat - the wireformat object to control unmarshaling
+         * @return buffer that holds the objects data.
+         */
+        virtual std::vector<unsigned char> getMarshaledForm(
+            wireformat::WireFormat* wireFormat AMQCPP_UNUSED ) {
+
+            return std::vector<unsigned char>();
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src AMQCPP_UNUSED ) {
+            // Nothing to do here
+        }
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const {
+            return std::string( "No Data for Class BaseDataStructure\n" );
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value AMQCPP_UNUSED ) const {
+            return true;
+        }
+
+   };
+
+}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_BASEDATASTRUCTURE_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BaseDataStructure.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BooleanExpression.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BooleanExpression.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BooleanExpression.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BooleanExpression.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,76 @@
+/*
+ * 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_COMMANDS_BOOLEANEXPRESSION_H_
+#define _ACTIVEMQ_COMMANDS_BOOLEANEXPRESSION_H_
+
+#include <activemq/commands/BaseDataStructure.h>
+#include <activemq/util/Config.h>
+
+namespace activemq{
+namespace commands{
+
+    class AMQCPP_API BooleanExpression : public BaseDataStructure {
+    public:
+
+        BooleanExpression() {}
+        virtual ~BooleanExpression() {}
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual DataStructure* cloneDataStructure() const { return NULL; }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src AMQCPP_UNUSED) {}
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const {
+            std::ostringstream stream;
+
+            stream << "Begin Class = BooleanExpression" << std::endl;
+            stream << BaseDataStructure::toString();
+            stream << "Begin Class = BooleanExpression" << std::endl;
+
+            return stream.str();
+        }
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const {
+            return BaseDataStructure::equals( value );
+        }
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_BOOLEANEXPRESSION_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BooleanExpression.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerError.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerError.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerError.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerError.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,184 @@
+/*
+ * 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_COMMANDS_BROKERERROR_H_
+#define _ACTIVEMQ_COMMANDS_BROKERERROR_H_
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/BaseCommand.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+
+#include <string>
+#include <vector>
+
+namespace activemq{
+namespace commands{
+
+    /**
+     * This class represents an Exception sent from the Broker.  The Broker
+     * sends java Throwables, so we must mimic its structure here.
+     */
+    class AMQCPP_API BrokerError : public BaseCommand<transport::Command> {
+    public:
+
+        struct StackTraceElement
+        {
+            std::string ClassName;
+            std::string FileName;
+            std::string MethodName;
+            int LineNumber;
+        };
+
+    public:
+
+        BrokerError() {}
+        virtual ~BrokerError() {
+            for( unsigned int i = 0; i < stackTraceElements.size(); ++i ) {
+                delete stackTraceElements[i];
+            }
+        }
+
+        /**
+         * Get the DataStructure Type as defined in CommandTypes.h
+         * @return The type of the data structure
+         */
+        virtual unsigned char getDataStructureType() const {
+            return 0;
+        }
+
+        /**
+         * Clone this obbject and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual DataStructure* cloneDataStructure() const {
+
+            BrokerError* error = new BrokerError();
+            error->copyDataStructure( this );
+            return error;
+        }
+
+        /**
+         * Copy the contents of the passed object into this objects
+         * members, overwriting any existing data.
+         * @return src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src ) {
+
+            const BrokerError* srcErr = dynamic_cast<const BrokerError*>( src );
+
+            if( srcErr == NULL || src == NULL ) {
+                throw decaf::lang::exceptions::NullPointerException(
+                    __FILE__, __LINE__,
+                    "BrokerError::copyCommand - src is NULL or invalid" );
+            }
+
+            this->setMessage( srcErr->getMessage() );
+            this->setExceptionClass( srcErr->getExceptionClass() );
+
+            for( unsigned int i = 0; i < srcErr->getStackTraceElements().size(); ++i ) {
+                if( srcErr->getStackTraceElements()[i] != NULL ) {
+                    StackTraceElement* element = new StackTraceElement;
+                    *element = *( srcErr->getStackTraceElements()[i] );
+
+                    // store the copy
+                    this->stackTraceElements.push_back( element );
+                }
+            }
+
+            if( srcErr->getCause() ) {
+                this->cause = dynamic_cast<BrokerError*>(
+                    srcErr->getCause()->cloneDataStructure() );
+            }
+        }
+
+        /**
+         * Gets the string holding the error message
+         * @returns String Message
+         */
+        virtual const std::string& getMessage() const {
+            return message;
+        }
+
+        /**
+         * Sets the string that contains the error Message
+         * @param message - String Error Message
+         */
+        virtual void setMessage( const std::string& message ) {
+            this->message = message;
+        }
+
+        /**
+         * Gets the string holding the Exception Class name
+         * @returns Exception Class name
+         */
+        virtual const std::string& getExceptionClass() const {
+            return exceptionClass;
+        }
+
+        /**
+         * Sets the string that contains the Exception Class name
+         * @param exceptionClass - String Exception Class name
+         */
+        virtual void setExceptionClass( const std::string& exceptionClass ) {
+            this->exceptionClass = exceptionClass;
+        }
+
+        /**
+         * Gets the Broker Error that caused this exception
+         * @returns Broker Error Pointer
+         */
+        virtual BrokerError* getCause() const {
+            return cause;
+        }
+
+        /**
+         * Sets the Broker Error that caused this exception
+         * @param cause - Broker Error
+         */
+        virtual void setCause( BrokerError* cause ) {
+            this->cause = cause;
+        }
+
+        /**
+         * Gets the Stack Trace Elemtns for the Exception
+         * @returns Stack Trace Elements
+         */
+        virtual const std::vector<StackTraceElement*>& getStackTraceElements() const {
+            return stackTraceElements;
+        }
+
+        /**
+         * Sets the Stack Trace Elements for this Exception
+         * @param stackTraceElements - Stack Trace Elements
+         */
+        virtual void setStackTraceElements( const std::vector<StackTraceElement*>& stackTraceElements ) {
+            this->stackTraceElements = stackTraceElements;
+        }
+
+    private:
+
+        std::string message;
+        std::string exceptionClass;
+        std::vector<StackTraceElement*> stackTraceElements;
+        BrokerError* cause;
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_BROKERERROR_H_*/

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerError.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp Sun Jan 11 08:36:02 2009
@@ -0,0 +1,124 @@
+/*
+ * 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 <activemq/commands/BrokerId.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace decaf::lang::exceptions;
+
+/*
+ *
+ *  Command and marshaling code for OpenWire format for BrokerId
+ *
+ *
+ *  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
+ *
+ */
+////////////////////////////////////////////////////////////////////////////////
+BrokerId::BrokerId()
+{
+    this->value = "";
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerId::~BrokerId()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerId* BrokerId::cloneDataStructure() const {
+    BrokerId* brokerId = new BrokerId();
+
+    // Copy the data from the base class or classes
+    brokerId->copyDataStructure( this );
+
+    return brokerId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerId::copyDataStructure( const DataStructure* src ) {
+
+    // Copy the data of the base class or classes
+    BaseDataStructure::copyDataStructure( src );
+
+    const BrokerId* srcPtr = dynamic_cast<const BrokerId*>( src );
+
+    if( srcPtr == NULL || src == NULL ) {
+
+        throw decaf::lang::exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "BrokerId::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setValue( srcPtr->getValue() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char BrokerId::getDataStructureType() const {
+    return BrokerId::ID_BROKERID;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string BrokerId::toString() const {
+
+    ostringstream stream;
+
+    stream << "Begin Class = BrokerId" << std::endl;
+    stream << " Value of BrokerId::ID_BROKERID = 124" << std::endl;
+    stream << " Value of Value = " << this->getValue() << std::endl;
+    stream << BaseDataStructure::toString();
+    stream << "End Class = BrokerId" << std::endl;
+
+    return stream.str();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerId::equals( const DataStructure* value ) const {
+    const BrokerId* valuePtr = dynamic_cast<const BrokerId*>( value );
+
+    if( valuePtr == NULL || value == NULL ) {
+        return false;
+    }
+    if( this->getValue() != valuePtr->getValue() ) {
+        return false;
+    }
+    if( !BaseDataStructure::equals( value ) ) {
+        return false;
+    }
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::string& BrokerId::getValue() const {
+    return value;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string& BrokerId::getValue() {
+    return value;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerId::setValue(const std::string& value ) {
+    this->value = value;
+}
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,104 @@
+/*
+ * 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_COMMANDS_BROKERID_H_
+#define _ACTIVEMQ_COMMANDS_BROKERID_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/BaseDataStructure.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    /*
+     *
+     *  Command and marshaling code for OpenWire format for BrokerId
+     *
+     *
+     *  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 BrokerId : public BaseDataStructure
+    {
+    protected:
+
+        std::string value;
+
+    public:
+
+        const static unsigned char ID_BROKERID = 124;
+
+    public:
+
+        BrokerId();
+        virtual ~BrokerId();
+
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual BrokerId* cloneDataStructure() const;
+
+        /**
+         * Copy the contents of the passed object into this object's
+         * members, overwriting any existing data.
+         * @param src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src );
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const;
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const;
+
+        virtual const std::string& getValue() const;
+        virtual std::string& getValue();
+        virtual void setValue( const std::string& value );
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_BROKERID_H_*/
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerId.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp Sun Jan 11 08:36:02 2009
@@ -0,0 +1,362 @@
+/*
+ * 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 <activemq/commands/BrokerInfo.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace decaf::lang::exceptions;
+
+/*
+ *
+ *  Command and marshaling code for OpenWire format for BrokerInfo
+ *
+ *
+ *  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
+ *
+ */
+////////////////////////////////////////////////////////////////////////////////
+BrokerInfo::BrokerInfo()
+{
+    this->brokerId = NULL;
+    this->brokerURL = "";
+    this->brokerName = "";
+    this->slaveBroker = false;
+    this->masterBroker = false;
+    this->faultTolerantConfiguration = false;
+    this->duplexConnection = false;
+    this->networkConnection = false;
+    this->connectionId = 0;
+    this->brokerUploadUrl = "";
+    this->networkProperties = "";
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerInfo::~BrokerInfo()
+{
+    delete this->brokerId;
+    for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < peerBrokerInfos.size(); ++ipeerBrokerInfos ) {
+        delete peerBrokerInfos[ipeerBrokerInfos];
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerInfo* BrokerInfo::cloneDataStructure() const {
+    BrokerInfo* brokerInfo = new BrokerInfo();
+
+    // Copy the data from the base class or classes
+    brokerInfo->copyDataStructure( this );
+
+    return brokerInfo;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::copyDataStructure( const DataStructure* src ) {
+
+    // Copy the data of the base class or classes
+    BaseCommand<transport::Command>::copyDataStructure( src );
+
+    const BrokerInfo* srcPtr = dynamic_cast<const BrokerInfo*>( src );
+
+    if( srcPtr == NULL || src == NULL ) {
+
+        throw decaf::lang::exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "BrokerInfo::copyDataStructure - src is NULL or invalid" );
+    }
+    if( srcPtr->getBrokerId() != NULL ) {
+        this->setBrokerId(
+            dynamic_cast<BrokerId*>(
+                srcPtr->getBrokerId()->cloneDataStructure() ) );
+    }
+    this->setBrokerURL( srcPtr->getBrokerURL() );
+    for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < srcPtr->getPeerBrokerInfos().size(); ++ipeerBrokerInfos ) {
+        if( srcPtr->getPeerBrokerInfos()[ipeerBrokerInfos] != NULL ) {
+            this->getPeerBrokerInfos().push_back(
+                dynamic_cast<BrokerInfo*>(
+                    srcPtr->getPeerBrokerInfos()[ipeerBrokerInfos]->cloneDataStructure() ) );
+        } else {
+            this->getPeerBrokerInfos().push_back( NULL );
+        }
+    }
+    this->setBrokerName( srcPtr->getBrokerName() );
+    this->setSlaveBroker( srcPtr->isSlaveBroker() );
+    this->setMasterBroker( srcPtr->isMasterBroker() );
+    this->setFaultTolerantConfiguration( srcPtr->isFaultTolerantConfiguration() );
+    this->setDuplexConnection( srcPtr->isDuplexConnection() );
+    this->setNetworkConnection( srcPtr->isNetworkConnection() );
+    this->setConnectionId( srcPtr->getConnectionId() );
+    this->setBrokerUploadUrl( srcPtr->getBrokerUploadUrl() );
+    this->setNetworkProperties( srcPtr->getNetworkProperties() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char BrokerInfo::getDataStructureType() const {
+    return BrokerInfo::ID_BROKERINFO;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string BrokerInfo::toString() const {
+
+    ostringstream stream;
+
+    stream << "Begin Class = BrokerInfo" << std::endl;
+    stream << " Value of BrokerInfo::ID_BROKERINFO = 2" << std::endl;
+    stream << " Value of BrokerId is Below:" << std::endl;
+    if( this->getBrokerId() != NULL ) {
+        stream << this->getBrokerId()->toString() << std::endl;
+    } else {
+        stream << "   Object is NULL" << std::endl;
+    }
+    stream << " Value of BrokerURL = " << this->getBrokerURL() << std::endl;
+    for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < this->getPeerBrokerInfos().size(); ++ipeerBrokerInfos ) {
+        stream << " Value of PeerBrokerInfos[" << ipeerBrokerInfos << "] is Below:" << std::endl;
+        if( this->getPeerBrokerInfos()[ipeerBrokerInfos] != NULL ) {
+            stream << this->getPeerBrokerInfos()[ipeerBrokerInfos]->toString() << std::endl;
+        } else {
+            stream << "   Object is NULL" << std::endl;
+        }
+    }
+    stream << " Value of BrokerName = " << this->getBrokerName() << std::endl;
+    stream << " Value of SlaveBroker = " << this->isSlaveBroker() << std::endl;
+    stream << " Value of MasterBroker = " << this->isMasterBroker() << std::endl;
+    stream << " Value of FaultTolerantConfiguration = " << this->isFaultTolerantConfiguration() << std::endl;
+    stream << " Value of DuplexConnection = " << this->isDuplexConnection() << std::endl;
+    stream << " Value of NetworkConnection = " << this->isNetworkConnection() << std::endl;
+    stream << " Value of ConnectionId = " << this->getConnectionId() << std::endl;
+    stream << " Value of BrokerUploadUrl = " << this->getBrokerUploadUrl() << std::endl;
+    stream << " Value of NetworkProperties = " << this->getNetworkProperties() << std::endl;
+    stream << BaseCommand<transport::Command>::toString();
+    stream << "End Class = BrokerInfo" << std::endl;
+
+    return stream.str();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::equals( const DataStructure* value ) const {
+    const BrokerInfo* valuePtr = dynamic_cast<const BrokerInfo*>( value );
+
+    if( valuePtr == NULL || value == NULL ) {
+        return false;
+    }
+    if( this->getBrokerId() != NULL ) {
+        if( !this->getBrokerId()->equals( valuePtr->getBrokerId() ) ) {
+            return false;
+        }
+    } else if( valuePtr->getBrokerId() != NULL ) {
+        return false;
+    }
+    if( this->getBrokerURL() != valuePtr->getBrokerURL() ) {
+        return false;
+    }
+    for( size_t ipeerBrokerInfos = 0; ipeerBrokerInfos < this->getPeerBrokerInfos().size(); ++ipeerBrokerInfos ) {
+        if( this->getPeerBrokerInfos()[ipeerBrokerInfos] != NULL ) {
+            if( !this->getPeerBrokerInfos()[ipeerBrokerInfos]->equals( valuePtr->getPeerBrokerInfos()[ipeerBrokerInfos] ) ) {
+                return false;
+            }
+        } else if( valuePtr->getPeerBrokerInfos()[ipeerBrokerInfos] != NULL ) {
+            return false;
+        }
+    }
+    if( this->getBrokerName() != valuePtr->getBrokerName() ) {
+        return false;
+    }
+    if( this->isSlaveBroker() != valuePtr->isSlaveBroker() ) {
+        return false;
+    }
+    if( this->isMasterBroker() != valuePtr->isMasterBroker() ) {
+        return false;
+    }
+    if( this->isFaultTolerantConfiguration() != valuePtr->isFaultTolerantConfiguration() ) {
+        return false;
+    }
+    if( this->isDuplexConnection() != valuePtr->isDuplexConnection() ) {
+        return false;
+    }
+    if( this->isNetworkConnection() != valuePtr->isNetworkConnection() ) {
+        return false;
+    }
+    if( this->getConnectionId() != valuePtr->getConnectionId() ) {
+        return false;
+    }
+    if( this->getBrokerUploadUrl() != valuePtr->getBrokerUploadUrl() ) {
+        return false;
+    }
+    if( this->getNetworkProperties() != valuePtr->getNetworkProperties() ) {
+        return false;
+    }
+    if( !BaseCommand<transport::Command>::equals( value ) ) {
+        return false;
+    }
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const BrokerId* BrokerInfo::getBrokerId() const {
+    return brokerId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BrokerId* BrokerInfo::getBrokerId() {
+    return brokerId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setBrokerId(BrokerId* brokerId ) {
+    this->brokerId = brokerId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::string& BrokerInfo::getBrokerURL() const {
+    return brokerURL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string& BrokerInfo::getBrokerURL() {
+    return brokerURL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setBrokerURL(const std::string& brokerURL ) {
+    this->brokerURL = brokerURL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::vector<BrokerInfo*>& BrokerInfo::getPeerBrokerInfos() const {
+    return peerBrokerInfos;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::vector<BrokerInfo*>& BrokerInfo::getPeerBrokerInfos() {
+    return peerBrokerInfos;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setPeerBrokerInfos(const std::vector<BrokerInfo*>& peerBrokerInfos ) {
+    this->peerBrokerInfos = peerBrokerInfos;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::string& BrokerInfo::getBrokerName() const {
+    return brokerName;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string& BrokerInfo::getBrokerName() {
+    return brokerName;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setBrokerName(const std::string& brokerName ) {
+    this->brokerName = brokerName;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::isSlaveBroker() const {
+    return slaveBroker;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setSlaveBroker(bool slaveBroker ) {
+    this->slaveBroker = slaveBroker;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::isMasterBroker() const {
+    return masterBroker;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setMasterBroker(bool masterBroker ) {
+    this->masterBroker = masterBroker;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::isFaultTolerantConfiguration() const {
+    return faultTolerantConfiguration;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setFaultTolerantConfiguration(bool faultTolerantConfiguration ) {
+    this->faultTolerantConfiguration = faultTolerantConfiguration;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::isDuplexConnection() const {
+    return duplexConnection;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setDuplexConnection(bool duplexConnection ) {
+    this->duplexConnection = duplexConnection;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool BrokerInfo::isNetworkConnection() const {
+    return networkConnection;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setNetworkConnection(bool networkConnection ) {
+    this->networkConnection = networkConnection;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+long long BrokerInfo::getConnectionId() const {
+    return connectionId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setConnectionId(long long connectionId ) {
+    this->connectionId = connectionId;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::string& BrokerInfo::getBrokerUploadUrl() const {
+    return brokerUploadUrl;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string& BrokerInfo::getBrokerUploadUrl() {
+    return brokerUploadUrl;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setBrokerUploadUrl(const std::string& brokerUploadUrl ) {
+    this->brokerUploadUrl = brokerUploadUrl;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const std::string& BrokerInfo::getNetworkProperties() const {
+    return networkProperties;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string& BrokerInfo::getNetworkProperties() {
+    return networkProperties;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void BrokerInfo::setNetworkProperties(const std::string& networkProperties ) {
+    this->networkProperties = networkProperties;
+}
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,155 @@
+/*
+ * 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_COMMANDS_BROKERINFO_H_
+#define _ACTIVEMQ_COMMANDS_BROKERINFO_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/BaseCommand.h>
+#include <activemq/commands/BrokerId.h>
+#include <activemq/commands/BrokerInfo.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    /*
+     *
+     *  Command and marshaling code for OpenWire format for BrokerInfo
+     *
+     *
+     *  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 BrokerInfo : public BaseCommand<transport::Command>
+    {
+    protected:
+
+        BrokerId* brokerId;
+        std::string brokerURL;
+        std::vector<BrokerInfo*> peerBrokerInfos;
+        std::string brokerName;
+        bool slaveBroker;
+        bool masterBroker;
+        bool faultTolerantConfiguration;
+        bool duplexConnection;
+        bool networkConnection;
+        long long connectionId;
+        std::string brokerUploadUrl;
+        std::string networkProperties;
+
+    public:
+
+        const static unsigned char ID_BROKERINFO = 2;
+
+    public:
+
+        BrokerInfo();
+        virtual ~BrokerInfo();
+
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual BrokerInfo* cloneDataStructure() const;
+
+        /**
+         * Copy the contents of the passed object into this object's
+         * members, overwriting any existing data.
+         * @param src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src );
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const;
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const;
+
+        virtual const BrokerId* getBrokerId() const;
+        virtual BrokerId* getBrokerId();
+        virtual void setBrokerId( BrokerId* brokerId );
+
+        virtual const std::string& getBrokerURL() const;
+        virtual std::string& getBrokerURL();
+        virtual void setBrokerURL( const std::string& brokerURL );
+
+        virtual const std::vector<BrokerInfo*>& getPeerBrokerInfos() const;
+        virtual std::vector<BrokerInfo*>& getPeerBrokerInfos();
+        virtual void setPeerBrokerInfos( const std::vector<BrokerInfo*>& peerBrokerInfos );
+
+        virtual const std::string& getBrokerName() const;
+        virtual std::string& getBrokerName();
+        virtual void setBrokerName( const std::string& brokerName );
+
+        virtual bool isSlaveBroker() const;
+        virtual void setSlaveBroker( bool slaveBroker );
+
+        virtual bool isMasterBroker() const;
+        virtual void setMasterBroker( bool masterBroker );
+
+        virtual bool isFaultTolerantConfiguration() const;
+        virtual void setFaultTolerantConfiguration( bool faultTolerantConfiguration );
+
+        virtual bool isDuplexConnection() const;
+        virtual void setDuplexConnection( bool duplexConnection );
+
+        virtual bool isNetworkConnection() const;
+        virtual void setNetworkConnection( bool networkConnection );
+
+        virtual long long getConnectionId() const;
+        virtual void setConnectionId( long long connectionId );
+
+        virtual const std::string& getBrokerUploadUrl() const;
+        virtual std::string& getBrokerUploadUrl();
+        virtual void setBrokerUploadUrl( const std::string& brokerUploadUrl );
+
+        virtual const std::string& getNetworkProperties() const;
+        virtual std::string& getNetworkProperties();
+        virtual void setNetworkProperties( const std::string& networkProperties );
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_BROKERINFO_H_*/
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/BrokerInfo.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp Sun Jan 11 08:36:02 2009
@@ -0,0 +1,183 @@
+/*
+ * 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 <activemq/commands/ConnectionControl.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace decaf::lang::exceptions;
+
+/*
+ *
+ *  Command and marshaling code for OpenWire format for ConnectionControl
+ *
+ *
+ *  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
+ *
+ */
+////////////////////////////////////////////////////////////////////////////////
+ConnectionControl::ConnectionControl()
+{
+    this->close = false;
+    this->exit = false;
+    this->faultTolerant = false;
+    this->resume = false;
+    this->suspend = false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectionControl::~ConnectionControl()
+{
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectionControl* ConnectionControl::cloneDataStructure() const {
+    ConnectionControl* connectionControl = new ConnectionControl();
+
+    // Copy the data from the base class or classes
+    connectionControl->copyDataStructure( this );
+
+    return connectionControl;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::copyDataStructure( const DataStructure* src ) {
+
+    // Copy the data of the base class or classes
+    BaseCommand<transport::Command>::copyDataStructure( src );
+
+    const ConnectionControl* srcPtr = dynamic_cast<const ConnectionControl*>( src );
+
+    if( srcPtr == NULL || src == NULL ) {
+
+        throw decaf::lang::exceptions::NullPointerException(
+            __FILE__, __LINE__,
+            "ConnectionControl::copyDataStructure - src is NULL or invalid" );
+    }
+    this->setClose( srcPtr->isClose() );
+    this->setExit( srcPtr->isExit() );
+    this->setFaultTolerant( srcPtr->isFaultTolerant() );
+    this->setResume( srcPtr->isResume() );
+    this->setSuspend( srcPtr->isSuspend() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+unsigned char ConnectionControl::getDataStructureType() const {
+    return ConnectionControl::ID_CONNECTIONCONTROL;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::string ConnectionControl::toString() const {
+
+    ostringstream stream;
+
+    stream << "Begin Class = ConnectionControl" << std::endl;
+    stream << " Value of ConnectionControl::ID_CONNECTIONCONTROL = 18" << std::endl;
+    stream << " Value of Close = " << this->isClose() << std::endl;
+    stream << " Value of Exit = " << this->isExit() << std::endl;
+    stream << " Value of FaultTolerant = " << this->isFaultTolerant() << std::endl;
+    stream << " Value of Resume = " << this->isResume() << std::endl;
+    stream << " Value of Suspend = " << this->isSuspend() << std::endl;
+    stream << BaseCommand<transport::Command>::toString();
+    stream << "End Class = ConnectionControl" << std::endl;
+
+    return stream.str();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::equals( const DataStructure* value ) const {
+    const ConnectionControl* valuePtr = dynamic_cast<const ConnectionControl*>( value );
+
+    if( valuePtr == NULL || value == NULL ) {
+        return false;
+    }
+    if( this->isClose() != valuePtr->isClose() ) {
+        return false;
+    }
+    if( this->isExit() != valuePtr->isExit() ) {
+        return false;
+    }
+    if( this->isFaultTolerant() != valuePtr->isFaultTolerant() ) {
+        return false;
+    }
+    if( this->isResume() != valuePtr->isResume() ) {
+        return false;
+    }
+    if( this->isSuspend() != valuePtr->isSuspend() ) {
+        return false;
+    }
+    if( !BaseCommand<transport::Command>::equals( value ) ) {
+        return false;
+    }
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::isClose() const {
+    return close;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::setClose(bool close ) {
+    this->close = close;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::isExit() const {
+    return exit;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::setExit(bool exit ) {
+    this->exit = exit;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::isFaultTolerant() const {
+    return faultTolerant;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::setFaultTolerant(bool faultTolerant ) {
+    this->faultTolerant = faultTolerant;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::isResume() const {
+    return resume;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::setResume(bool resume ) {
+    this->resume = resume;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ConnectionControl::isSuspend() const {
+    return suspend;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ConnectionControl::setSuspend(bool suspend ) {
+    this->suspend = suspend;
+}
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h?rev=733487&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h Sun Jan 11 08:36:02 2009
@@ -0,0 +1,119 @@
+/*
+ * 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_COMMANDS_CONNECTIONCONTROL_H_
+#define _ACTIVEMQ_COMMANDS_CONNECTIONCONTROL_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/util/Config.h>
+#include <activemq/commands/BaseCommand.h>
+#include <vector>
+#include <string>
+
+namespace activemq{
+namespace commands{
+
+    /*
+     *
+     *  Command and marshaling code for OpenWire format for ConnectionControl
+     *
+     *
+     *  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 ConnectionControl : public BaseCommand<transport::Command>
+    {
+    protected:
+
+        bool close;
+        bool exit;
+        bool faultTolerant;
+        bool resume;
+        bool suspend;
+
+    public:
+
+        const static unsigned char ID_CONNECTIONCONTROL = 18;
+
+    public:
+
+        ConnectionControl();
+        virtual ~ConnectionControl();
+
+        /**
+         * Get the unique identifier that this object and its own
+         * Marshaller share.
+         * @returns new DataStructure type copy.
+         */
+        virtual unsigned char getDataStructureType() const;
+
+        /**
+         * Clone this object and return a new instance that the
+         * caller now owns, this will be an exact copy of this one
+         * @returns new copy of this object.
+         */
+        virtual ConnectionControl* cloneDataStructure() const;
+
+        /**
+         * Copy the contents of the passed object into this object's
+         * members, overwriting any existing data.
+         * @param src - Source Object
+         */
+        virtual void copyDataStructure( const DataStructure* src );
+
+        /**
+         * Returns a string containing the information for this DataStructure
+         * such as its type and value of its elements.
+         * @return formatted string useful for debugging.
+         */
+        virtual std::string toString() const;
+
+        /**
+         * Compares the DataStructure passed in to this one, and returns if
+         * they are equivalent.  Equivalent here means that they are of the
+         * same type, and that each element of the objects are the same.
+         * @returns true if DataStructure's are Equal.
+         */
+        virtual bool equals( const DataStructure* value ) const;
+
+        virtual bool isClose() const;
+        virtual void setClose( bool close );
+
+        virtual bool isExit() const;
+        virtual void setExit( bool exit );
+
+        virtual bool isFaultTolerant() const;
+        virtual void setFaultTolerant( bool faultTolerant );
+
+        virtual bool isResume() const;
+        virtual void setResume( bool resume );
+
+        virtual bool isSuspend() const;
+        virtual void setSuspend( bool suspend );
+
+    };
+
+}}
+
+#endif /*_ACTIVEMQ_COMMANDS_CONNECTIONCONTROL_H_*/
+

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/commands/ConnectionControl.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message