The message callback interface.
More...
#include <MamaSubscriptionCallback.h>
|
| virtual | ~MamaSubscriptionCallback () |
| |
| virtual void | onCreate (MamaSubscription *subscription)=0 |
| | Method invoked when subscription creation is complete, and before any calls to onMsg. More...
|
| |
| virtual void | onError (MamaSubscription *subscription, const MamaStatus &status, const char *symbol)=0 |
| | Invoked if an error occurs during prior to subscription creation or if the subscription receives a message for an unentitled symbol. More...
|
| |
| virtual void | onGap (MamaSubscription *subscription) |
| | Method invoked when a sequence number gap is detected. More...
|
| |
| virtual void | onDestroy (MamaSubscription *subscription) |
| | Method invoked when a subscription has been destroyed through destroyEx. More...
|
| |
| virtual void | onRecapRequest (MamaSubscription *subscription) |
| | Method invoked when a recap is requested upon detecting a sequence number gap. More...
|
| |
| virtual void | onMsg (MamaSubscription *subscription, MamaMsg &msg)=0 |
| | Invoked when a message arrives. More...
|
| |
| virtual void | onQuality (MamaSubscription *subscription, mamaQuality quality, const char *symbol, short cause, const void *platformInfo)=0 |
| | Invoked when the quality of this subscription changes. More...
|
| |
| virtual void | onCreate (MamaBasicSubscription *subscription) |
| |
| virtual void | onError (MamaBasicSubscription *subscription, const MamaStatus &status, const char *symbol) |
| |
| virtual void | onMsg (MamaBasicSubscription *subscription, MamaMsg &msg) |
| | Invoked when a message arrives. More...
|
| |
The message callback interface.
Callers provide an object implementing this interface on creating a MamaSubscription.
- See also
- MamaSubscription
- Author
- mls
◆ ~MamaSubscriptionCallback()
| virtual Wombat::MamaSubscriptionCallback::~MamaSubscriptionCallback |
( |
| ) |
|
|
virtual |
◆ onCreate() [1/2]
| virtual void Wombat::MamaSubscriptionCallback::onCreate |
( |
MamaSubscription * |
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
-
| subscription | The subscription. |
◆ onError() [1/2]
| virtual void Wombat::MamaSubscriptionCallback::onError |
( |
MamaSubscription * |
subscription, |
|
|
const MamaStatus & |
status, |
|
|
const char * |
symbol |
|
) |
| |
|
pure virtual |
Invoked if an error occurs during prior to subscription creation or if the subscription receives a message for an unentitled symbol.
If the status is MamaMsgStatus.NOT_ENTITTLED the symbol parameter is the specific unentitled symbol. If the subscription symbol contains wildcards, the subscription may still receive messages for other entitled symbol.
- Parameters
-
| subscription | The subscription. |
| status | The wombat error code. |
| symbol | The symbol for NOT_ENTITLED |
◆ onGap()
| virtual void Wombat::MamaSubscriptionCallback::onGap |
( |
MamaSubscription * |
subscription | ) |
|
|
virtual |
Method invoked when a sequence number gap is detected.
At this point the topic is considered stale and the subscription will not receive further messages until the feed handler satisfies a recap request.
- Parameters
-
| subscription | The subscription. |
◆ onDestroy()
| virtual void Wombat::MamaSubscriptionCallback::onDestroy |
( |
MamaSubscription * |
subscription | ) |
|
|
virtual |
Method invoked when a subscription has been destroyed through destroyEx.
- Parameters
-
| subscription | The subscription. |
◆ onRecapRequest()
| virtual void Wombat::MamaSubscriptionCallback::onRecapRequest |
( |
MamaSubscription * |
subscription | ) |
|
|
virtual |
Method invoked when a recap is requested upon detecting a sequence number gap.
- Parameters
-
| subscription | The subscription. |
◆ onMsg() [1/2]
Invoked when a message arrives.
- Parameters
-
◆ onQuality()
| virtual void Wombat::MamaSubscriptionCallback::onQuality |
( |
MamaSubscription * |
subscription, |
|
|
mamaQuality |
quality, |
|
|
const char * |
symbol, |
|
|
short |
cause, |
|
|
const void * |
platformInfo |
|
) |
| |
|
pure virtual |
Invoked when the quality of this subscription changes.
- Parameters
-
| subscription | The subscription. |
| quality | The new quality: one of the values in the MamaQuality class. |
| symbol | The symbol for this subscription. |
| cause | The cause of the quality event |
| platformInfo | Info associated with the quality event |
The cause and platformInfo are supplied only by some middlewares. The information provided by platformInfo is middleware specific. The following middlewares are supported:
tibrv: provides the char* version of the tibrv advisory message.
◆ onCreate() [2/2]
138 onCreate ((MamaSubscription*)subscription);
◆ onError() [2/2]
145 onError ((MamaSubscription*)subscription, status, symbol);
◆ onMsg() [2/2]
Invoked when a message arrives.
- Parameters
-
157 onMsg ((MamaSubscription*)subscription, msg);
The documentation for this class was generated from the following file: