RSB
0.9.6
|
The server side of a request-reply-based communication channel. More...
#include <Server.h>
Classes | |
class | AnyReplyTypeCallback |
A callback which allows any kind of reply type but is restricted to a single request type. More... | |
class | Callback |
Callback object used to register one method for a server. More... | |
class | Callback< RequestType, void > |
class | Callback< void, ReplyType > |
class | CallbackBase |
Base class for callback classes. More... | |
class | IntlCallback |
Callback object interface to implement for registering callable methods. More... | |
Public Types | |
typedef boost::shared_ptr < IntlCallback > | CallbackPtr |
Public Member Functions | |
Server (const Scope &scope, const ParticipantConfig &listenerConfig, const ParticipantConfig &informerConfig) | |
virtual | ~Server () |
void | registerMethod (const std::string &methodName, CallbackPtr callback) |
Register a new method with the given name. More... | |
Callback () | |
virtual void | call (const std::string &methodName)=0 |
Implement this method to perform actions. More... | |
Private Member Functions | |
AnnotatedData | intlCall (const std::string &methodName, boost::shared_ptr< void >) |
Private Attributes | |
Scope | scope |
ParticipantConfig | listenerConfig |
ParticipantConfig | informerConfig |
std::set< ListenerPtr > | requestListeners |
std::map< std::string, Informer< AnyType >::Ptr > | methods |
The server side of a request-reply-based communication channel.
A callback which does not take a request and does not produce a result.
typedef boost::shared_ptr<IntlCallback> rsb::patterns::Server<>::CallbackPtr |
rsb::patterns::Server<>::Server | ( | const Scope & | scope, |
const ParticipantConfig & | listenerConfig, | ||
const ParticipantConfig & | informerConfig | ||
) |
Definition at line 121 of file Server.cpp.
|
virtual |
Definition at line 127 of file Server.cpp.
|
pure virtual |
Implement this method to perform actions.
methodName | called method |
std::exception | all exceptions based on this type are automatically caught and delivered to the remote server |
|
inline |
|
inlineprivate |
void rsb::patterns::Server<>::registerMethod | ( | const std::string & | methodName, |
CallbackPtr | callback | ||
) |
Register a new method with the given name.
methodName | method name |
callback | callback to execute for the method |
MethodExistsException | thrown if a method with this name already exists |
Definition at line 130 of file Server.cpp.
References rsb::Scope::concat(), rsb::Factory::createInformer(), rsb::Factory::createListener(), rsb::getFactory(), rsb::patterns::Server<>::informerConfig, rsb::patterns::Server<>::listenerConfig, rsb::patterns::Server<>::methods, rsb::patterns::Server<>::requestListeners, rsb::patterns::Server<>::scope, and rsb::Scope::toString().
|
private |
Definition at line 248 of file Server.h.
Referenced by rsb::patterns::Server<>::registerMethod().
|
private |
Definition at line 247 of file Server.h.
Referenced by rsb::patterns::Server<>::registerMethod().
|
private |
Definition at line 252 of file Server.h.
Referenced by rsb::patterns::Server<>::registerMethod().
|
private |
Definition at line 250 of file Server.h.
Referenced by rsb::patterns::Server<>::registerMethod().
|
private |
Definition at line 246 of file Server.h.
Referenced by rsb::patterns::Server<>::registerMethod().