Classes Files

Wombat::MamaBasicSubscription

More…

#include <MamaBasicSubscription.h>

Inherited by Wombat::MamaBasicWildCardSubscription, Wombat::MamaSubscription

Public Functions

  Name
virtual ~MamaBasicSubscription()
  MamaBasicSubscription(void )
virtual void createBasic(MamaTransport * transport, MamaQueue * queue, MamaBasicSubscriptionCallback * callback, const char * topic, void * closure =NULL)
virtual void createBasic(MamaTransport * transport, MamaQueue * queue, MamaSubscriptionCallback * callback, const char * topic, void * closure =NULL)
virtual void destroy()
virtual void destroyEx()
virtual bool isActive(void ) const
virtual const char * getTopic(void ) const
virtual MamaTransport * getTransport(void ) const
virtual MamaBasicSubscriptionCallback * getBasicCallback(void ) const
virtual MamaQueue * getQueue(void ) const
virtual void setClosure(void * closure)
virtual void * getClosure(void ) const
virtual void setDebugLevel(MamaLogLevel level)
virtual MamaLogLevel getDebugLevel() const
virtual bool checkDebugLevel(MamaLogLevel level) const
virtual mamaSubscriptionState getState(void )

Protected Attributes

  Name
void * mClosure
MamaQueue * mQueue
mamaSubscription mSubscription
MamaTransport * mTransport

Detailed Description

class Wombat::MamaBasicSubscription;

See: Mama

Author: Michael Schonberg copyright 2003 Wombat Consulting Inc.

The [MamaBasicSubscription](classWombat_1_1MamaBasicSubscription.html) interface represents a subscription to a topic with no market data semantics.

Public Functions Documentation

function ~MamaBasicSubscription

virtual ~MamaBasicSubscription()

The destructor will call [destroy()](classWombat_1_1MamaBasicSubscription.html#function-destroy) if the subscription has not already been destroyed.

function MamaBasicSubscription

MamaBasicSubscription(
    void 
)

Constructor. Call createBasic() to activate the subscription.

function createBasic

virtual void createBasic(
    MamaTransport * transport,
    MamaQueue * queue,
    MamaBasicSubscriptionCallback * callback,
    const char * topic,
    void * closure =NULL
)

Parameters:

  • transport The transport to use. Must be a basic transport.
  • queue The queue.
  • callback MamaBasicSubscriptionCallback class instance containing the three callback methods.
  • topic The topic.
  • closure The caller supplied closure.

Create a basic subscription without market data semantics.

function createBasic

virtual void createBasic(
    MamaTransport * transport,
    MamaQueue * queue,
    MamaSubscriptionCallback * callback,
    const char * topic,
    void * closure =NULL
)

Parameters:

  • transport The transport to use. Must be a basic transport.
  • queue The queue.
  • callback MamaSubscriptionCallback class instance containing the three callback methods.
  • topic The topic.
  • closure The caller supplied closure.

Create a basic subscription without market data semantics using MAMA callback structure

function destroy

virtual void destroy()

Reimplemented by: Wombat::MamaSubscription::destroy

Destroy the subscription.

Destroys the underlying subscription. The subscription can be recreated via a subsequent call to create()

function destroyEx

virtual void destroyEx()

Reimplemented by: Wombat::MamaSubscription::destroyEx

This function will destroy the subscription and can be called from any thread. Note that the subscription will not be fully destroyed until the onDestroy callback is received from the MamaBasicSubscriptionCallback interface. To destroy from the dispatching thread the destroy function should be used in preference.

function isActive

virtual bool isActive(
    void 
) const

Return: whether the subscription is active.

Return whether the subscription is active.

function getTopic

virtual const char * getTopic(
    void 
) const

Return: The topic.

Return the symbol for this subscription.

function getTransport

virtual MamaTransport * getTransport(
    void 
) const

Return: the transport.

Return the [MamaTransport](classWombat_1_1MamaTransport.html) for this subscription.

function getBasicCallback

virtual MamaBasicSubscriptionCallback * getBasicCallback(
    void 
) const

Return: the callback.

Return the [MamaSubscriptionCallback](classWombat_1_1MamaSubscriptionCallback.html) for this subscription.

function getQueue

virtual MamaQueue * getQueue(
    void 
) const

Return: the queue.

Return the [MamaQueue](classWombat_1_1MamaQueue.html) for the subscription.

function setClosure

virtual void setClosure(
    void * closure
)

Set the closure for the subscription.

function getClosure

virtual void * getClosure(
    void 
) const

Return: the closure.

Return the closure for the subscription.

function setDebugLevel

virtual void setDebugLevel(
    MamaLogLevel level
)

Parameters:

  • level The new debug level.

Set the debug level for this subscription.

function getDebugLevel

virtual MamaLogLevel getDebugLevel() const

Return: the debug level for this subscription.

Return the debug level for this subscription.

function checkDebugLevel

virtual bool checkDebugLevel(
    MamaLogLevel level
) const

Parameters:

  • level The debug level to check.

Return: whether the level equals or exceeds the set level for this subscription.

Return whether the debug level for this subscription equals or exceeds some level.

function getState

virtual mamaSubscriptionState getState(
    void 
)

Return: mama_status this can be one of the mamaSubscriptionState enumeration values.

This function will return the current state of the subscription, this function should be used in preference to the mamaSubscription_isActive or mamaSubscription_isValid functions. This function is thread-safe.

Protected Attributes Documentation

variable mClosure

void * mClosure;

variable mQueue

MamaQueue * mQueue;

variable mSubscription

mamaSubscription mSubscription;

variable mTransport

MamaTransport * mTransport;

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