// ********************************************************************** // // Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_ROUTER_INFO_H #define ICE_ROUTER_INFO_H #include #include #include #include #include #include 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&); RouterInfoPtr erase(const Ice::RouterPrx&); private: std::map _table; std::map::iterator _tableHint; }; class RouterInfo : public IceUtil::Shared, public IceUtil::Mutex { public: RouterInfo(const Ice::RouterPrx&); void destroy(); bool operator==(const RouterInfo&) const; bool operator!=(const RouterInfo&) const; bool operator<(const RouterInfo&) const; Ice::RouterPrx getRouter() const; 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() const; private: const Ice::RouterPrx _router; Ice::ObjectPrx _clientProxy; Ice::ObjectPrx _serverProxy; const RoutingTablePtr _routingTable; Ice::ObjectAdapterPtr _adapter; }; } #endif