activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r505051 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire: OpenWireConnectorFactory.cpp OpenWireConnectorFactory.h
Date Thu, 08 Feb 2007 22:01:47 GMT
Author: tabish
Date: Thu Feb  8 14:01:46 2007
New Revision: 505051

URL: http://svn.apache.org/viewvc?view=rev&rev=505051
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp?view=auto&rev=505051
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.cpp
Thu Feb  8 14:01:46 2007
@@ -0,0 +1,47 @@
+/*
+ * 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/connector/stomp/OpenWireConnectorFactory.h>
+#include <activemq/connector/stomp/OpenWireConnector.h>
+#include <activemq/connector/Connector.h>
+#include <activemq/transport/Transport.h>
+
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::transport;
+using namespace activemq::connector;
+using namespace activemq::connector::openwire;
+
+////////////////////////////////////////////////////////////////////////////////
+Connector* OpenWireConnectorFactory::createConnector(
+    const activemq::util::Properties& properties,
+    activemq::transport::Transport* transport )
+{
+    return dynamic_cast<Connector*>(
+        new OpenWireConnector( transport, properties ) );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ConnectorFactory& OpenWireConnectorFactory::getInstance()
+{
+    // Create a static instance of the registrar and return a reference to
+    // its internal instance of this class.
+    static ConnectorFactoryMapRegistrar registrar(
+        "openwire", new OpenWireConnectorFactory() );
+
+    return registrar.getFactory();
+}

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h?view=auto&rev=505051
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnectorFactory.h
Thu Feb  8 14:01:46 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONNECTORFACTORY_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONNECTORFACTORY_H_
+
+#include <activemq/connector/ConnectorFactory.h>
+#include <activemq/connector/ConnectorFactoryMapRegistrar.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+
+    class OpenWireConnectorFactory : public connector::ConnectorFactory
+    {
+    public:
+
+        virtual ~OpenWireConnectorFactory();
+
+        /**
+         * Creates a StompConnector
+         * @param properties The Properties that the new connector is
+         * configured with
+         * @param transport the Transport instance this connector uses.
+         */
+        virtual Connector* createConnector(
+            const activemq::util::Properties& properties,
+            activemq::transport::Transport* transport );
+
+        /**
+         * Returns an instance of this Factory by reference
+         * @return StompConnectorFactory reference
+         */
+        static ConnectorFactory& getInstance();
+
+    };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONNECTORFACTORY_H_*/



Mime
View raw message