OpenMAMA
Wombat::MamdaOptionChainListener Class Reference

MamdaOptionChainListener is a class that specializes in handling and managing option chain updates. More...

#include <MamdaOptionChainListener.h>

Inheritance diagram for Wombat::MamdaOptionChainListener:
Wombat::MamdaMsgListener Wombat::MamdaOptionSeriesUpdate Wombat::MamdaBasicEvent

Public Member Functions

 MamdaOptionChainListener (const char *underlyingSymbol)
 Create a specialized option chain listener.
 MamdaOptionChainListener (MamdaOptionChain *chain)
 Create a specialized option chain listener.
virtual ~MamdaOptionChainListener ()
 Destructor.
void setManditoryFields (bool expireDate, bool strikePrice, bool putCall)
 Call this function to control whether or not option contracts, which are missing expireDate, strikePrice, or putCall fields are exposed to the user app by calling the registered onOptionContractCreate(..) callbacks.
void addHandler (MamdaOptionChainHandler *handler)
 Add a specialized option chain handler.
MamdaOptionChaingetOptionChain ()
 Return the option chain associated with this listener.
const char * getSymbol () const
 Get the instruments string symbol.
const char * getPartId () const
 Get the participant identifier.
void onMsg (MamdaSubscription *subscription, const MamaMsg &msg, short msgType)
 Implementation of MamdaListener interface.
const MamaDateTime & getSrcTime () const
 Get the source time.
const MamaDateTime & getActivityTime () const
 Get the activity time.
const MamaDateTime & getLineTime () const
 Get the line time.
const MamaDateTime & getSendTime () const
 Get the send time.
const MamaMsgQual & getMsgQual () const
 Get the message qualifier.
const MamaDateTime & getEventTime () const
 Get the event time.
mama_seqnum_t getEventSeqNum () const
 Get the event sequence number.
MamdaOptionContractgetOptionContract () const
char getOptionAction () const
 Return the action related to the last series update message.
MamdaFieldState getSymbolFieldState () const
 Get the string symbol field state.
MamdaFieldState getPartIdFieldState () const
 Get the participant identifier field state.
MamdaFieldState getEventSeqNumFieldState () const
 Get the event sequence number field state.
MamdaFieldState getEventTimeFieldState () const
 Get the event time field state.
MamdaFieldState getSrcTimeFieldState () const
 Get the source time field state.
MamdaFieldState getActivityTimeFieldState () const
 Get the activity time field state.
MamdaFieldState getLineTimeFieldState () const
 Get the line time of the update.
MamdaFieldState getSendTimeFieldState () const
 Get the send time field state.
MamdaFieldState getMsgQualFieldState () const
 Get the message qualifier field state.
- Public Member Functions inherited from Wombat::MamdaMsgListener
virtual ~MamdaMsgListener ()

Additional Inherited Members

- Static Public Attributes inherited from Wombat::MamdaOptionSeriesUpdate
static const char ACTION_UNKNOWN = ' '
static const char ACTION_ADD = 'A'
static const char ACTION_DELETE = 'D'

Detailed Description

MamdaOptionChainListener is a class that specializes in handling and managing option chain updates.

Developers provide their own implementation of the MamdaOptionChainHandler interface and will be delivered notifications for various types of options-related events.

Constructor & Destructor Documentation

Wombat::MamdaOptionChainListener::MamdaOptionChainListener ( const char *  underlyingSymbol)

Create a specialized option chain listener.

This listener handles option chain updates.

Parameters
underlyingSymbolThe underlying symbol for the option chain.
Wombat::MamdaOptionChainListener::MamdaOptionChainListener ( MamdaOptionChain chain)

Create a specialized option chain listener.

This listener handles option chain updates.

Parameters
chainThe option chain object.
virtual Wombat::MamdaOptionChainListener::~MamdaOptionChainListener ( )
virtual

Destructor.

Member Function Documentation

void Wombat::MamdaOptionChainListener::setManditoryFields ( bool  expireDate,
bool  strikePrice,
bool  putCall 
)

Call this function to control whether or not option contracts, which are missing expireDate, strikePrice, or putCall fields are exposed to the user app by calling the registered onOptionContractCreate(..) callbacks.

Passing a value of false will allow contracts without the particular field to be exposed, passing a value of true will ensure options without this field will not reach the user app. By default all three fields are considered mandatory.

Parameters
expireDateWhether the expiration date is mandatory.
strikePriceWhether the strikePrice is mandatory.
putCallWhether the put/call indicator is mandatory.
void Wombat::MamdaOptionChainListener::addHandler ( MamdaOptionChainHandler handler)

Add a specialized option chain handler.

Currently, only one handler can (and must) be registered.

Parameters
handlerAn instance of the handler which will receive callback updates for activity on the option chain.
MamdaOptionChain& Wombat::MamdaOptionChainListener::getOptionChain ( )

Return the option chain associated with this listener.

