29 #include <rsc/runtime/ContainerIO.h>
30 #include <rsc/logging/Logger.h>
33 #include "../transport/OutConnector.h"
34 #include "../QualityOfServiceSpec.h"
35 #include "../transport/Connector.h"
40 using namespace rsc::logging;
43 using namespace rsb::transport;
46 namespace eventprocessing {
61 OutRouteConfigurator::OutRouteConfigurator() :
63 d->logger = Logger::getLogger(
"rsb.eventprocessing.OutRouteConfigurator");
74 return "OutRouteConfigurator";
78 stream <<
"connectors = " <<
d->connectors <<
", shutdown = "
83 RSCDEBUG(
d->logger,
"Activating");
86 for (ConnectorList::iterator it =
d->connectors.begin(); it
87 !=
d->connectors.end(); ++it) {
93 for (ConnectorList::iterator it =
d->connectors.begin(); it
94 !=
d->connectors.end(); ++it) {
95 RSCDEBUG(
d->logger,
"Adding connector " << *it
96 <<
" to strategy " <<
d->eventSendingStrategy);
97 d->eventSendingStrategy->addConnector(*it);
102 RSCDEBUG(
d->logger,
"Deactivating");
106 for (ConnectorList::iterator it =
d->connectors.begin(); it
107 !=
d->connectors.end(); ++it) {
108 RSCDEBUG(
d->logger,
"Removing connector " << *it
109 <<
" from strategy " <<
d->eventSendingStrategy);
110 if (
d->eventSendingStrategy) {
111 d->eventSendingStrategy->removeConnector(*it);
114 d->eventSendingStrategy.reset();
117 for (ConnectorList::iterator it =
d->connectors.begin(); it
118 !=
d->connectors.end(); ++it) {
126 RSCDEBUG(
d->logger,
"Adding connector " << connector);
127 d->connectors.push_back(connector);
131 RSCDEBUG(
d->logger,
"Removing connector " << connector);
132 d->connectors.remove(connector);
136 RSCDEBUG(
d->logger,
"OutRouteConfigurator::publish(Event) publishing new event: " << e);
137 d->eventSendingStrategy->process(e);
142 for (ConnectorList::iterator it =
d->connectors.begin(); it
143 !=
d->connectors.end(); ++it) {
144 (*it)->setQualityOfServiceSpecs(specs);