diff options
author | Marc Laukien <marc@zeroc.com> | 2002-01-14 18:43:01 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-01-14 18:43:01 +0000 |
commit | f453785066eff4e8d9f5c7fd63bd01b4260020ed (patch) | |
tree | 1410e9fc19a52042879f9f06fe9e6c1ecb443e2a /cpp/src/Ice/RouterInfo.h | |
parent | file ServerBlobject.cpp was initially added on branch glacier. (diff) | |
download | ice-f453785066eff4e8d9f5c7fd63bd01b4260020ed.tar.bz2 ice-f453785066eff4e8d9f5c7fd63bd01b4260020ed.tar.xz ice-f453785066eff4e8d9f5c7fd63bd01b4260020ed.zip |
glacier intergration
Diffstat (limited to 'cpp/src/Ice/RouterInfo.h')
-rw-r--r-- | cpp/src/Ice/RouterInfo.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/cpp/src/Ice/RouterInfo.h b/cpp/src/Ice/RouterInfo.h new file mode 100644 index 00000000000..15fa489175e --- /dev/null +++ b/cpp/src/Ice/RouterInfo.h @@ -0,0 +1,74 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef ICE_ROUTER_INFO_H +#define ICE_ROUTER_INFO_H + +#include <IceUtil/Shared.h> +#include <IceUtil/Mutex.h> +#include <Ice/RouterInfoF.h> +#include <Ice/RouterF.h> +#include <Ice/ProxyF.h> +#include <Ice/RoutingTableF.h> + +namespace IceInternal +{ + +class RouterManager : public ::IceUtil::Shared, public ::IceUtil::Mutex +{ +public: + + RouterManager(); + + void destroy(); + + // + // Returns router info for a given router. Automatically creates + // the router info if it doesn't exist yet. + // + RouterInfoPtr get(const ::Ice::RouterPrx&); + +private: + + std::map< ::Ice::RouterPrx, RouterInfoPtr> _table; + std::map< ::Ice::RouterPrx, RouterInfoPtr>::iterator _tableHint; +}; + +class RouterInfo : public ::IceUtil::Shared, public ::IceUtil::Mutex +{ +public: + + RouterInfo(const ::Ice::RouterPrx&); + + bool operator==(const RouterInfo&) const; + bool operator!=(const RouterInfo&) const; + bool operator<(const RouterInfo&) const; + + ::Ice::RouterPrx getRouter(); + ::Ice::ObjectPrx getClientProxy(); + void setClientProxy(const ::Ice::ObjectPrx&); + ::Ice::ObjectPrx getServerProxy(); + void setServerProxy(const ::Ice::ObjectPrx&); + void addProxy(const ::Ice::ObjectPrx&); + void setAdapter(const ::Ice::ObjectAdapterPtr&); + ::Ice::ObjectAdapterPtr getAdapter(); + +private: + + ::Ice::RouterPrx _router; + ::Ice::ObjectPrx _clientProxy; + ::Ice::ObjectPrx _serverProxy; + RoutingTablePtr _routingTable; + ::Ice::ObjectAdapterPtr _adapter; +}; + +} + +#endif |