30 #include "../../MetaData.h"
31 #include "../../EventId.h"
35 using namespace boost;
37 using namespace rsc::logging;
38 using namespace rsc::runtime;
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);
48 return new OutConnector(args.get<ConverterSelectionStrategyPtr>(
"converters"),
52 args.getAs<
bool> (
"tcpnodelay",
true));
61 logger(Logger::getLogger(
"rsb.transport.socket.OutConnector")){
81 RSCWARN(
logger,
"Quality of service not implemented");
85 event->mutableMetaData().setSendTime();
88 boost::shared_ptr<string> wireData(
new string());
90 string wireSchema =
getConverter(busEvent->getType())->serialize(d, *wireData);
91 busEvent->setData(wireData);
92 busEvent->mutableMetaData().setUserInfo(
"rsb.wire-schema", wireSchema);
94 getBus()->handle(busEvent);
Specification of desired quality of service settings for sending and receiving events.
rsc::logging::LoggerPtr logger
std::pair< std::string, boost::shared_ptr< void > > AnnotatedData
A combination of data type and the actual data.
virtual void deactivate()
virtual void deactivate()
Basic message that is exchanged between informers and listeners.
virtual void setScope(const Scope &scope)
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