30 #include <boost/format.hpp>
39 InformerBase::InformerBase(
const vector<transport::OutConnectorPtr>& connectors,
42 const string& defaultType) :
43 Participant(scope, config), defaultType(defaultType),
44 configurator(new eventprocessing::OutRouteConfigurator(scope)),
45 currentSequenceNumber(0) {
47 for (vector<transport::OutConnectorPtr>::const_iterator it =
48 connectors.begin(); it != connectors.end(); ++it) {
105 if (event->getType().empty()) {
106 throw invalid_argument(
108 boost::format(
"Event type cannot be empty: %1%")
113 throw invalid_argument(
116 "Specified event type %1% does not match informer type %2%.")
117 % event->getType() %
getType()));
120 if (*event->getScopePtr() != *
getScope() && !
event->getScopePtr()->isSubScopeOf(
122 throw invalid_argument(
125 "Specified event scope %1% does not match informer scope %2%.")
126 % event->getScopePtr() %
getScope()));
Specification of desired quality of service settings for sending and receiving events.
boost::shared_ptr< void > VoidPtr
Basic message that is exchanged between informers and listeners.
void printContents(std::ostream &stream) const
Objects of this class participate in the exchange of notifications on one channel of the bus...
QualityOfServiceSpec getQualityOfServiceSpec() const
Returns the current settings for QoS.
A class describing the configuration of Participant instances.
ScopePtr getScope() const
Returns the scope of this participant.
rsc::misc::UUID getId() const
Returns the unique id of the participant.
boost::shared_ptr< Event > EventPtr
Scope is a descriptor for a hierarchical channel of the unified bus.