activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r736889 - in /activemq/activemq-cpp/trunk/src/main/activemq/transport/failover: ./ BackupTransport.cpp BackupTransport.h FailoverTransport.cpp FailoverTransport.h FailoverTransportFactory.cpp FailoverTransportFactory.h
Date Fri, 23 Jan 2009 02:01:43 GMT
Author: tabish
Date: Thu Jan 22 18:01:42 2009
New Revision: 736889

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

The initial skeleton classes for the Failover Transport.

Added:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp 
 (with props)
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h   (with
props)
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp
  (with props)
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h 
 (with props)
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
  (with props)
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h
  (with props)

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp Thu
Jan 22 18:01:42 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 "BackupTransport.h"
+
+using namespace activemq;
+using namespace activemq::transport;
+using namespace activemq::transport::failover;
+
+////////////////////////////////////////////////////////////////////////////////
+BackupTransport::BackupTransport() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+BackupTransport::~BackupTransport() {
+}

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h Thu
Jan 22 18:01:42 2009
@@ -0,0 +1,49 @@
+/*
+ * 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 _ACTIVE_TRANSPORT_FAILOVER_BACKUPTRANSPORT_H_
+#define _ACTIVE_TRANSPORT_FAILOVER_BACKUPTRANSPORT_H_
+
+#include <activemq/util/Config.h>
+
+#include <activemq/transport/Transport.h>
+
+namespace activemq {
+namespace transport {
+namespace failover {
+
+    class FailoverTransport;
+
+    class AMQCPP_API BackupTransport {
+    private:
+
+        // The parent Failover Transport
+        FailoverTransport* failover;
+
+        // The Transport this one is managing.
+        Transport* transport;
+
+    public:
+
+        BackupTransport();
+        virtual ~BackupTransport();
+
+    };
+
+}}}
+
+#endif /* _ACTIVE_TRANSPORT_FAILOVER_BACKUPTRANSPORT_H_ */

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/BackupTransport.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp
Thu Jan 22 18:01:42 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 "FailoverTransport.h"
+
+using namespace activemq;
+using namespace activemq::transport;
+using namespace activemq::transport::failover;
+
+////////////////////////////////////////////////////////////////////////////////
+FailoverTransport::FailoverTransport() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+FailoverTransport::~FailoverTransport() {
+}

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h Thu
Jan 22 18:01:42 2009
@@ -0,0 +1,41 @@
+/*
+ * 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 _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORT_H_
+#define _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORT_H_
+
+#include <activemq/util/Config.h>
+
+#include <activemq/transport/TransportFilter.h>
+
+namespace activemq {
+namespace transport {
+namespace failover {
+
+    class BackupTransport;
+
+    class AMQCPP_API FailoverTransport : public TransportFilter {
+    public:
+
+        FailoverTransport();
+        virtual ~FailoverTransport();
+
+    };
+
+}}}
+
+#endif /* _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORT_H_ */

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransport.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
Thu Jan 22 18:01:42 2009
@@ -0,0 +1,43 @@
+/*
+ * 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 "FailoverTransportFactory.h"
+
+#include <activemq/transport/failover/FailoverTransport.h>
+
+using namespace activemq;
+using namespace activemq::transport;
+using namespace activemq::transport::failover;
+using namespace activemq::exceptions;
+using namespace decaf;
+using namespace decaf::util;
+using namespace decaf::lang;
+
+////////////////////////////////////////////////////////////////////////////////
+Transport* FailoverTransportFactory::doCreateComposite( const decaf::net::URI& location,
+                                                        wireformat::WireFormat* wireFormat,
+                                                        const decaf::util::Properties&
properties )
+    throw ( exceptions::ActiveMQException ) {
+
+    try {
+
+        return new FailoverTransport( location, wireFormat, properties );
+    }
+    AMQ_CATCH_RETHROW( ActiveMQException )
+    AMQ_CATCH_EXCEPTION_CONVERT( Exception, ActiveMQException )
+    AMQ_CATCHALL_THROW( ActiveMQException )
+}

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h?rev=736889&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h
(added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h
Thu Jan 22 18:01:42 2009
@@ -0,0 +1,62 @@
+/*
+ * 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 _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORTFACTORY_H_
+#define _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORTFACTORY_H_
+
+#include <activemq/util/Config.h>
+
+#include <activemq/transport/AbstractTransportFactory.h>
+#include <activemq/transport/Transport.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <activemq/wireformat/WireFormat.h>
+#include <decaf/net/URI.h>
+#include <decaf/util/Properties.h>
+
+namespace activemq {
+namespace transport {
+namespace failover {
+
+    /**
+     * Creates an instance of a FailoverTransport.
+     *
+     * @since 3.0
+     */
+    class AMQCPP_API FailoverTransportFactory : public AbstractTransportFactory {
+    public:
+
+        FailoverTransportFactory();
+        virtual ~FailoverTransportFactory();
+
+        /**
+         * Creates a slimed down Transport instance which can be used in composite
+         * transport instances.
+         * @param location - URI location to connect to.
+         * @param wireformat - the assigned WireFormat for the new Transport.
+         * @param properties - Properties to apply to the transport.
+         * @throws ActiveMQexception if an error occurs
+         */
+        virtual Transport* doCreateComposite( const decaf::net::URI& location,
+                                              wireformat::WireFormat* wireFormat,
+                                              const decaf::util::Properties& properties
)
+            throw ( exceptions::ActiveMQException );
+
+    };
+
+}}}
+
+#endif /* _ACTIVE_TRANSPORT_FAILOVER_FAILOVERTRANSPORTFACTORY_H_ */

Propchange: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/FailoverTransportFactory.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message