activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r730465 - /activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h
Date Wed, 31 Dec 2008 20:23:50 GMT
Author: tabish
Date: Wed Dec 31 12:23:50 2008
New Revision: 730465

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

Add a composite Transport interface, the Failover Transport will use this.

Added:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h   (with props)

Added: activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h?rev=730465&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h (added)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/CompositeTransport.h Wed Dec 31
12:23:50 2008
@@ -0,0 +1,64 @@
+/*
+ * 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_TRANSPORT_COMPOSITETRANSPORT_H_
+#define _ACTIVEMQ_TRANSPORT_COMPOSITETRANSPORT_H_
+
+#include <activemq/transport/Transport.h>
+#include <decaf/net/URI.h>
+
+namespace activemq {
+namespace transport {
+
+    /**
+     * A Composite Transport is a Transport implementation that is composed of several
+     * Transports.  The composition could be such that only one Transport exists for
+     * each URI that is composed or there could be many active Transports working at
+     * once.
+     *
+     * @since 3.0
+     */
+    class CompositeTransport: public activemq::transport::Transport {
+    public:
+
+        virtual ~CompositeTransport() {}
+
+        /**
+         * Add a URI to the list of URI's that will represent the set of Transports
+         * that this Transport is a composite of.
+         *
+         * @param uri
+         *        The new URI to add to the set this composite maintains.
+         */
+        virtual void addURI( const URI& uri ) = 0;
+
+        /**
+         * Remove a URI from the set of URI's that represents the set of Transports
+         * that this Transport is composed of, removing a URI for which the composite
+         * has created a connected Transport should result in that Transport being
+         * disposed of.
+         *
+         * @param uri
+         *        The new URI to remove to the set this composite maintains.
+         */
+        virtual void removeURI( const URI& uri ) = 0;
+
+    };
+
+}}
+
+#endif /* _ACTIVEMQ_TRANSPORT_COMPOSITETRANSPORT_H_ */

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



Mime
View raw message