Returns
The option chain being maintained by this listener instance.
const char* Wombat::MamdaOptionChainListener::getSymbol ( ) const
virtual

Get the instruments string symbol.

Returns
Symbol. This is the "well-known" symbol for the security, including any symbology mapping performed by the publisher.

Implements Wombat::MamdaBasicEvent.

const char* Wombat::MamdaOptionChainListener::getPartId ( ) const
virtual

Get the participant identifier.

Returns
Participant ID. This may be an exchange identifier, a market maker ID, etc., or NULL (if this is not related to any specific participant).

Implements Wombat::MamdaBasicEvent.

void Wombat::MamdaOptionChainListener::onMsg ( MamdaSubscription subscription,
const MamaMsg &  msg,
short  msgType 
)
virtual

Implementation of MamdaListener interface.

Implements Wombat::MamdaMsgListener.

const MamaDateTime& Wombat::MamdaOptionChainListener::getSrcTime ( ) const
virtual

Get the source time.

Returns
Source time. Typically, the exchange generated feed time stamp. This is often the same as the "event time", because many feeds do not distinguish between the actual event time and when the exchange sent the message.

Implements Wombat::MamdaBasicEvent.

const MamaDateTime& Wombat::MamdaOptionChainListener::getActivityTime ( ) const
virtual

Get the activity time.

Returns
Activity time. A feed handler generated time stamp representing when the data item was last updated.

Implements Wombat::MamdaBasicEvent.

const MamaDateTime& Wombat::MamdaOptionChainListener::getLineTime ( ) const
virtual

Get the line time.

Returns
Line time. A feed handler (or similar publisher) time stamp representing the time that such publisher received the update message pertaining to the event. If clocks are properly synchronized and the source time (see above) is accurate enough, then the difference between the source time and line time is the latency between the data source and the feed handler.

Implements Wombat::MamdaBasicEvent.

const MamaDateTime& Wombat::MamdaOptionChainListener::getSendTime ( ) const
virtual

Get the send time.

Returns
Send time. A feed handler (or similar publisher) time stamp representing the time that such publisher sent the current message. The difference between the line time and send time is the latency within the feed handler itself. Also, if clocks are properly synchronized then the difference between the send time and current time is the latency within the market data distribution framework (i.e. MAMA and the underlying middleware). See MAMA API: MamaDateTime::currentTime()).

Implements Wombat::MamdaBasicEvent.

const MamaMsgQual& Wombat::MamdaOptionChainListener::getMsgQual ( ) const
virtual

Get the message qualifier.

Returns
Message Qualifier. The message qualifier provides information in relation to messages duplicate, delayed or out-of-sequence status.

Implements Wombat::MamdaBasicEvent.

const MamaDateTime& Wombat::MamdaOptionChainListener::getEventTime ( ) const
virtual

Get the event time.

Returns
Event time. Typically, when the event actually occurred. This is often the same as the "source time", because many feeds do not distinguish between the actual event time and when the exchange sent the message.

Implements Wombat::MamdaBasicEvent.

mama_seqnum_t Wombat::MamdaOptionChainListener::getEventSeqNum ( ) const
virtual

Get the event sequence number.

Returns
Source sequence number. The exchange generated sequence number.

Implements Wombat::MamdaBasicEvent.

MamdaOptionContract* Wombat::MamdaOptionChainListener::getOptionContract ( ) const
Returns
The option contract to which the most recent event applies. If the contract is new, it will have already been added to the chain. If it is being removed, it will have already been removed from the chain.

Reimplemented from Wombat::MamdaOptionSeriesUpdate.

char Wombat::MamdaOptionChainListener::getOptionAction ( ) const

Return the action related to the last series update message.

Returns
The action related to the last series update message.

Reimplemented from Wombat::MamdaOptionSeriesUpdate.

MamdaFieldState Wombat::MamdaOptionChainListener::getSymbolFieldState ( ) const
virtual

Get the string symbol field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getPartIdFieldState ( ) const
virtual

Get the participant identifier field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getEventSeqNumFieldState ( ) const
virtual

Get the event sequence number field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getEventTimeFieldState ( ) const
virtual

Get the event time field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getSrcTimeFieldState ( ) const
virtual

Get the source time field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getActivityTimeFieldState ( ) const
virtual

Get the activity time field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getLineTimeFieldState ( ) const
virtual

Get the line time of the update.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getSendTimeFieldState ( ) const
virtual

Get the send time field state.

Returns
MamdaFieldState. An enumeration representing field state.

Implements Wombat::MamdaBasicEvent.

MamdaFieldState Wombat::MamdaOptionChainListener::getMsgQualFieldState ( ) const
virtual

Get the message qualifier field state.

Returns
Message Qualifier. The message qualifier provides information in relation to messages duplicate, delayed or out-of-sequence status.

Implements Wombat::MamdaBasicEvent.


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


© 2012 Linux Foundation