30 #include <boost/format.hpp>
38 InformerBase::InformerBase(
const vector<transport::OutConnectorPtr>& connectors,
41 const string& defaultType) :
42 Participant(scope, config), defaultType(defaultType),
43 configurator(new eventprocessing::OutRouteConfigurator(scope)),
44 currentSequenceNumber(0) {
46 for (vector<transport::OutConnectorPtr>::const_iterator it =
47 connectors.begin(); it != connectors.end(); ++it) {
98 if (event->getType().empty()) {
99 throw invalid_argument(
101 boost::format(
"Event type cannot be empty: %1%")
106 throw invalid_argument(
109 "Specified event type %1% does not match informer type %2%.")
110 % event->getType() %
getType()));
113 if (*event->getScopePtr() != *
getScope() && !
event->getScopePtr()->isSubScopeOf(
115 throw invalid_argument(
118 "Specified event scope %1% does not match informer scope %2%.")
119 % 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...
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.