RSB  0.19.0
rsb::patterns::LocalServer<>::LocalMethod Class Reference

A derived Method class which can be called from the remote side and implements its behavior by invoking a client-supplied callback. More...

#include <LocalServer.h>

Inheritance diagram for rsb::patterns::LocalServer<>::LocalMethod:
Inheritance graph
Collaboration diagram for rsb::patterns::LocalServer<>::LocalMethod:
Collaboration graph

Public Member Functions

 LocalMethod (const Scope &scope, const std::string &name, const ParticipantConfig &listenerConfig, const ParticipantConfig &informerConfig, CallbackPtr callback)
 
virtual ~LocalMethod ()
 
virtual std::string getKind () const
 Return the kind of the participant. More...
 
- 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 Member Functions

ListenerPtr makeListener ()
 Creates and returns the Listener participant. More...
 
void handle (EventPtr event)
 Handle event. More...
 

Private Attributes

rsc::logging::LoggerPtr logger
 
CallbackPtr callback
 

Additional Inherited Members

- Protected Member Functions inherited from rsb::patterns::Method
ListenerPtr getListener ()
 Returns the Listener participant, creating it if necessary. More...
 
const ParticipantConfiggetListenerConfig () const
 Returns the configuration for the Listener participant. More...
 
InformerBasePtr getInformer ()
 Returns the Informer participant, creating it if necessary. More...
 
const ParticipantConfiggetInformerConfig () 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
 

Detailed Description

template<>
class rsb::patterns::LocalServer<>::LocalMethod

A derived Method class which can be called from the remote side and implements its behavior by invoking a client-supplied callback.

Author
jmoringe

Definition at line 366 of file LocalServer.h.

Constructor & Destructor Documentation

rsb::patterns::LocalServer<>::LocalMethod::LocalMethod ( const Scope scope,
const std::string &  name,
const ParticipantConfig listenerConfig,
const ParticipantConfig informerConfig,
CallbackPtr  callback 
)

Definition at line 71 of file LocalServer.cpp.

rsb::patterns::LocalServer<>::LocalMethod::~LocalMethod ( )
virtual

Definition at line 82 of file LocalServer.cpp.

Member Function Documentation

std::string rsb::patterns::LocalServer<>::LocalMethod::getKind ( ) const
virtual

Return the kind of the participant.

Examples include "informer", "listener" and "reader".

Returns
a string describing the kind of the participant.

Implements rsb::Participant.

Definition at line 85 of file LocalServer.cpp.

void rsb::patterns::LocalServer<>::LocalMethod::handle ( EventPtr  event)
privatevirtual
ListenerPtr rsb::patterns::LocalServer<>::LocalMethod::makeListener ( )
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 89 of file LocalServer.cpp.

References rsb::patterns::Method::listener, and rsb::patterns::Method::makeListener().

Here is the call graph for this function:

Member Data Documentation

CallbackPtr rsb::patterns::LocalServer<>::LocalMethod::callback
private

Definition at line 380 of file LocalServer.h.

Referenced by rsb::patterns::LocalServer<>::LocalMethod::handle().

rsc::logging::LoggerPtr rsb::patterns::LocalServer<>::LocalMethod::logger
private

Definition at line 378 of file LocalServer.h.

Referenced by rsb::patterns::LocalServer<>::LocalMethod::handle().


The documentation for this class was generated from the following files: