ICE 3.4.2
[php5-ice-freebsdport.git] / cpp / src / IceGrid / AdminCallbackRouter.h
blob6a11d30b98ced512e3adc1c71211382369cdf807
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 #ifndef ICE_GRID_ADMIN_CALLBACK_ROUTER_H
11 #define ICE_GRID_ADMIN_CALLBACK_ROUTER_H
13 #include <Ice/Ice.h>
14 #include <IceUtil/IceUtil.h>
15 #include <map>
17 namespace IceGrid
21 // The AdminCallbackRouter routes callbacks from the servers, nodes etc. to the
22 // admin clients using the admin-client => registry connection.
25 class AdminCallbackRouter : public Ice::BlobjectArrayAsync
27 public:
29 void addMapping(const std::string&, const Ice::ConnectionPtr&);
30 void removeMapping(const std::string&);
33 virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&,
34 const std::pair<const Ice::Byte*, const Ice::Byte*>&,
35 const Ice::Current&);
37 private:
39 IceUtil::Mutex _mutex;
40 std::map<std::string, Ice::ConnectionPtr> _categoryToConnection;
43 typedef IceUtil::Handle<AdminCallbackRouter> AdminCallbackRouterPtr;
45 #endif