30 #include "../../MetaData.h" 31 #include "../../EventId.h" 35 using namespace boost;
44 transport::OutConnector* OutConnector::create(
const Properties& args) {
45 LoggerPtr logger = Logger::getLogger(
"rsb.transport.socket.OutConnector");
46 RSCDEBUG(logger,
"Creating OutConnector with properties " << args);
49 args.get<ConverterSelectionStrategyPtr>(
"converters"),
53 args.getAs<
bool> (
"tcpnodelay",
true));
62 ConnectorBase(factory, converters, host, port, server, tcpnodelay),
63 logger(Logger::getLogger(
"rsb.transport.socket.OutConnector")){
83 RSCDEBUG(logger,
"Quality of service not implemented");
87 event->mutableMetaData().setSendTime();
90 boost::shared_ptr<string> wireData(
new string());
92 string wireSchema =
getConverter(busEvent->getType())->serialize(d, *wireData);
93 busEvent->setData(wireData);
94 busEvent->mutableMetaData().setUserInfo(
"rsb.wire-schema", wireSchema);
96 getBus()->handle(busEvent);
Specification of desired quality of service settings for sending and receiving events.
std::pair< std::string, boost::shared_ptr< void > > AnnotatedData
A combination of data type and the actual data.
virtual const std::string getTransportURL() const
virtual void deactivate()
virtual void deactivate()
Basic message that is exchanged between informers and listeners.
boost::shared_ptr< Factory > FactoryPtr
virtual void setScope(const Scope &scope)
FactoryPtr getDefaultFactory()
This class is intended to be used as a base class for connector classes of the socket-based transport...
BusPtr getBus()
Return the Bus object through which this connector is connected to a socket-based bus...
const uint16_t DEFAULT_PORT
void setQualityOfServiceSpecs(const QualityOfServiceSpec &specs)
Requests new QoS settings for publishing events.
ConverterPtr getConverter(const std::string &key) const
Try to find a suitable converter for key .
converter::ConverterSelectionStrategy< std::string >::Ptr ConverterSelectionStrategyPtr
boost::shared_ptr< Event > EventPtr
Scope is a descriptor for a hierarchical channel of the unified bus.
void handle(EventPtr e)
Handle event.
virtual void setScope(const Scope &scope)
const string DEFAULT_HOST
virtual const std::string getTransportURL() const