RSB
0.7.0
|
Instances of this class receive events from a bus that is accessed via a socket connection. More...
#include <InPushConnector.h>
Public Member Functions | |
InPushConnector (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 | ~InPushConnector () |
void | handle (EventPtr event) |
Handle event. | |
Public Member Functions inherited from rsb::transport::socket::InConnector | |
InConnector (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 | ~InConnector () |
Scope | getScope () const |
void | setScope (const Scope &scope) |
Sets the scope this connector will receive events from. | |
virtual void | activate () |
virtual void | deactivate () |
void | setQualityOfServiceSpecs (const QualityOfServiceSpec &specs) |
Requests new QoS settings for publishing events. | |
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 () |
Public Member Functions inherited from rsb::eventprocessing::Handler | |
virtual | ~Handler () |
Public Member Functions inherited from rsb::transport::InPushConnector | |
virtual void | addHandler (eventprocessing::HandlerPtr handler) |
virtual void | removeHandler (eventprocessing::HandlerPtr handler) |
Static Public Member Functions | |
static rsb::transport::InPushConnector * | create (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::InConnector | |
typedef boost::shared_ptr < InConnector > | Ptr |
Public Types inherited from rsb::transport::InPushConnector | |
typedef boost::shared_ptr < InPushConnector > | Ptr |
Protected Types inherited from rsb::transport::InPushConnector | |
typedef std::list < eventprocessing::HandlerPtr > | HandlerList |
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 |
Protected Attributes inherited from rsb::transport::InPushConnector | |
HandlerList | handlers |
Instances of this class receive events from a bus that is accessed via a socket connection.
The receiving and dispatching of events is done in push mode: each instance has a BusConnection which pushes appropriate events into the instance. The connector deserializes event payloads and pushes the events into handlers (usually objects which implement EventReceivingStrategy).
Definition at line 62 of file InPushConnector.h.
rsb::transport::socket::InPushConnector::InPushConnector | ( | 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.
converters | A strategy for converter selection within the newly created connector. |
host | The host of the socket through which the newly created connector will operate. |
port | The port of the socket through which the newly created connector will operate. |
server | Controls 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). |
tcpnodelay | Controls 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 54 of file InPushConnector.cpp.
|
virtual |
Reimplemented from rsb::transport::InPushConnector.
Definition at line 64 of file InPushConnector.cpp.
|
static |
|
virtual |
Handle event.
event | The event that should be handled. |
Implements rsb::transport::socket::InConnector.
Definition at line 67 of file InPushConnector.cpp.
References rsb::transport::socket::ConnectorBase::active, rsb::transport::ConverterSelectingConnector< std::string >::getConverter(), and rsb::transport::InPushConnector::handlers.
|
private |
Definition at line 80 of file InPushConnector.h.