33 #include <boost/noncopyable.hpp>
34 #include <boost/thread/mutex.hpp>
36 #include <rsc/runtime/TypeStringTools.h>
37 #include <rsc/logging/Logger.h>
38 #include <rsc/threading/Future.h>
41 #include "../Exception.h"
42 #include "../Informer.h"
43 #include "../Listener.h"
44 #include "../ParticipantConfig.h"
46 #include "rsb/rsbexports.h"
51 class WaitingEventHandler;
75 return this->target->isDone();
78 boost::shared_ptr<O>
get(
double timeout) {
79 return boost::static_pointer_cast<O>(this->target->get(timeout)->getData());
106 request->setType(rsc::runtime::typeName<I>());
107 request->setData(args);
123 FuturePtr callAsync(
const std::string& methodName,
EventPtr data);
139 template <
typename O,
typename I>
141 boost::shared_ptr<I> args) {
142 return DataFuture<O>(callAsync(methodName, prepareRequestEvent(args)));
156 template <
typename O>
159 request->setType(rsc::runtime::typeName<void>());
160 request->setData(
VoidPtr(malloc(10)));
184 EventPtr call(
const std::string& methodName,
186 unsigned int maxReplyWaitTime = 25);
209 template <
typename O,
typename I>
210 boost::shared_ptr<O> call(
const std::string& methodName,
211 boost::shared_ptr<I> args,
212 unsigned int maxReplyWaitTime = 25) {
213 return callAsync<O>(methodName, args).
get(maxReplyWaitTime);
234 template <
typename O>
235 boost::shared_ptr<O> call(
const std::string& methodName,
236 unsigned int maxReplyWaitTime = 25) {
237 return callAsync<O>(methodName).
get(maxReplyWaitTime);
250 boost::shared_ptr<WaitingEventHandler>
handler;
258 MethodSet getMethodSet(
const std::string& methodName,
259 const std::string& sendType);