m2etis  0.4
m2etis::pubsub::PubSubSystem Class Reference

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 PubSubSystemunsubscribe (const ChannelName channel) const
 User unsubscribes to the requested channel. More...
 
template<class EventType >
const PubSubSystemunsubscribe (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 PubSubSystempublish (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
 

Detailed Description

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.

Constructor & Destructor Documentation

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 ( )

Member Function Documentation

template<class EventType >
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage ( const ChannelName  channel,
const EventType &  payload 
)

returns a M2Message for the given EventType and Payload

Here is the caller graph for this function:

template<class EventType >
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage ( const ChannelName  channel)
template<class EventType >
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage ( const ChannelName  channel,
const EventType &  payload 
)

Definition at line 211 of file PubSubSystem.h.

Here is the call graph for this function:

template<class EventType >
message::M2Message<EventType>::Ptr m2etis::pubsub::PubSubSystem::createMessage ( const ChannelName  channel)

Definition at line 215 of file PubSubSystem.h.

template<class EventType >
std::string m2etis::pubsub::PubSubSystem::getSelf ( const ChannelName  channel) const

Returns a string representation of the requested channel.

Parameters
[in]channelchannel
Returns
string representation of the requested channel

Definition at line 160 of file PubSubSystem.h.

bool m2etis::pubsub::PubSubSystem::isInitialized ( ) const
inline

sets callback for disconnect

Definition at line 124 of file PubSubSystem.h.

template<class EventType >
const PubSubSystem & m2etis::pubsub::PubSubSystem::publish ( const ChannelName  channel,
const typename message::M2Message< EventType >::Ptr  publish_message 
) const

Publishes a message to a channel.

Parameters
[in]channelchannel
[in]publish_messagepublished message
Returns
Returns a pointer to the PubSubSystem

Definition at line 205 of file PubSubSystem.h.

Here is the call graph for this function:

void m2etis::pubsub::PubSubSystem::registerExceptionCallback ( exceptionEvents  e,
boost::function< void(const std::string &)>  _ptr 
)
template<class EventType >
BasicChannelInterface< EventType > & m2etis::pubsub::PubSubSystem::subscribe ( const ChannelName  channel,
BasicDeliverCallbackInterface< EventType > &  callback 
)

User subscribes to the requested channel.

Parameters
[in]channelrequested channel
[in,out]callbackcallback method, which the publisher can call
Returns
Returns a Handle to interact with the requested channel

Definition at line 178 of file PubSubSystem.h.

template<class EventType >
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.

Parameters
[in]channelrequested channel
[in]callbackcallback method, which the publisher can call
[in]predicatefilter
Returns
Returns a Handle to interact with the requested channel

Definition at line 184 of file PubSubSystem.h.

Here is the call graph for this function:

template<class EventType >
const PubSubSystem & m2etis::pubsub::PubSubSystem::unsubscribe ( const ChannelName  channel) const

User unsubscribes to the requested channel.

Parameters
[in]channelchannel
Returns
Returns a pointer to the PubSubSystem

Definition at line 191 of file PubSubSystem.h.

Here is the call graph for this function:

template<class EventType >
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.

Parameters
[in]channelchannel
[in]predicatefilter
Returns
Returns a pointer to the PubSubSystem

Definition at line 199 of file PubSubSystem.h.

Here is the call graph for this function:

Member Data Documentation

PubSubSystemEnvironment* m2etis::pubsub::PubSubSystem::_pssi

Definition at line 135 of file PubSubSystem.h.


The documentation for this class was generated from the following file: