diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
commit | 47f800495093fd7679a315e2d730fea22f6135b7 (patch) | |
tree | a7b8d3488f3841367dd03d10cae293f36fd10481 /cpp/src/Ice/RouterInfo.h | |
parent | Fixed SystemException to no longer derive from LocalException (diff) | |
download | ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.bz2 ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.xz ice-47f800495093fd7679a315e2d730fea22f6135b7.zip |
- Added support for non-blocking AMI/batch requests, connection
creation.
- Added support for AMI oneway requests.
- Changed collocation optimization to not perform any DNS lookups.
Diffstat (limited to 'cpp/src/Ice/RouterInfo.h')
-rw-r--r-- | cpp/src/Ice/RouterInfo.h | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/cpp/src/Ice/RouterInfo.h b/cpp/src/Ice/RouterInfo.h index f7a6d9d773f..7a05dacddd2 100644 --- a/cpp/src/Ice/RouterInfo.h +++ b/cpp/src/Ice/RouterInfo.h @@ -16,6 +16,7 @@ #include <Ice/RouterF.h> #include <Ice/ProxyF.h> #include <Ice/EndpointIF.h> +#include <Ice/BuiltinSequences.h> #include <set> @@ -47,6 +48,24 @@ class RouterInfo : public IceUtil::Shared, public IceUtil::Mutex { public: + class GetClientEndpointsCallback : virtual public IceUtil::Shared + { + public: + + virtual void setEndpoints(const std::vector<EndpointIPtr>&) = 0; + virtual void setException(const Ice::LocalException&) = 0; + }; + typedef IceUtil::Handle<GetClientEndpointsCallback> GetClientEndpointsCallbackPtr; + + class AddProxyCallback : virtual public IceUtil::Shared + { + public: + + virtual void addedProxy() = 0; + virtual void setException(const Ice::LocalException&) = 0; + }; + typedef IceUtil::Handle<AddProxyCallback> AddProxyCallbackPtr; + RouterInfo(const Ice::RouterPrx&); void destroy(); @@ -56,19 +75,27 @@ public: bool operator<(const RouterInfo&) const; Ice::RouterPrx getRouter() const; - std::vector<IceInternal::EndpointIPtr> getClientEndpoints(); - std::vector<IceInternal::EndpointIPtr> getServerEndpoints(); + std::vector<EndpointIPtr> getClientEndpoints(); + void getClientEndpoints(const GetClientEndpointsCallbackPtr&); + std::vector<EndpointIPtr> getServerEndpoints(); void addProxy(const Ice::ObjectPrx&); + bool addProxy(const Ice::ObjectPrx&, const AddProxyCallbackPtr&); + void setAdapter(const Ice::ObjectAdapterPtr&); Ice::ObjectAdapterPtr getAdapter() const; private: + std::vector<EndpointIPtr> setClientEndpoints(const Ice::ObjectPrx&); + std::vector<EndpointIPtr> setServerEndpoints(const Ice::ObjectPrx&); + void addAndEvictProxies(const Ice::ObjectPrx&, const Ice::ObjectProxySeq&); + const Ice::RouterPrx _router; - std::vector<IceInternal::EndpointIPtr> _clientEndpoints; - std::vector<IceInternal::EndpointIPtr> _serverEndpoints; + std::vector<EndpointIPtr> _clientEndpoints; + std::vector<EndpointIPtr> _serverEndpoints; Ice::ObjectAdapterPtr _adapter; std::set<Ice::Identity> _identities; + std::multiset<Ice::Identity> _evictedIdentities; }; } |