RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::spread::SpreadConnector Class Reference

#include <SpreadConnector.h>

Collaboration diagram for rsb::spread::SpreadConnector:
Collaboration graph

Public Member Functions

 SpreadConnector (const std::string &host=defaultHost(), unsigned int port=defaultPort())
virtual ~SpreadConnector ()
void activate ()
void deactivate ()
void setQualityOfServiceSpecs (const QualityOfServiceSpec &specs)
void join (const std::string &name)
void leave (const std::string &name)
void send (const SpreadMessage &msg)
void receive (SpreadMessagePtr msg)
void init (const std::string &host, unsigned int port)
SpreadConnectionPtr getConnection ()
SpreadMessage::QOS getMessageQoS () const
const std::vector< std::string > & makeGroupNames (const Scope &scope) const
std::string makeGroupName (const Scope &scope) const

Private Types

typedef std::map
< QualityOfServiceSpec::Ordering,
std::map
< QualityOfServiceSpec::Reliability,
SpreadMessage::QOS > > 
QoSMap
typedef std::map< Scope,
std::vector< std::string > > 
GroupNameCache

Static Private Member Functions

static QoSMap buildQoSMapping ()

Private Attributes

rsc::logging::LoggerPtr logger
rsc::misc::UUID id
volatile bool activated
SpreadConnectionPtr con
MembershipManagerPtr memberships
SpreadMessage::QOS messageQoS
 The message type applied to every outgoing message.
boost::shared_mutex groupNameCacheMutex
GroupNameCache groupNameCache

Static Private Attributes

static const QoSMap qosMapping
 Map from 2D input space defined in QualitOfServiceSpec to 1D spread message types.

Detailed Description

Author
swrede

Definition at line 54 of file SpreadConnector.h.

Member Typedef Documentation

typedef std::map<Scope, std::vector<std::string> > rsb::spread::SpreadConnector::GroupNameCache
private

Definition at line 112 of file SpreadConnector.h.

Constructor & Destructor Documentation

rsb::spread::SpreadConnector::SpreadConnector ( const std::string &  host = defaultHost(),
unsigned int  port = defaultPort() 
)

Definition at line 60 of file SpreadConnector.cpp.

rsb::spread::SpreadConnector::~SpreadConnector ( )
virtual

Definition at line 108 of file SpreadConnector.cpp.

Member Function Documentation

void rsb::spread::SpreadConnector::activate ( )

Definition at line 76 of file SpreadConnector.cpp.

SpreadConnector::QoSMap rsb::spread::SpreadConnector::buildQoSMapping ( )
staticprivate

Definition at line 122 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::deactivate ( )

Definition at line 82 of file SpreadConnector.cpp.

SpreadConnectionPtr rsb::spread::SpreadConnector::getConnection ( )

Definition at line 114 of file SpreadConnector.cpp.

SpreadMessage::QOS rsb::spread::SpreadConnector::getMessageQoS ( ) const

Definition at line 118 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::init ( const std::string &  host,
unsigned int  port 
)

Definition at line 64 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::join ( const std::string &  name)

Definition at line 92 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::leave ( const std::string &  name)

Definition at line 96 of file SpreadConnector.cpp.

std::string rsb::spread::SpreadConnector::makeGroupName ( const Scope scope) const

Definition at line 195 of file SpreadConnector.cpp.

References rsb::Scope::toString().

Here is the call graph for this function:

const vector< string > & rsb::spread::SpreadConnector::makeGroupNames ( const Scope scope) const

Definition at line 162 of file SpreadConnector.cpp.

References rsb::Scope::superScopes().

Here is the call graph for this function:

void rsb::spread::SpreadConnector::receive ( SpreadMessagePtr  msg)

Definition at line 104 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::send ( const SpreadMessage msg)
Exceptions
CommExceptionerror sending message

Definition at line 100 of file SpreadConnector.cpp.

void rsb::spread::SpreadConnector::setQualityOfServiceSpecs ( const QualityOfServiceSpec specs)

Definition at line 144 of file SpreadConnector.cpp.

References rsb::QualityOfServiceSpec::getOrdering(), and rsb::QualityOfServiceSpec::getReliability().

Here is the call graph for this function:

Member Data Documentation

volatile bool rsb::spread::SpreadConnector::activated
private

Definition at line 90 of file SpreadConnector.h.

SpreadConnectionPtr rsb::spread::SpreadConnector::con
private

Definition at line 91 of file SpreadConnector.h.

GroupNameCache rsb::spread::SpreadConnector::groupNameCache
mutableprivate

Definition at line 113 of file SpreadConnector.h.

boost::shared_mutex rsb::spread::SpreadConnector::groupNameCacheMutex
mutableprivate

Definition at line 111 of file SpreadConnector.h.

rsc::misc::UUID rsb::spread::SpreadConnector::id
private

Definition at line 88 of file SpreadConnector.h.

rsc::logging::LoggerPtr rsb::spread::SpreadConnector::logger
private

Definition at line 86 of file SpreadConnector.h.

MembershipManagerPtr rsb::spread::SpreadConnector::memberships
private

Definition at line 93 of file SpreadConnector.h.

SpreadMessage::QOS rsb::spread::SpreadConnector::messageQoS
private

The message type applied to every outgoing message.

Definition at line 98 of file SpreadConnector.h.

const SpreadConnector::QoSMap rsb::spread::SpreadConnector::qosMapping
staticprivate
Initial value:

Map from 2D input space defined in QualitOfServiceSpec to 1D spread message types.

First dimension is ordering, second is reliability.

Definition at line 107 of file SpreadConnector.h.


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