diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-04-24 21:13:00 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-04-24 21:13:00 +0000 |
commit | 5409c1ecef0f226dedc77721c0d2fc8dfe9e85de (patch) | |
tree | 97ba75bc47a143726d6d8382be3a462e51716700 /cpp/src/Ice/EndpointFactory.h | |
parent | cleaning up sample impls (diff) | |
download | ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.tar.bz2 ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.tar.xz ice-5409c1ecef0f226dedc77721c0d2fc8dfe9e85de.zip |
merging from plugins branch
Diffstat (limited to 'cpp/src/Ice/EndpointFactory.h')
-rw-r--r-- | cpp/src/Ice/EndpointFactory.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/cpp/src/Ice/EndpointFactory.h b/cpp/src/Ice/EndpointFactory.h new file mode 100644 index 00000000000..90c1c2cf2e1 --- /dev/null +++ b/cpp/src/Ice/EndpointFactory.h @@ -0,0 +1,63 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef ICE_ENDPOINT_FACTORY_H +#define ICE_ENDPOINT_FACTORY_H + +#include <IceUtil/Shared.h> +#include <IceUtil/Mutex.h> +#include <Ice/InstanceF.h> +#include <Ice/EndpointF.h> +#include <Ice/EndpointFactoryF.h> + +namespace IceInternal +{ + +class BasicStream; + +class EndpointFactory : public ::IceUtil::Shared +{ +public: + + virtual ~EndpointFactory(); + + virtual ::Ice::Short type() const = 0; + virtual const ::std::string& protocol() const = 0; + virtual EndpointPtr create(const std::string&) const = 0; + virtual EndpointPtr read(BasicStream*) const = 0; + virtual void destroy() = 0; + +protected: + + EndpointFactory(); +}; + +class EndpointFactoryManager : public ::IceUtil::Shared, public ::IceUtil::Mutex +{ +public: + + void add(const EndpointFactoryPtr&); + EndpointFactoryPtr get(::Ice::Short) const; + EndpointPtr create(const std::string&) const; + EndpointPtr read(BasicStream*) const; + +private: + + EndpointFactoryManager(const InstancePtr&); + void destroy(); + friend class Instance; + + InstancePtr _instance; + std::vector<EndpointFactoryPtr> _factories; +}; + +} + +#endif |