OpenMAMA C++ API
Wombat::MamaBasicSubscription Class Reference

The MamaBasicSubscription interface represents a subscription to a topic with no market data semantics. More...

#include <MamaBasicSubscription.h>

Inheritance diagram for Wombat::MamaBasicSubscription:
Wombat::MamaBasicWildCardSubscription Wombat::MamaSubscription

Public Member Functions

virtual ~MamaBasicSubscription ()
 The destructor will call destroy() if the subscription has not already been destroyed. More...
 
 MamaBasicSubscription (void)
 Constructor. More...
 
virtual void createBasic (MamaTransport *transport, MamaQueue *queue, MamaBasicSubscriptionCallback *callback, const char *topic, void *closure=NULL)
 Create a basic subscription without market data semantics. More...
 
virtual void destroy ()
 Destroy the subscription. More...
 
virtual void destroyEx ()
 This function will destroy the subscription and can be called from any thread. More...
 
virtual bool isActive (void) const
 Return whether the subscription is active. More...
 
virtual const char * getTopic (void) const
 Return the symbol for this subscription. More...
 
virtual MamaTransportgetTransport (void) const
 Return the MamaTransport for this subscription. More...
 
virtual MamaBasicSubscriptionCallbackgetBasicCallback (void) const
 Return the MamaSubscriptionCallback for this subscription. More...
 
virtual MamaQueuegetQueue (void) const
 Return the MamaQueue for the subscription. More...
 
virtual void setClosure (void *closure)
 Set the closure for the subscription. More...
 
virtual void * getClosure (void) const
 Return the closure for the subscription. More...
 
virtual void setDebugLevel (MamaLogLevel level)
 Set the debug level for this subscription. More...
 
virtual MamaLogLevel getDebugLevel () const
 Return the debug level for this subscription. More...
 
virtual bool checkDebugLevel (MamaLogLevel level) const
 Return whether the debug level for this subscription equals or exceeds some level. More...
 
virtual mamaSubscriptionState getState (void)
 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. More...
 

Protected Attributes

void * mClosure
 
MamaQueuemQueue
 
mamaSubscription mSubscription
 
MamaTransportmTransport
 

Detailed Description

The MamaBasicSubscription interface represents a subscription to a topic with no market data semantics.

See also
Mama
Author
Michael Schonberg copyright 2003 Wombat Consulting Inc.

Constructor & Destructor Documentation

§ ~MamaBasicSubscription()

virtual Wombat::MamaBasicSubscription::~MamaBasicSubscription ( )
virtual

The destructor will call destroy() if the subscription has not already been destroyed.

§ MamaBasicSubscription()

Wombat::MamaBasicSubscription::MamaBasicSubscription ( void  )

Constructor.

Call createBasic() to activate the subscription.

Member Function Documentation

§ createBasic()

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

Create a basic subscription without market data semantics.

Parameters
transportThe transport to use. Must be a basic transport.
queueThe queue.
callbackThe mamaMsgCallbacks structure containing the three callback methods.
topicThe topic.
closureThe caller supplied closure.

§ destroy()

virtual void Wombat::MamaBasicSubscription::destroy ( )
virtual

Destroy the subscription.

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

Reimplemented in Wombat::MamaSubscription.

§ destroyEx()

virtual void Wombat::MamaBasicSubscription::destroyEx ( )
virtual

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.

Reimplemented in Wombat::MamaSubscription.

§ isActive()

virtual bool Wombat::MamaBasicSubscription::isActive ( void  ) const
virtual

Return whether the subscription is active.

Returns
whether the subscription is active.

§ getTopic()

virtual const char* Wombat::MamaBasicSubscription::getTopic ( void  ) const
virtual

Return the symbol for this subscription.

Returns
The topic.

§ getTransport()

virtual MamaTransport* Wombat::MamaBasicSubscription::getTransport ( void  ) const
virtual

Return the MamaTransport for this subscription.

Returns
the transport.

§ getBasicCallback()

virtual MamaBasicSubscriptionCallback* Wombat::MamaBasicSubscription::getBasicCallback ( void  ) const
virtual

Return the MamaSubscriptionCallback for this subscription.

Returns
the callback.

§ getQueue()

virtual MamaQueue* Wombat::MamaBasicSubscription::getQueue ( void  ) const
virtual

Return the MamaQueue for the subscription.

Returns
the queue.

§ setClosure()

virtual void Wombat::MamaBasicSubscription::setClosure ( void *  closure)
virtual

Set the closure for the subscription.

§ getClosure()

virtual void* Wombat::MamaBasicSubscription::getClosure ( void  ) const
virtual

Return the closure for the subscription.

Returns
the closure.

§ setDebugLevel()

virtual void Wombat::MamaBasicSubscription::setDebugLevel ( MamaLogLevel  level)
virtual

Set the debug level for this subscription.

Parameters
levelThe new debug level.

§ getDebugLevel()

virtual MamaLogLevel Wombat::MamaBasicSubscription::getDebugLevel ( ) const
virtual

Return the debug level for this subscription.

Returns
the debug level for this subscription.

§ checkDebugLevel()

virtual bool Wombat::MamaBasicSubscription::checkDebugLevel ( MamaLogLevel  level) const
virtual

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

Parameters
levelThe debug level to check.
Returns
whether the level equals or exceeds the set level for this subscription.

§ getState()

virtual mamaSubscriptionState Wombat::MamaBasicSubscription::getState ( void  )
virtual

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.

Returns
mama_status this can be one of the mamaSubscriptionState enumeration values.

Member Data Documentation

§ mClosure

void* Wombat::MamaBasicSubscription::mClosure
protected

§ mQueue

MamaQueue* Wombat::MamaBasicSubscription::mQueue
protected

§ mSubscription

mamaSubscription Wombat::MamaBasicSubscription::mSubscription
protected

§ mTransport

MamaTransport* Wombat::MamaBasicSubscription::mTransport
protected