OpenMAMA C++ API
Wombat::MamaBasicWildCardSubscriptionCallback Class Referenceabstract

The message callback interface for basic subscriptions. More...

#include <MamaBasicWildCardSubscriptionCallback.h>

Public Member Functions

virtual ~MamaBasicWildCardSubscriptionCallback ()
 
virtual void onCreate (MamaBasicWildCardSubscription *subscription)=0
 Method invoked when subscription creation is complete, and before any calls to onMsg. More...
 
virtual void onError (MamaBasicWildCardSubscription *subscription, const MamaStatus &status, const char *topic)=0
 Invoked if an error occurs during prior to subscription creation or if the subscription receives a message for an unentitled topic. More...
 
virtual void onDestroy (MamaBasicWildCardSubscription *subscription, void *closure)
 This method is invoked when a subscription has been completely destroyed, the client can have confidence that no further events will be placed on the queue for this subscription. More...
 
virtual void onMsg (MamaBasicWildCardSubscription *subscription, MamaMsg &msg, const char *topic)=0
 Invoked when a message arrives. More...
 

Detailed Description

The message callback interface for basic subscriptions.

Callers provide an object implementing this interface on creating a MamaSubscription.

Constructor & Destructor Documentation

§ ~MamaBasicWildCardSubscriptionCallback()

virtual Wombat::MamaBasicWildCardSubscriptionCallback::~MamaBasicWildCardSubscriptionCallback ( )
inlinevirtual

Member Function Documentation

§ onCreate()

virtual void Wombat::MamaBasicWildCardSubscriptionCallback::onCreate ( MamaBasicWildCardSubscription subscription)
pure virtual

Method invoked when subscription creation is complete, and before any calls to onMsg.

Since subscriptions are created asynchronous by throttle, this callback provides the subscription instance after the throttle processes the creation request.

Parameters
subscriptionThe subscription.

§ onError()

virtual void Wombat::MamaBasicWildCardSubscriptionCallback::onError ( MamaBasicWildCardSubscription subscription,
const MamaStatus status,
const char *  topic 
)
pure virtual

Invoked if an error occurs during prior to subscription creation or if the subscription receives a message for an unentitled topic.

If the status is MamaMsgStatus.NOT_ENTITTLED the topic parameter is the specific unentitled topic. If the subscription topic contains wildcards, the subscription may still receive messages for other entitled topics.

Parameters
subscriptionThe subscription.
statusThe wombat error code.
topicThe topic for NOT_ENTITLED

§ onDestroy()

virtual void Wombat::MamaBasicWildCardSubscriptionCallback::onDestroy ( MamaBasicWildCardSubscription subscription,
void *  closure 
)
inlinevirtual

This method is invoked when a subscription has been completely destroyed, the client can have confidence that no further events will be placed on the queue for this subscription.

Parameters
[in]subscriptionThe The Mama Basic Wildcard Subscription.
[in]closureThe closure passed to the create function.

§ onMsg()

virtual void Wombat::MamaBasicWildCardSubscriptionCallback::onMsg ( MamaBasicWildCardSubscription subscription,
MamaMsg msg,
const char *  topic 
)
pure virtual

Invoked when a message arrives.

Parameters
subscriptionthe MamaSubscription.
msgThe TibrvMsg.