OpenMAMA C++ API
Wombat::MamaTransport Class Reference

The MamaTransport class provides market data functionality. More...

#include <MamaTransport.h>

Public Member Functions

 MamaTransport ()
 Construct a MamaTransport. More...
 
virtual ~MamaTransport ()
 
 MamaTransport (mamaTransport cTransport)
 Construct a MamaTransport that wraps a mamaTransport from the C API. More...
 
void create (const char *name, mamaBridge bridgeImpl)
 Create a transport. More...
 
void setName (const char *name)
 set the transport name. More...
 
const char * getName () const
 get the transport name. More...
 
const char * getMiddleware () const
 get the middleware name. More...
 
double getOutboundThrottle (mamaThrottleInstance instance=MAMA_THROTTLE_DEFAULT) const
 Return the outbound throttle rate in messages/second. More...
 
void setOutboundThrottle (double outboundThrottle, mamaThrottleInstance instance=MAMA_THROTTLE_DEFAULT)
 Set the throttle rate for outbound message. More...
 
void setTransportTopicCallback (MamaTransportTopicEventCallback *callback)
 Set the transport topic callback. More...
 
void getTransportCallbackQueue (MamaQueue *queue)
 Set the queue that the app provided for transport callbacks. More...
 
MamaQueuegetTransportCallbackQueue ()
 Get the queue that the app provided for transport callbacks. More...
 
void setTransportCallback (MamaTransportCallback *callback)
 Set the transport callback. More...
 
void setSymbolMap (const MamaSymbolMap *mapper)
 Set the symbology mapping class. More...
 
const MamaSymbolMapgetSymbolMap () const
 Return the symbology mapping class. More...
 
void setDescription (const char *description)
 Set the description for the transport. More...
 
const char * getDescription () const
 Return the description string for the transport. More...
 
MamaConnectionfindConnection (const char *IpAddress, uint16_t port)
 
virtual void getAllConnections (MamaConnection **&list, uint32_t &len)
 
virtual void freeAllConnections (MamaConnection **list, uint32_t len)
 
virtual void getAllServerConnections (MamaServerConnection **&list, uint32_t &len)
 
virtual void freeAllServerConnections (MamaServerConnection **list, uint32_t &len)
 
void setInvokeQualityForAllSubscs (bool invokeQualityForAllSubscs)
 Set whether to invoke the quality callback for all subscriptions whenever a data quality event occurs (the default), or whether to invoke the quality callback only when data subsequently arrives for a subscription. More...
 
bool getInvokeQualityForAllSubscs () const
 Get whether the transport has been set to invoke the quality callback for all subscriptions whenever a data quality event occurs. More...
 
mamaQuality getQuality () const
 Get the data quality for the transport. More...
 
void requestConflation () const
 Request conflation for the transport. More...
 
void requestEndConflation () const
 Request an end to conflation for the transport. More...
 
MamaQueuegetTransportCallbackQueue () const
 Get the queue for the transport callbacks. More...
 
void setTransportCallbackQueue (MamaQueue *queue)
 Set the queue for the transport callbacks. More...
 
mamaTransport getCValue ()
 
const mamaTransport getCValue () const
 
void * getNativeTransport (int index)
 Return the underlying native transport. More...
 
void disableRefresh (bool disable)
 Disable refreshing of subscriptions on this transport. More...
 

Public Attributes

MamaTransportImpl * mPimpl
 

Detailed Description

The MamaTransport class provides market data functionality.

Constructor & Destructor Documentation

§ MamaTransport() [1/2]

Wombat::MamaTransport::MamaTransport ( )

Construct a MamaTransport.

Call create to create the transport.

§ ~MamaTransport()

virtual Wombat::MamaTransport::~MamaTransport ( )
virtual

§ MamaTransport() [2/2]

Wombat::MamaTransport::MamaTransport ( mamaTransport  cTransport)

Construct a MamaTransport that wraps a mamaTransport from the C API.

Mama uses this internally. C++ Applications should create C++ MamaTransport objects through the no-argument constructor, and call MamaTransport::create().

MamaTransport objects created with this method do not deallocate or destroy the underlying c Transport because that responsibility lies with the creator.

Member Function Documentation

§ create()

void Wombat::MamaTransport::create ( const char *  name,
mamaBridge  bridgeImpl 
)

Create a transport.

Platform specific parameters are read from the properties file. The parameters are dependent on the underlying messaging transport.

Parameters
nameThe transport name
bridgeImplThe middleware-specific bridge structure

§ setName()

void Wombat::MamaTransport::setName ( const char *  name)

set the transport name.

The name string is copied by the object.

Parameters
nameThe transport name.

§ getName()

const char* Wombat::MamaTransport::getName ( ) const

get the transport name.

§ getMiddleware()

const char* Wombat::MamaTransport::getMiddleware ( ) const

get the middleware name.

§ getOutboundThrottle()

double Wombat::MamaTransport::getOutboundThrottle ( mamaThrottleInstance  instance = MAMA_THROTTLE_DEFAULT) const

Return the outbound throttle rate in messages/second.

Returns
The throttle rate.

§ setOutboundThrottle()

