RSB
0.16.1
|
Base class for method classes. More...
#include <Server.h>
Public Member Functions | |
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 |
virtual std::string | getKind () const =0 |
Return the kind of the participant. More... | |
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 |
Public Member Functions inherited from rsb::eventprocessing::Handler | |
virtual void | handle (EventPtr event)=0 |
Handle event. More... | |
Protected Member Functions | |
ListenerPtr | getListener () |
Returns the Listener participant, creating it if necessary. More... | |
const ParticipantConfig & | getListenerConfig () const |
Returns the configuration for the Listener participant. More... | |
virtual ListenerPtr | makeListener () |
Creates and returns 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 |
Private Attributes | |
std::string | name |
ParticipantConfig | listenerConfig |
ParticipantConfig | informerConfig |
ListenerPtr | listener |
InformerBasePtr | informer |
Base class for method classes.
Manages a listener and an informer participant and their respective configurations.
rsb::patterns::Method::Method | ( | const Scope & | scope, |
const std::string & | name, | ||
const ParticipantConfig & | listenerConfig, | ||
const ParticipantConfig & | informerConfig | ||
) |
Definition at line 34 of file Server.cpp.
|
virtual |
Definition at line 42 of file Server.cpp.
References deactivate().
void rsb::patterns::Method::activate | ( | ) |
Definition at line 46 of file Server.cpp.
References getListener().
void rsb::patterns::Method::deactivate | ( | ) |
Definition at line 50 of file Server.cpp.
References informer, and listener.
Referenced by ~Method().
|
protected |
Returns the Informer participant, creating it if necessary.
Definition at line 85 of file Server.cpp.
References informer, and makeInformer().
Referenced by rsb::patterns::RemoteServer::RemoteMethod::call(), and rsb::patterns::LocalServer<>::LocalMethod::handle().
|
protected |
Returns the configuration for the Informer participant.
Definition at line 93 of file Server.cpp.
References informerConfig.
Referenced by makeInformer().
|
protected |
Returns the Listener participant, creating it if necessary.
Definition at line 68 of file Server.cpp.
References listener, and makeListener().
Referenced by activate().
|
protected |
Returns the configuration for the Listener participant.
Definition at line 76 of file Server.cpp.
References listenerConfig.
Referenced by makeListener().
const std::string & rsb::patterns::Method::getName | ( | ) | const |
Returns the name of the method.
Definition at line 59 of file Server.cpp.
References name.
Referenced by rsb::patterns::LocalServer<>::LocalMethod::handle().
|
virtual |
|
protectedvirtual |
Creates and returns the Informer participant.
Derived class can override this method to adapt the created instance.
Definition at line 97 of file Server.cpp.
References rsb::Factory::createInformerBase(), rsb::getFactory(), getInformerConfig(), and rsb::Participant::getScope().
Referenced by getInformer().
|
protectedvirtual |
Creates and returns the Listener participant.
Derived class can override this method to adapt the created instance.
Reimplemented in rsb::patterns::LocalServer<>::LocalMethod, and rsb::patterns::RemoteServer::RemoteMethod.
Definition at line 80 of file Server.cpp.
References rsb::Factory::createListener(), rsb::getFactory(), getListenerConfig(), and rsb::Participant::getScope().
Referenced by getListener(), rsb::patterns::RemoteServer::RemoteMethod::makeListener(), and rsb::patterns::LocalServer<>::LocalMethod::makeListener().
|
private |
Definition at line 121 of file Server.h.
Referenced by deactivate(), and getInformer().
|
private |
Definition at line 118 of file Server.h.
Referenced by getInformerConfig().
|
private |
Definition at line 120 of file Server.h.
Referenced by deactivate(), getListener(), rsb::patterns::RemoteServer::RemoteMethod::makeListener(), and rsb::patterns::LocalServer<>::LocalMethod::makeListener().
|
private |
Definition at line 117 of file Server.h.
Referenced by getListenerConfig().
|
private |