OpenMAMA C++ API
Wombat::MamaBasicWildCardSubscription Class Reference

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

#include <MamaBasicWildCardSubscription.h>

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

Public Member Functions

virtual ~MamaBasicWildCardSubscription ()
 The destructor will call destroy() if the subscription has not already been destroyed. More...
 
 MamaBasicWildCardSubscription (void)
 Constructor. More...
 
virtual void create (MamaTransport *transport, MamaQueue *queue, MamaBasicWildCardSubscriptionCallback *callback, const char *source, const char *topic, void *closure=NULL)
 Create a basic wild card subscription without market data semantics. More...
 
virtual const char * getSymbol (void) const
 Return the symbol for this subscription. More...
 
virtual const char * getSource (void) const
 Return the source for this subscription. More...
 
virtual void * getTopicClosure () const
 Get the closure for the specific wildcard topic. More...
 
virtual void setTopicClosure (void *closure)
 Set the topic closure for the current message's topic. More...
 
virtual void muteCurrentTopic (void)
 For "transport" subscriptions (WMW only) stop processing messages for the current topic. More...
 
virtual MamaBasicWildCardSubscriptionCallbackgetBasicWildCardCallback (void) const
 Return the MamaSubscriptionCallback for this subscription. More...
 
- Public Member Functions inherited from Wombat::MamaBasicSubscription
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...
 

Additional Inherited Members

- Protected Attributes inherited from Wombat::MamaBasicSubscription
void * mClosure
 
MamaQueuemQueue
 
mamaSubscription mSubscription
 
MamaTransportmTransport
 

Detailed Description

The MamaBasicWildCardSubscription 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

§ ~MamaBasicWildCardSubscription()

virtual Wombat::MamaBasicWildCardSubscription::~MamaBasicWildCardSubscription ( )
virtual

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

§ MamaBasicWildCardSubscription()

Wombat::MamaBasicWildCardSubscription::MamaBasicWildCardSubscription ( void  )

Constructor.

Call createBasicWildCard() to activate the subscription.

Member Function Documentation

§ create()

virtual void Wombat::MamaBasicWildCardSubscription::create ( MamaTransport transport,
MamaQueue queue,
MamaBasicWildCardSubscriptionCallback callback,
const char *  source,
const char *  topic,
void *  closure = NULL 
)
virtual

Create a basic wild card subscription without market data semantics.

If the topic is NULL for WMW, this method creates a "transport" subscription that subscribes to all the topics from publishers with the the "publish_name" property equal to the source value.

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.

§ getSymbol()

virtual const char* Wombat::MamaBasicWildCardSubscription::getSymbol ( void  ) const
virtual

Return the symbol for this subscription.

Returns
The topic.

§ getSource()

virtual const char* Wombat::MamaBasicWildCardSubscription::getSource ( void  ) const
virtual

Return the source for this subscription.

Returns
The topic.

§ getTopicClosure()

virtual void* Wombat::MamaBasicWildCardSubscription::getTopicClosure ( ) const
virtual

Get the closure for the specific wildcard topic.

This method may only be called from the onMsg callback.

@ return The closure specified by ::setTopicClosure() or NULL if no topic closure set.

§ setTopicClosure()

virtual void Wombat::MamaBasicWildCardSubscription::setTopicClosure ( void *  closure)
virtual

Set the topic closure for the current message's topic.

This method can only be invoked from the onMsg() callback.

closure The closure.

§ muteCurrentTopic()

virtual void Wombat::MamaBasicWildCardSubscription::muteCurrentTopic ( void  )
virtual

For "transport" subscriptions (WMW only) stop processing messages for the current topic.

§ getBasicWildCardCallback()

virtual MamaBasicWildCardSubscriptionCallback* Wombat::MamaBasicWildCardSubscription::getBasicWildCardCallback ( void  ) const
virtual

Return the MamaSubscriptionCallback for this subscription.

Returns
the callback.