void Wombat::MamaTransport::setOutboundThrottle ( double  outboundThrottle,
mamaThrottleInstance  instance = MAMA_THROTTLE_DEFAULT 
)

Set the throttle rate for outbound message.

This rate controls the rate at which methods sent with sendWithThrottle (void) are sent. A value of 0.0 disables throttling.

Parameters
outboundThrottleThe rate in messages/second.
instancethe mamaThrottleInstance to use

§ setTransportTopicCallback()

void Wombat::MamaTransport::setTransportTopicCallback ( MamaTransportTopicEventCallback callback)

Set the transport topic callback.

§ getTransportCallbackQueue() [1/3]

void Wombat::MamaTransport::getTransportCallbackQueue ( MamaQueue queue)

Set the queue that the app provided for transport callbacks.

§ getTransportCallbackQueue() [2/3]

MamaQueue* Wombat::MamaTransport::getTransportCallbackQueue ( )

Get the queue that the app provided for transport callbacks.

§ setTransportCallback()

void Wombat::MamaTransport::setTransportCallback ( MamaTransportCallback callback)

Set the transport callback.

§ setSymbolMap()

void Wombat::MamaTransport::setSymbolMap ( const MamaSymbolMap mapper)

Set the symbology mapping class.

Parameters
mapperA symbol mapping class.

§ getSymbolMap()

const MamaSymbolMap* Wombat::MamaTransport::getSymbolMap ( ) const

Return the symbology mapping class.

§ setDescription()

void Wombat::MamaTransport::setDescription ( const char *  description)

Set the description for the transport.

The description string is copied by the object.

Parameters
descriptionThe transport description.

§ getDescription()

const char* Wombat::MamaTransport::getDescription ( ) const

Return the description string for the transport.

Do not alter or free the string returned by this method.

Returns
const char* The transport description.

§ findConnection()

MamaConnection* Wombat::MamaTransport::findConnection ( const char *  IpAddress,
uint16_t  port 
)

§ getAllConnections()

virtual void Wombat::MamaTransport::getAllConnections ( MamaConnection **&  list,
uint32_t &  len 
)
virtual

§ freeAllConnections()

virtual void Wombat::MamaTransport::freeAllConnections ( MamaConnection **  list,
uint32_t  len 
)
virtual

§ getAllServerConnections()

virtual void Wombat::MamaTransport::getAllServerConnections ( MamaServerConnection **&  list,
uint32_t &  len 
)
virtual

§ freeAllServerConnections()

virtual void Wombat::MamaTransport::freeAllServerConnections ( MamaServerConnection **  list,
uint32_t &  len 
)
virtual

§ setInvokeQualityForAllSubscs()

void Wombat::MamaTransport::setInvokeQualityForAllSubscs ( bool  invokeQualityForAllSubscs)

Set whether to invoke the quality callback for all subscriptions whenever a data quality event occurs (the default), or whether to invoke the quality callback only when data subsequently arrives for a subscription.

If set to true, an onQuality callback will be invoked for a subscription whenever a data quality event occurs on the transport, even in between updates for that description. If set to false, the onQuality callback will not be called when the data quality event occurs on the transport. However, it will still be invoked when an update arrives for the subscription.

Parameters
invokeQualityForAllSubscsWhether to invoke quality callback for all subscriptions

§ getInvokeQualityForAllSubscs()

bool Wombat::MamaTransport::getInvokeQualityForAllSubscs ( ) const

Get whether the transport has been set to invoke the quality callback for all subscriptions whenever a data quality event occurs.

Returns
Whether transport has been set to invoke quality callback for all subscriptions

§ getQuality()

mamaQuality Wombat::MamaTransport::getQuality ( ) const

Get the data quality for the transport.

Currently only supported for the Tibco RV middleware. Returns OK for all other middlewares.

Returns
The Quality of the transport

§ requestConflation()

void Wombat::MamaTransport::requestConflation ( ) const

Request conflation for the transport.

Currently only supported for WMW.

§ requestEndConflation()

void Wombat::MamaTransport::requestEndConflation ( ) const

Request an end to conflation for the transport.

Currently only supported for WMW.

§ getTransportCallbackQueue() [3/3]

MamaQueue* Wombat::MamaTransport::getTransportCallbackQueue ( ) const

Get the queue for the transport callbacks.

§ setTransportCallbackQueue()

void Wombat::MamaTransport::setTransportCallbackQueue ( MamaQueue queue)

Set the queue for the transport callbacks.

§ getCValue() [1/2]

mamaTransport Wombat::MamaTransport::getCValue ( )

§ getCValue() [2/2]

const mamaTransport Wombat::MamaTransport::getCValue ( ) const

§ getNativeTransport()

void* Wombat::MamaTransport::getNativeTransport ( int  index)

Return the underlying native transport.

Applications should avoid this method if possible as it may result in non-portable, middleware specific code. Callers must cast the nativeTport to the appropriate type.

Note: this method returns the underlying C construct not a C++ object.

§ disableRefresh()

void Wombat::MamaTransport::disableRefresh ( bool  disable)

Disable refreshing of subscriptions on this transport.

Member Data Documentation

§ mPimpl

MamaTransportImpl* Wombat::MamaTransport::mPimpl