23 #ifndef RPCSERVER_AGGREGATOR_H
24 #define RPCSERVER_AGGREGATOR_H
46 void registerServer(rpcmanager_base::rpcserver_booter_base_sptr server);
48 const std::string&
type();
53 template<
class T,
typename Tcallback>
54 struct registerConfigureCallback_f:
public std::unary_function<T,void>
56 registerConfigureCallback_f(
const std::string &_id,
const Tcallback _callback)
57 : id(_id), callback(_callback)
60 void operator()(T& x) { x->i()->registerConfigureCallback(
id, callback); }
61 const std::string& id;
const Tcallback& callback;
64 template<
class T,
typename Tcallback>
65 struct unregisterConfigureCallback_f:
public std::unary_function<T,void>
67 unregisterConfigureCallback_f(
const std::string &_id)
71 void operator()(T& x) { x->i()->unregisterConfigureCallback(
id); }
72 const std::string& id;
75 template<
class T,
typename Tcallback>
76 struct registerQueryCallback_f:
public std::unary_function<T,void>
78 registerQueryCallback_f(
const std::string &_id,
const Tcallback _callback)
79 : id(_id), callback(_callback)
82 void operator()(T& x) { x->i()->registerQueryCallback(
id, callback); }
83 const std::string& id;
const Tcallback& callback;
86 template<
class T,
typename Tcallback>
87 struct unregisterQueryCallback_f:
public std::unary_function<T,void>
89 unregisterQueryCallback_f(
const std::string &_id)
93 void operator()(T& x) { x->i()->unregisterQueryCallback(
id); }
94 const std::string& id;
99 template<
class T,
typename Tcallback>
100 struct registerHandlerCallback_f:
public std::unary_function<T,void>
102 registerHandlerCallback_f(
const std::string &_id,
const Tcallback _callback)
103 : id(_id), callback(_callback)
106 void operator()(T& x) { x->i()->registerHandlerCallback(
id, callback); }
107 const std::string& id;
const Tcallback& callback;
110 template<
class T,
typename Tcallback>
111 struct unregisterHandlerCallback_f:
public std::unary_function<T,void>
113 unregisterHandlerCallback_f(
const std::string &_id)
117 void operator()(T& x) { x->i()->unregisterHandlerCallback(
id); }
118 const std::string& id;
123 const std::string d_type;
124 typedef std::vector<rpcmanager_base::rpcserver_booter_base_sptr> rpcServerMap_t;
125 std::vector<std::string> d_registeredServers;
126 rpcServerMap_t d_serverlist;
void registerQueryCallback(const std::string &id, const queryCallback_t callback)
Definition: rpccallbackregister_base.h:80
const std::string & type()
const std::vector< std::string > & registeredServers()
void registerServer(rpcmanager_base::rpcserver_booter_base_sptr server)
void registerConfigureCallback(const std::string &id, const configureCallback_t callback)
void unregisterQueryCallback(const std::string &id)
Definition: rpcserver_aggregator.h:31
void unregisterHandlerCallback(const std::string &id)
Definition: rpcserver_base.h:28
void unregisterConfigureCallback(const std::string &id)
virtual ~rpcserver_aggregator()
void registerHandlerCallback(const std::string &id, const handlerCallback_t callback)