OpenMAMA
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Wombat::MamaTransport Class Reference

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

#include <MamaTransport.h>

Public Member Functions

 MamaTransport ()
 Construct a MamaTransport.
virtual ~MamaTransport ()
 MamaTransport (mamaTransport cTransport)
 Construct a MamaTransport that wraps a mamaTransport from the C API.
void create (const char *name, mamaBridge bridgeImpl)
 Create a transport.
void setName (const char *name)
 set the transport name.
const char * getName () const
 get the transport name.
const char * getMiddleware () const
 get the middleware name.
double getOutboundThrottle (mamaThrottleInstance instance=MAMA_THROTTLE_DEFAULT) const
 Return the outbound throttle rate in messages/second.
void setOutboundThrottle (double outboundThrottle, mamaThrottleInstance instance=MAMA_THROTTLE_DEFAULT)
 Set the throttle rate for outbound message.
void setTransportTopicCallback (MamaTransportTopicEventCallback *callback)
 Set the transport topic callback.
void setTransportCallback (MamaTransportCallback *callback)
 Set the transport callback.
MamaTransportCallbackgetTransportCallback ()
 Get the transport callback.
void setSymbolMap (const MamaSymbolMap *mapper)
 Set the symbology mapping class.
const MamaSymbolMapgetSymbolMap () const
 Return the symbology mapping class.
void setDescription (const char *description)
 Set the description for the transport.
const char * getDescription () const
 Return the description string for the transport.
MamaConnection * findConnection (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.
bool getInvokeQualityForAllSubscs () const
 Get whether the transport has been set to invoke the quality callback for all subscriptions whenever a data quality event occurs.
mamaQuality getQuality () const
 Get the data quality for the transport.
void requestConflation () const
 Request conflation for the transport.
void requestEndConflation () const
 Request an end to conflation for the transport.
mamaTransport getCValue ()
const mamaTransport getCValue () const
void * getNativeTransport (int index)
 Return the underlying native transport.
void disableRefresh (bool disable)
 Disable refreshing of subscriptions on this transport.

Public Attributes

MamaTransportImpl * mPimpl

Detailed Description

The MamaTransport class provides market data functionality.

Constructor & Destructor Documentation

Wombat::MamaTransport::MamaTransport ( )

Construct a MamaTransport.

Call create to create the transport.

virtual Wombat::MamaTransport::~MamaTransport ( )
virtual
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

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
void Wombat::MamaTransport::setName ( const char *  name)

set the transport name.

The name string is copied by the object.

Parameters
nameThe transport name.
const char* Wombat::MamaTransport::getName ( ) const

get the transport name.

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

get the middleware name.

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

Return the outbound throttle rate in messages/second.

Returns
The throttle rate.
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
void Wombat::MamaTransport::setTransportTopicCallback ( MamaTransportTopicEventCallback callback)

Set the transport topic callback.

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

Set the transport callback.

MamaTransportCallback* Wombat::MamaTransport::getTransportCallback ( )

Get the transport callback.

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

Set the symbology mapping class.

Parameters
mapperA symbol mapping class.
const MamaSymbolMap* Wombat::MamaTransport::getSymbolMap ( ) const

Return the symbology mapping class.

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.
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.
MamaConnection* Wombat::MamaTransport::findConnection ( const char *  IpAddress,
uint16_t  port 
)
virtual void Wombat::MamaTransport::getAllConnections ( MamaConnection **&  list,
uint32_t &  len 
)
virtual
virtual void Wombat::MamaTransport::freeAllConnections ( MamaConnection **  list,
uint32_t  len 
)
virtual
virtual void Wombat::MamaTransport::getAllServerConnections ( MamaServerConnection **&  list,
uint32_t &  len 
)
virtual
virtual void Wombat::MamaTransport::freeAllServerConnections ( MamaServerConnection **  list,
uint32_t &  len 
)
virtual
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
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
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
void Wombat::MamaTransport::requestConflation ( ) const

Request conflation for the transport.

Currently only supported for WMW.

void Wombat::MamaTransport::requestEndConflation ( ) const

Request an end to conflation for the transport.

Currently only supported for WMW.

mamaTransport Wombat::MamaTransport::getCValue ( )
const mamaTransport Wombat::MamaTransport::getCValue ( ) const
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.

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

Disable refreshing of subscriptions on this transport.

Member Data Documentation

MamaTransportImpl* Wombat::MamaTransport::mPimpl

The documentation for this class was generated from the following file:


© 2012 Linux Foundation