A MamdaBasicSubscription is used to register interest in a particular symbol. More...
#include <MamdaBasicSubscription.h>
Public Member Functions | |
MamdaBasicSubscription () | |
~MamdaBasicSubscription () | |
void | create (MamaTransport *transport, MamaQueue *queue, const char *symbol, void *closure=NULL) |
Create and activate the subscription. | |
void | setTimeout (double timeout) |
Set the subscription timeout (in seconds). | |
void | addMsgListener (MamdaBasicMsgListener *listener) |
Add a listener for regular messages. | |
void | addQualityListener (MamdaBasicQualityListener *listener) |
Add a listener for changes in quality status. | |
void | addErrorListener (MamdaBasicErrorListener *listener) |
Add a listener for error events. | |
void | activate () |
Activate the subscription. | |
void | deactivate () |
Deactivate the subscription. | |
void | setSymbol (const char *symbol) |
Set the symbol for the subscription. | |
const char * | getSymbol () const |
Get the symbol for the subscription. | |
void | setClosure (void *closure) |
Set the closure for the subscription. | |
void * | getClosure () const |
Get the additional object passed as the closure to the create() method. | |
void | setTransport (MamaTransport *transport) |
Set the MAMA transport. | |
MamaTransport * | getTransport () const |
Get the MamaTransport for this subscription. | |
void | setQueue (MamaQueue *queue) |
Set the MAMA queue. | |
MamaQueue * | getQueue () const |
Get the MAMA queue for this subscription. |
A MamdaBasicSubscription is used to register interest in a particular symbol.
A MamaTransport is required to actually activate the subscription.
Multiple listeners can be added to the MamdaBasicSubscription. In this way, an application can make use of more than one of the specialized value added MAMDA listeners, such as MamdaCalcListener
Wombat::MamdaBasicSubscription::MamdaBasicSubscription | ( | ) |
Wombat::MamdaBasicSubscription::~MamdaBasicSubscription | ( | ) |
void Wombat::MamdaBasicSubscription::create | ( | MamaTransport * | transport, |
MamaQueue * | queue, | ||
const char * | symbol, | ||
void * | closure = NULL |
||
) |
Create and activate the subscription.
You can alternatively set all objects and properties and then call activate is you wish.
void Wombat::MamdaBasicSubscription::setTimeout | ( | double | timeout | ) |
Set the subscription timeout (in seconds).
Do this before calling activate().
void Wombat::MamdaBasicSubscription::addMsgListener | ( | MamdaBasicMsgListener * | listener | ) |
Add a listener for regular messages.
void Wombat::MamdaBasicSubscription::addQualityListener | ( | MamdaBasicQualityListener * | listener | ) |
Add a listener for changes in quality status.
void Wombat::MamdaBasicSubscription::addErrorListener | ( | MamdaBasicErrorListener * | listener | ) |
Add a listener for error events.
void Wombat::MamdaBasicSubscription::activate | ( | ) |
Activate the subscription.
Until this method is invoked, no updates will be received. Is called by create().
void Wombat::MamdaBasicSubscription::deactivate | ( | ) |
Deactivate the subscription.
No more updates will be received for this subscription (unless activate() is invoked again).
void Wombat::MamdaBasicSubscription::setSymbol | ( | const char * | symbol | ) |
Set the symbol for the subscription.
Do this before calling activate().
const char* Wombat::MamdaBasicSubscription::getSymbol | ( | ) | const |
Get the symbol for the subscription.
void Wombat::MamdaBasicSubscription::setClosure | ( | void * | closure | ) |
Set the closure for the subscription.
Do this before calling activate().
void* Wombat::MamdaBasicSubscription::getClosure | ( | ) | const |
Get the additional object passed as the closure to the create() method.
void Wombat::MamdaBasicSubscription::setTransport | ( | MamaTransport * | transport | ) |
Set the MAMA transport.
Do this before calling activate().
MamaTransport* Wombat::MamdaBasicSubscription::getTransport | ( | ) | const |
Get the MamaTransport for this subscription.
void Wombat::MamdaBasicSubscription::setQueue | ( | MamaQueue * | queue | ) |
Set the MAMA queue.
Do this before calling activate().
MamaQueue* Wombat::MamdaBasicSubscription::getQueue | ( | ) | const |
Get the MAMA queue for this subscription.