Author: tabish
Date: Wed Jan 14 13:10:39 2009
New Revision: 734514
URL: http://svn.apache.org/viewvc?rev=734514&view=rev
Log:
Add A ConnectionMetaData interface to CMS
Added:
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
(with props)
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h
(with props)
Modified:
activemq/activemq-cpp/trunk/src/main/Makefile.am
activemq/activemq-cpp/trunk/src/main/cms/ConnectionMetaData.h
Modified: activemq/activemq-cpp/trunk/src/main/Makefile.am
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/Makefile.am?rev=734514&r1=734513&r2=734514&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/main/Makefile.am Wed Jan 14 13:10:39 2009
@@ -35,6 +35,7 @@
activemq/cmsutil/CmsTemplate.cpp \
activemq/core/ActiveMQConsumer.cpp \
activemq/core/ActiveMQConnection.cpp \
+ activemq/core/ActiveMQConnectionMetaData.cpp \
activemq/core/ActiveMQSession.cpp \
activemq/core/ActiveMQConstants.cpp \
activemq/core/ActiveMQTransaction.cpp \
@@ -156,6 +157,7 @@
activemq/core/ActiveMQMessage.h \
activemq/core/ActiveMQConnectionData.h \
activemq/core/ActiveMQConnection.h \
+ activemq/core/ActiveMQConnectionMetaData.h \
activemq/core/ActiveMQTransaction.h \
activemq/core/ActiveMQConnectionFactory.h \
activemq/core/ActiveMQConsumer.h \
Added:
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp?rev=734514&view=auto
==============================================================================
---
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
(added)
+++
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
Wed Jan 14 13:10:39 2009
@@ -0,0 +1,30 @@
+/*
+ * 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 "ActiveMQConnectionMetaData.h"
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::core;
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQConnectionMetaData::ActiveMQConnectionMetaData() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQConnectionMetaData::~ActiveMQConnectionMetaData() {
+}
Propchange:
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h?rev=734514&view=auto
==============================================================================
---
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h
(added)
+++
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h
Wed Jan 14 13:10:39 2009
@@ -0,0 +1,142 @@
+/*
+ * 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_CORE_ACTIVEMQCONNECTIONMETADATA_H_
+#define _ACTIVEMQ_CORE_ACTIVEMQCONNECTIONMETADATA_H_
+
+#include <activemq/util/Config.h>
+
+#include <cms/ConnectionMetaData.h>
+
+namespace activemq {
+namespace core {
+
+ /**
+ * This class houses all the various settings and information that is used
+ * by an instance of an ActiveMQConnection class.
+ */
+ class AMQCPP_API ActiveMQConnectionMetaData : public
cms::ConnectionMetaData {
+ private:
+
+ public:
+
+ ActiveMQConnectionMetaData();
+ virtual ~ActiveMQConnectionMetaData();
+
+ public: // cms::ConnectionMetaData
+
+ /**
+ * Gets the CMS API version.
+ *
+ * @return the CMS API Version in String form.
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual std::string getCMSVersion() const throw( cms::CMSException ) {
+ return "2.0";
+ }
+
+ /**
+ * Gets the CMS major version number.
+ *
+ * @returns the CMS API major version number
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual int getCMSMajorVersion() const throw( cms::CMSException ) {
+ return 2;
+ }
+
+ /**
+ * Gets the CMS minor version number.
+ *
+ * @returns the CMS API minor version number
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual int getCMSMinorVersion() const throw( cms::CMSException ) {
+ return 0;
+ }
+
+ /**
+ * Gets the CMS provider name.
+ *
+ * @returns the CMS provider name
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual std::string getCMSProviderName() const throw(
cms::CMSException ) {
+ return "ActiveMQ-CPP";
+ }
+
+ /**
+ * Gets the CMS provider version.
+ *
+ * @returns the CMS provider version
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual std::string getProviderVersion() const throw(
cms::CMSException ) {
+ return "3.0";
+ }
+
+ /**
+ * Gets the CMS provider major version number.
+ *
+ * @returns the CMS provider major version number
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual int getProviderMajorVersion() const throw( cms::CMSException )
{
+ return 3;
+ }
+
+ /**
+ * Gets the CMS provider minor version number.
+ *
+ * @returns the CMS provider minor version number
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual int getProviderMinorVersion() const throw( cms::CMSException )
{
+ return 0;
+ }
+
+ /**
+ * Gets an Vector of the CMSX property names.
+ *
+ * @returns an Vector of CMSX property names
+ *
+ * @throw CMSException
+ * If the CMS Provider fails to retrieve the metadata due to
some internal error.
+ */
+ virtual std::vector<std::string> getCMSXPropertyNames() const throw(
cms::CMSException ) {
+ return std::vector<std::string>();
+ }
+
+ };
+
+}}
+
+#endif /* _ACTIVEMQ_CORE_ACTIVEMQCONNECTIONMETADATA_H_ */
Propchange:
activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnectionMetaData.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: activemq/activemq-cpp/trunk/src/main/cms/ConnectionMetaData.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/cms/ConnectionMetaData.h?rev=734514&r1=734513&r2=734514&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/cms/ConnectionMetaData.h (original)
+++ activemq/activemq-cpp/trunk/src/main/cms/ConnectionMetaData.h Wed Jan 14
13:10:39 2009
@@ -49,7 +49,7 @@
* @throw CMSException
* If the CMS Provider fails to retrieve the metadata due to
some internal error.
*/
- virtual int getJMSMajorVersion() const throw( cms::CMSException ) = 0;
+ virtual int getCMSMajorVersion() const throw( cms::CMSException ) = 0;
/**
* Gets the CMS minor version number.