Classes Files

Wombat::MamaSubscriptionCallback

More…

#include <MamaSubscriptionCallback.h>

Public Functions

  Name
virtual ~MamaSubscriptionCallback()
virtual void onCreate(MamaSubscription * subscription)
virtual void onError(MamaSubscription * subscription, const MamaStatus & status, const char * symbol)
virtual void onGap(MamaSubscription * subscription)
virtual void onDestroy(MamaSubscription * subscription)
virtual void onRecapRequest(MamaSubscription * subscription)
virtual void onMsg(MamaSubscription * subscription, MamaMsg & msg) =0
virtual void onQuality(MamaSubscription * subscription, mamaQuality quality, const char * symbol, short cause, const void * platformInfo)
virtual void onCreate(MamaBasicSubscription * subscription)
virtual void onError(MamaBasicSubscription * subscription, const MamaStatus & status, const char * symbol)
virtual void onMsg(MamaBasicSubscription * subscription, MamaMsg & msg)

Detailed Description

class Wombat::MamaSubscriptionCallback;

See: MamaSubscription

Author: mls

The message callback interface. Callers provide an object implementing this interface on creating a [MamaSubscription](classWombat_1_1MamaSubscription.html).

Public Functions Documentation

function ~MamaSubscriptionCallback

inline virtual ~MamaSubscriptionCallback()

function onCreate

inline virtual void onCreate(
    MamaSubscription * subscription
)

Parameters:

  • subscription The subscription.

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.

function onError

inline virtual void onError(
    MamaSubscription * subscription,
    const MamaStatus & status,
    const char * symbol
)

Parameters:

  • subscription The subscription.
  • status The wombat error code.
  • symbol The symbol for NOT_ENTITLED

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.

function onGap

inline virtual void onGap(
    MamaSubscription * subscription
)

Parameters:

  • subscription The subscription.

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.

function onDestroy

inline virtual void onDestroy(
    MamaSubscription * subscription
)

Parameters:

  • subscription The subscription.

Method invoked when a subscription has been destroyed through destroyEx.

function onRecapRequest

inline virtual void onRecapRequest(
    MamaSubscription * subscription
)

Parameters:

  • subscription The subscription.

Method invoked when a recap is requested upon detecting a sequence number gap.

function onMsg

virtual void onMsg(
    MamaSubscription * subscription,
    MamaMsg & msg
) =0

Parameters:

  • subscription the [MamaSubscription](classWombat_1_1MamaSubscription.html).
  • msg The MamaMsg which resulted in this callback being invoked.

Invoked when a message arrives.

function onQuality

inline virtual void onQuality(
    MamaSubscription * subscription,
    mamaQuality quality,
    const char * symbol,
    short cause,
    const void * platformInfo
)

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

Invoked when the quality of this subscription changes.

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.

function onCreate

inline virtual void onCreate(
    MamaBasicSubscription * subscription
)

function onError

inline virtual void onError(
    MamaBasicSubscription * subscription,
    const MamaStatus & status,
    const char * symbol
)

function onMsg

inline virtual void onMsg(
    MamaBasicSubscription * subscription,
    MamaMsg & msg
)

Parameters:

  • subscription the [MamaSubscription](classWombat_1_1MamaSubscription.html).
  • msg The TibrvMsg.

Invoked when a message arrives.


Updated on 2023-03-31 at 15:29:25 +0100