m2etis
0.4
|
class for accessing the m2etis pub/sub system. It is the main entry point for the usage of the m2etis networking library. More...
#include <PubSubSystem.h>
Public Member Functions | |
PubSubSystem (const std::string &listenIP, const uint16_t listenPort, const std::string &connectIP, const uint16_t connectPort, const std::vector< std::string > &rootList) | |
~PubSubSystem () | |
template<class EventType > | |
BasicChannelInterface< EventType > & | subscribe (const ChannelName channel, BasicDeliverCallbackInterface< EventType > &callback) |
User subscribes to the requested channel. More... | |
template<class EventType > | |
BasicChannelInterface< EventType > & | subscribe (const ChannelName channel, BasicDeliverCallbackInterface< EventType > &callback, boost::shared_ptr< filter::FilterExp< EventType > > predicate) |
User subscribes to the requested channel. More... | |
template<class EventType > | |
const PubSubSystem & | unsubscribe (const ChannelName channel) const |
User unsubscribes to the requested channel. More... | |
template<class EventType > | |
const PubSubSystem & | unsubscribe (const ChannelName channel, const boost::shared_ptr< filter::FilterExp< EventType > > predicate) const |
User deregisters single filter from the requested channel. More... | |
template<class EventType > | |
const PubSubSystem & | publish (const ChannelName channel, const typename message::M2Message< EventType >::Ptr publish_message) const |
Publishes a message to a channel. More... | |
template<class EventType > | |
message::M2Message< EventType >::Ptr | createMessage (const ChannelName channel, const EventType &payload) |
returns a M2Message for the given EventType and Payload More... | |
template<class EventType > | |
message::M2Message< EventType >::Ptr | createMessage (const ChannelName channel) |
template<class EventType > | |
std::string | getSelf (const ChannelName channel) const |
Returns a string representation of the requested channel. More... | |
bool | isInitialized () const |
sets callback for disconnect More... | |
void | registerExceptionCallback (exceptionEvents e, boost::function< void(const std::string &)> _ptr) |
template<class EventType > | |
message::M2Message< EventType >::Ptr | createMessage (const ChannelName channel, const EventType &payload) |
template<class EventType > | |
message::M2Message< EventType >::Ptr | createMessage (const ChannelName channel) |
Public Attributes | |
PubSubSystemEnvironment * | _pssi |
class for accessing the m2etis pub/sub system. It is the main entry point for the usage of the m2etis networking library.
Long Desc
Definition at line 60 of file PubSubSystem.h.
m2etis::pubsub::PubSubSystem::PubSubSystem | ( | const std::string & | listenIP, |
const uint16_t | listenPort, | ||
const std::string & | connectIP, | ||
const uint16_t | connectPort, | ||
const std::vector< std::string > & | rootList | ||
) |
m2etis::pubsub::PubSubSystem::~PubSubSystem | ( | ) |
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage | ( | const ChannelName | channel, |
const EventType & | payload | ||
) |
returns a M2Message for the given EventType and Payload
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage | ( | const ChannelName | channel | ) |
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage | ( | const ChannelName | channel, |
const EventType & | payload | ||
) |
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage | ( | const ChannelName | channel | ) |
Definition at line 215 of file PubSubSystem.h.
std::string m2etis::pubsub::PubSubSystem::getSelf | ( | const ChannelName | channel | ) | const |
Returns a string representation of the requested channel.
[in] | channel | channel |
Definition at line 160 of file PubSubSystem.h.
|
inline |
sets callback for disconnect
Definition at line 124 of file PubSubSystem.h.
const PubSubSystem & m2etis::pubsub::PubSubSystem::publish | ( | const ChannelName | channel, |
const typename message::M2Message< EventType >::Ptr | publish_message | ||
) | const |
Publishes a message to a channel.
[in] | channel | channel |
[in] | publish_message | published message |
Definition at line 205 of file PubSubSystem.h.
void m2etis::pubsub::PubSubSystem::registerExceptionCallback | ( | exceptionEvents | e, |
boost::function< void(const std::string &)> | _ptr | ||
) |
BasicChannelInterface< EventType > & m2etis::pubsub::PubSubSystem::subscribe | ( | const ChannelName | channel, |
BasicDeliverCallbackInterface< EventType > & | callback | ||
) |
User subscribes to the requested channel.
[in] | channel | requested channel |
[in,out] | callback | callback method, which the publisher can call |
Definition at line 178 of file PubSubSystem.h.
BasicChannelInterface< EventType > & m2etis::pubsub::PubSubSystem::subscribe | ( | const ChannelName | channel, |
BasicDeliverCallbackInterface< EventType > & | callback, | ||
boost::shared_ptr< filter::FilterExp< EventType > > | predicate | ||
) |
User subscribes to the requested channel.
[in] | channel | requested channel |
[in] | callback | callback method, which the publisher can call |
[in] | predicate | filter |
Definition at line 184 of file PubSubSystem.h.
const PubSubSystem & m2etis::pubsub::PubSubSystem::unsubscribe | ( | const ChannelName | channel | ) | const |
User unsubscribes to the requested channel.
[in] | channel | channel |
Definition at line 191 of file PubSubSystem.h.
const PubSubSystem & m2etis::pubsub::PubSubSystem::unsubscribe | ( | const ChannelName | channel, |
const boost::shared_ptr< filter::FilterExp< EventType > > | predicate | ||
) | const |
User deregisters single filter from the requested channel.
[in] | channel | channel |
[in] | predicate | filter |
Definition at line 199 of file PubSubSystem.h.
PubSubSystemEnvironment* m2etis::pubsub::PubSubSystem::_pssi |
Definition at line 135 of file PubSubSystem.h.