summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/ProtocolFactory.h
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2008-04-22 21:13:20 +0000
committerAndrew Stitcher <astitcher@apache.org>2008-04-22 21:13:20 +0000
commit52ffbbfef04ee479a341ff640cb2df9c41897963 (patch)
treeb9cecb2bde45ad7b2c118d23e3d9c1f2c74560cf /cpp/src/qpid/sys/ProtocolFactory.h
parent63d88fa5ff3407f26590bdf6b5a956d3307f677e (diff)
downloadqpid-python-52ffbbfef04ee479a341ff640cb2df9c41897963.tar.gz
* Renamed the Acceptor class to be the ProtocolFactory class
which better approximates its current behaviour * Slightly refactored TCPIOPlugin to better approximate how it would look when we implement a proper AsynchConnector git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@650657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/ProtocolFactory.h')
-rw-r--r--cpp/src/qpid/sys/ProtocolFactory.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/cpp/src/qpid/sys/ProtocolFactory.h b/cpp/src/qpid/sys/ProtocolFactory.h
new file mode 100644
index 0000000000..5f80771e49
--- /dev/null
+++ b/cpp/src/qpid/sys/ProtocolFactory.h
@@ -0,0 +1,54 @@
+#ifndef _sys_ProtocolFactory_h
+#define _sys_ProtocolFactory_h
+
+/*
+ *
+ * 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 <stdint.h>
+#include "qpid/SharedObject.h"
+#include "ConnectionCodec.h"
+
+
+namespace qpid {
+namespace sys {
+
+class Poller;
+
+class ProtocolFactory : public qpid::SharedObject<ProtocolFactory>
+{
+ public:
+ virtual ~ProtocolFactory() = 0;
+ virtual uint16_t getPort() const = 0;
+ virtual std::string getHost() const = 0;
+ virtual void accept(boost::shared_ptr<Poller>, ConnectionCodec::Factory*) = 0;
+ virtual void connect(
+ boost::shared_ptr<Poller>,
+ const std::string& host, int16_t port,
+ ConnectionCodec::Factory* codec) = 0;
+};
+
+inline ProtocolFactory::~ProtocolFactory() {}
+
+}}
+
+
+
+#endif //!_sys_ProtocolFactory_h