From 52ffbbfef04ee479a341ff640cb2df9c41897963 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 22 Apr 2008 21:13:20 +0000 Subject: * 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 --- cpp/src/qpid/sys/ProtocolFactory.h | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 cpp/src/qpid/sys/ProtocolFactory.h (limited to 'cpp/src/qpid/sys/ProtocolFactory.h') 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 +#include "qpid/SharedObject.h" +#include "ConnectionCodec.h" + + +namespace qpid { +namespace sys { + +class Poller; + +class ProtocolFactory : public qpid::SharedObject +{ + public: + virtual ~ProtocolFactory() = 0; + virtual uint16_t getPort() const = 0; + virtual std::string getHost() const = 0; + virtual void accept(boost::shared_ptr, ConnectionCodec::Factory*) = 0; + virtual void connect( + boost::shared_ptr, + const std::string& host, int16_t port, + ConnectionCodec::Factory* codec) = 0; +}; + +inline ProtocolFactory::~ProtocolFactory() {} + +}} + + + +#endif //!_sys_ProtocolFactory_h -- cgit v1.2.1