RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::transport::socket::OutConnector Class Reference

Instances of this connector class push events into Bus objects which take care of socket-based broadcast and delivery. More...

#include <OutConnector.h>

Inheritance diagram for rsb::transport::socket::OutConnector:
Inheritance graph
Collaboration diagram for rsb::transport::socket::OutConnector:
Collaboration graph

Public Member Functions

 OutConnector (ConverterSelectionStrategyPtr converters, const std::string &host, unsigned int port, Server server, bool tcpnodelay)
 Creates a connector for the given combination of host, port and server.
virtual ~OutConnector ()
virtual void activate ()
virtual void deactivate ()
void setQualityOfServiceSpecs (const QualityOfServiceSpec &specs)
 Requests new QoS settings for publishing events.
void handle (EventPtr e)
 Handle event.
- Public Member Functions inherited from rsb::transport::socket::ConnectorBase
 ConnectorBase (ConverterSelectionStrategyPtr converters, const std::string &host, unsigned int port, Server server, bool tcpnodelay)
 Creates a connector for the given combination of host, port and server.
virtual ~ConnectorBase ()

Static Public Member Functions

static transport::OutConnectorcreate (const rsc::runtime::Properties &args)

Private Attributes

rsc::logging::LoggerPtr logger

Additional Inherited Members

- Public Types inherited from rsb::transport::ConverterSelectingConnector< std::string >
typedef converter::Converter
< std::string >::Ptr 
ConverterPtr
typedef
converter::ConverterSelectionStrategy
< std::string >::Ptr 
ConverterSelectionStrategyPtr
- Public Types inherited from rsb::transport::OutConnector
typedef boost::shared_ptr
< OutConnector
Ptr
- Protected Member Functions inherited from rsb::transport::socket::ConnectorBase
BusPtr getBus ()
 Return the Bus object through which this connector is connected to a socket-based bus.
- Protected Attributes inherited from rsb::transport::socket::ConnectorBase
volatile bool active

Detailed Description

Instances of this connector class push events into Bus objects which take care of socket-based broadcast and delivery.

Author
jmoringe

Definition at line 49 of file OutConnector.h.

Constructor & Destructor Documentation

rsb::transport::socket::OutConnector::OutConnector ( ConverterSelectionStrategyPtr  converters,
const std::string &  host,
unsigned int  port,
Server  server,
bool  tcpnodelay 
)

Creates a connector for the given combination of host, port and server.

Parameters
convertersA strategy for converter selection within the newly created connector.
hostThe host of the socket through which the newly created connector will operate.
portThe port of the socket through which the newly created connector will operate.
serverControls whether the newly created connector should create a listening socket and wait for connections (value SERVER_YES), connect to an existing listen socket (value SERVER_NO) or try to automatically determine whether there already is a listening socket and create one only if necessary (value SERVER_AUTO).
tcpnodelayControls whether the TCP_NODELAY socket option should be set for the socket implementing the communication of the newly created connector. Setting this option trades decreased latency for decreased throughput.

Definition at line 55 of file OutConnector.cpp.

rsb::transport::socket::OutConnector::~OutConnector ( )
virtual

Reimplemented from rsb::transport::OutConnector.

Definition at line 64 of file OutConnector.cpp.

Member Function Documentation

void rsb::transport::socket::OutConnector::activate ( )
virtual

Reimplemented from rsb::transport::socket::ConnectorBase.

Definition at line 68 of file OutConnector.cpp.

static transport::OutConnector* rsb::transport::socket::OutConnector::create ( const rsc::runtime::Properties &  args)
static
void rsb::transport::socket::OutConnector::deactivate ( )
virtual

Reimplemented from rsb::transport::socket::ConnectorBase.

Definition at line 72 of file OutConnector.cpp.

void rsb::transport::socket::OutConnector::handle ( EventPtr  event)
virtual

Handle event.

Parameters
eventThe event that should be handled.

Implements rsb::eventprocessing::Handler.

Definition at line 80 of file OutConnector.cpp.

References rsb::transport::socket::ConnectorBase::getBus(), and rsb::transport::ConverterSelectingConnector< std::string >::getConverter().

Here is the call graph for this function:

void rsb::transport::socket::OutConnector::setQualityOfServiceSpecs ( const QualityOfServiceSpec specs)
virtual

Requests new QoS settings for publishing events.

Does not influence the receiving part.

Parameters
specsQoS specification
Exceptions
UnsupportedQualityOfServiceExceptionrequirements cannot be met

Implements rsb::transport::Connector.

Definition at line 76 of file OutConnector.cpp.

References logger.

Member Data Documentation

rsc::logging::LoggerPtr rsb::transport::socket::OutConnector::logger
private

Definition at line 72 of file OutConnector.h.

Referenced by setQualityOfServiceSpecs().


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