29 #include "../Factory.h"
30 #include "../ParticipantConfig.h"
31 #include "../QualityOfServiceSpec.h"
32 #include "../filter/Filter.h"
36 using namespace rsc::logging;
38 using namespace rsb::filter;
39 using namespace rsb::transport;
42 namespace eventprocessing {
49 receivingStrategyConfig(receivingStrategyConfig) {
63 InRouteConfigurator::InRouteConfigurator(
const Scope& scope,
65 d(new
Impl(config.getEventReceivingStrategy())) {
66 d->logger = Logger::getLogger(
"rsb.eventprocessing.InRouteConfigurator");
78 return "InRouteConfigurator";
82 stream <<
"scope = " <<
d->scope <<
", connectors = " <<
d->connectors
83 <<
", eventReceivingStrategy = " <<
d->eventReceivingStrategy
84 <<
", shutdown = " <<
d->shutdown;
88 RSCDEBUG(
d->logger,
"Activating");
91 for (ConnectorSet::iterator it =
d->connectors.begin(); it
92 !=
d->connectors.end(); ++it) {
93 (*it)->setScope(
d->scope);
103 RSCDEBUG(
d->logger,
"Deactivating");
106 for (ConnectorSet::iterator it =
d->connectors.begin(); it
107 !=
d->connectors.end(); ++it) {
112 d->eventReceivingStrategy.reset();
117 return d->receivingStrategyConfig;
121 return d->eventReceivingStrategy;
125 return d->connectors;
129 RSCDEBUG(
d->logger,
"Adding connector " << connector);
130 d->connectors.insert(connector);
134 RSCDEBUG(
d->logger,
"Removing connector " << connector);
135 d->connectors.erase(connector);
139 for (ConnectorSet::iterator it =
d->connectors.begin(); it
140 !=
d->connectors.end(); ++it) {
143 d->eventReceivingStrategy->addFilter(filter);
147 for (ConnectorSet::iterator it =
d->connectors.begin(); it
148 !=
d->connectors.end(); ++it) {
151 d->eventReceivingStrategy->removeFilter(filter);
156 for (ConnectorSet::iterator it =
d->connectors.begin(); it
157 !=
d->connectors.end(); ++it) {
158 (*it)->setQualityOfServiceSpecs(specs);