RSB
0.15.1
|
A derived Method class which can be used to invoke methods on a remote LocalServer object. More...
#include <RemoteServer.h>
Public Member Functions | |
RemoteMethod (const Scope &scope, const std::string &name, const ParticipantConfig &listenerConfig, const ParticipantConfig &informerConfig) | |
virtual | ~RemoteMethod () |
virtual std::string | getKind () const |
Return the kind of the participant. More... | |
FuturePtr | call (const std::string &methodName, EventPtr request) |
Public Member Functions inherited from rsb::patterns::Method | |
Method (const Scope &scope, const std::string &name, const ParticipantConfig &listenerConfig, const ParticipantConfig &informerConfig) | |
virtual | ~Method () |
void | activate () |
void | deactivate () |
const std::string & | getName () const |
Returns the name of the method. More... | |
virtual const std::set< std::string > | getTransportURLs () const |
TODO. More... | |
Public Member Functions inherited from rsb::Participant | |
virtual | ~Participant () |
void | printContents (std::ostream &stream) const |
rsc::misc::UUID | getId () const |
Returns the unique id of the participant. More... | |
ScopePtr | getScope () const |
Returns the scope of this participant. More... | |
ParticipantConfig | getConfig () const |
Returns a copy of the participant's configuration. More... | |
Public Member Functions inherited from rsb::Handler | |
std::set< std::string > | getMethods () const |
Returns the desired set of methods this handler can handle. More... | |
bool | acceptsMethod (const std::string &method) const |
Private Types | |
typedef boost::mutex | MutexType |
Private Member Functions | |
ListenerPtr | makeListener () |
Creates and returns the Listener participant. More... | |
void | handle (EventPtr event) |
Handle event. More... | |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
MutexType | inprogressMutex |
std::map< EventId, FuturePtr > | inprogress |
Additional Inherited Members | |
Protected Member Functions inherited from rsb::patterns::Method | |
ListenerPtr | getListener () |
Returns the Listener participant, creating it if necessary. More... | |
const ParticipantConfig & | getListenerConfig () const |
Returns the configuration for the Listener participant. More... | |
InformerBasePtr | getInformer () |
Returns the Informer participant, creating it if necessary. More... | |
const ParticipantConfig & | getInformerConfig () const |
Returns the configuration for the Informer participant. More... | |
virtual InformerBasePtr | makeInformer () |
Creates and returns the Informer participant. More... | |
Protected Member Functions inherited from rsb::Participant | |
Participant (const Scope &scope, const ParticipantConfig &config) | |
Protected Member Functions inherited from rsb::Handler | |
Handler (const std::string &method="") | |
Creates a new handler that only accepts events for the specified method. More... | |
Handler (const std::set< std::string > &methods) | |
Creates a new handler that only accepts events with the specified methods. More... | |
virtual | ~Handler () |
std::string | getClassName () const |
A derived Method class which can be used to invoke methods on a remote LocalServer object.
Definition at line 90 of file RemoteServer.h.
|
private |
Definition at line 103 of file RemoteServer.h.
rsb::patterns::RemoteServer::RemoteMethod::RemoteMethod | ( | const Scope & | scope, |
const std::string & | name, | ||
const ParticipantConfig & | listenerConfig, | ||
const ParticipantConfig & | informerConfig | ||
) |
Definition at line 53 of file RemoteServer.cpp.
|
virtual |
Definition at line 62 of file RemoteServer.cpp.
RemoteServer::FuturePtr rsb::patterns::RemoteServer::RemoteMethod::call | ( | const std::string & | methodName, |
EventPtr | request | ||
) |
Definition at line 76 of file RemoteServer.cpp.
References rsb::patterns::Method::getInformer(), rsb::Participant::getScope(), inprogress, and inprogressMutex.
|
virtual |
Return the kind of the participant.
Examples include "informer"
, "listener"
and "reader"
.
Implements rsb::Participant.
Definition at line 65 of file RemoteServer.cpp.
|
privatevirtual |
Handle event.
event | The event that should be handled. |
Implements rsb::eventprocessing::Handler.
Definition at line 93 of file RemoteServer.cpp.
References inprogress, inprogressMutex, and logger.
|
privatevirtual |
Creates and returns the Listener participant.
Derived class can override this method to adapt the created instance.
Reimplemented from rsb::patterns::Method.
Definition at line 69 of file RemoteServer.cpp.
References rsb::patterns::Method::listener, and rsb::patterns::Method::makeListener().
Definition at line 108 of file RemoteServer.h.
|
private |
Definition at line 107 of file RemoteServer.h.
|
private |
Definition at line 105 of file RemoteServer.h.
Referenced by handle().