22 #ifndef __M2ETIS_PUBSUB_ORDER_BASEORDER_H__
23 #define __M2ETIS_PUBSUB_ORDER_BASEORDER_H__
38 template<
class NetworkType>
55 void setHn(
const typename NetworkType::Key &
self) {
130 typename NetworkType::Key
hn;
146 boost::function<void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)>
sendMsg_;
boost::shared_ptr< OrderInfo > Ptr
virtual void processSubscribePayload(typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0
called for every SubscribeMsg that arrived
BaseOrder(PubSubSystemEnvironment *pssi, bool isRoot)
virtual void receive(uint64_t id, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0
called for every message that is ready to be delivered
bool isRoot_
true if this node is the root node
PubSubSystemEnvironment * pssi_
void configureCallback(const boost::function< void(uint64_t, msgProcess)> &func)
used to set the function to be called when a message should be send to the next processing stage call...
virtual void processNotifyPayload(typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0
called for every NotifyMsg that arrived
virtual bool configureOrderInfo(uint64_t id, const message::ActionType mtype, typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &rec)=0
called for every message to be sent
virtual void notifyRemovedMessage(typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &receiver)=0
notified when message dropped by filter or validity strategy
boost::function< void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> sendMsg_
stores the function to send new messages This function will send a newly created control message cont...
void setRoot(bool b)
sets whether this node is the root node. Several strategies need this to determind the sequencer ...
This is the interface that should be used for all Order Strategies It specifies all functions that sh...
void setHn(const typename NetworkType::Key &self)
sets the hostname of the current node
void configureSendCallback(const boost::function< void(message::OrderInfo::Ptr, const typename NetworkType::Key &, ControlTarget)> &func)
with this function, new messages can be sent directly to nodes
boost::function< void(uint64_t, msgProcess)> function_
stores the function to be called for delivering
virtual bool processControlPayload(typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0
called for every ControlMsg that arrived
NetworkType::Key hn
hostname of the node
virtual bool hasPending()=0
returns whether some messages are still waiting
virtual void processPublishPayload(typename message::OrderInfo::Ptr ptr, const typename NetworkType::Key &sender)=0
called for every PublishMsg that arrived