EPAM B2BITS CME MDP Handler C++  5.4.2
Public Member Functions | Protected Member Functions | List of all members
Cme::Mdp::Channel Class Referenceabstract

#include <B2BITS_CmeMdpChannel.h>

Public Member Functions

virtual MarketDataServicegetService () const =0
 
virtual ChannelID getId () const =0
 
virtual const ChannelOptionsgetOptions () const =0
 
virtual ResolvergetResolver ()=0
 
virtual ResolvergetResolver (const std::string &id)=0
 
virtual void getResolvers (ResolverVector *resolverVector)=0
 
virtual ResolverfindResolver (const std::string &id)=0
 
virtual ResolveraddResolver (const std::string &id)=0
 
virtual void removeResolver (const std::string &id)=0
 
virtual void removeResolvers ()=0
 Removes all resolvers from the channel. More...
 
virtual InstrumentgetInstrument (const std::string &symbol)=0
 
virtual InstrumentgetInstrument (InstrumentID id)=0
 
virtual void getInstruments (InstrumentVector &instrumentVector)=0
 
virtual InstrumentfindInstrument (const std::string &symbol)=0
 
virtual InstrumentfindInstrument (InstrumentID id)=0
 
virtual InstrumentaddInstrument (const std::string &symbol, InstrumentID id, const InstrumentOptions &options)=0
 
virtual InstrumentaddInstrument (const std::string &symbol, InstrumentID id, const InstrumentOptions &options, InstrumentBuildOptions instrumentBuildOptions)=0
 
virtual InstrumentaddInstrument (const InstrumentDefinition *instrumentDefinition)=0
 
virtual InstrumentaddInstrument (const InstrumentDefinition *instrumentDefinition, InstrumentBuildOptions instrumentBuildOptions)=0
 
virtual InstrumentaddInstrument (const MessageHeader &message)=0
 
virtual InstrumentaddInstrument (const MessageHeader &message, InstrumentBuildOptions instrumentBuildOptions)=0
 
virtual void removeInstrument (const std::string &symbol)=0
 
virtual void removeInstrument (InstrumentID id)=0
 
virtual void removeInstruments ()=0
 Removes all instruments from the channel. More...
 
virtual bool connectedInstrumentDefinitionData () const =0
 
virtual void connectInstrumentDefinitionData (ChannelDataListener *listener)=0
 
virtual void disconnectInstrumentDefinitionData ()=0
 Disconnects from the instrument definition data feeds of the channel. More...
 
virtual bool connectedSnapshotData () const =0
 
virtual void connectSnapshotData (ChannelDataListener *listener)=0
 
virtual void disconnectSnapshotData ()=0
 Disconnects from the snapshot data feeds of the channel. More...
 
virtual bool connectedIncrementalData () const =0
 
virtual void connectIncrementalData (ChannelDataListener *listener)=0
 
virtual void disconnectIncrementalData ()=0
 Disconnects from the incremental data feeds of the channel. More...
 
virtual void getStatistics (ChannelStatistics &statistics)=0
 
virtual void setTag (Tag tag)=0
 
virtual Tag getTag () const =0
 
virtual void attachListener (ChannelListener *listener)=0
 

Protected Member Functions

virtual ~Channel ()
 

Detailed Description

Channel. Channel object provides access to market data of a particular CME channel. Channel object maintains a collection of resolvers and a collection of instruments.

Constructor & Destructor Documentation

virtual Cme::Mdp::Channel::~Channel ( )
inlineprotectedvirtual

Member Function Documentation

virtual Instrument* Cme::Mdp::Channel::addInstrument ( const std::string &  symbol,
InstrumentID  id,
const InstrumentOptions options 
)
pure virtual

Adds a new instrument to the channel. All instrument build options are enabled.

Parameters
symbolUnique name of the instrument to add.
idUnique id of the instrument to add.
optionsInstrument options.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
virtual Instrument* Cme::Mdp::Channel::addInstrument ( const std::string &  symbol,
InstrumentID  id,
const InstrumentOptions options,
InstrumentBuildOptions  instrumentBuildOptions 
)
pure virtual

Adds a new instrument to the channel.

Parameters
symbolUnique name of the instrument to add.
idUnique id of the instrument to add.
optionsInstrument options.
instrumentBuildOptionsInstrument build options.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
virtual Instrument* Cme::Mdp::Channel::addInstrument ( const InstrumentDefinition instrumentDefinition)
pure virtual

Adds a new instrument to the channel based on an instrument definition object. All instrument build options are enabled.

Parameters
instrumentDefinitionInstrument definition to derive instrument options from.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
Note
This overload is intended to add instrument from Resolver::onEvent callback.
virtual Instrument* Cme::Mdp::Channel::addInstrument ( const InstrumentDefinition instrumentDefinition,
InstrumentBuildOptions  instrumentBuildOptions 
)
pure virtual

Adds a new instrument to the channel based on an instrument definition object.

Parameters
instrumentDefinitionInstrument definition to derive instrument options from.
instrumentBuildOptionsInstrument build options.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
Note
This overload is intended to add instrument from Resolver::onEvent callback.
virtual Instrument* Cme::Mdp::Channel::addInstrument ( const MessageHeader message)
pure virtual

Adds a new instrument to the channel based on an instrument definition message. All instrument build options are enabled.

Parameters
messageInstrument definition (d) message to derive instrument options from.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
Note
This overload is intended to add instrument from Resolver::onMessage callback.
virtual Instrument* Cme::Mdp::Channel::addInstrument ( const MessageHeader message,
InstrumentBuildOptions  instrumentBuildOptions 
)
pure virtual

Adds a new instrument to the channel based on an instrument definition message.

Parameters
messageInstrument definition (d) message to derive instrument options from.
instrumentBuildOptionsInstrument build options.
Returns
Reference to the instrument added.
Exceptions
Generatesexception if the instrument already exists.
Note
This overload is intended to add instrument from Resolver::onMessage callback.
virtual Resolver* Cme::Mdp::Channel::addResolver ( const std::string &  id)
pure virtual

Adds a new resolver to the channel.

Parameters
idUnique id of the resolver to add.
Returns
Reference to the resolver added.
Exceptions
Generatesexception if the resolver already exists.
virtual void Cme::Mdp::Channel::attachListener ( ChannelListener listener)
pure virtual

Attaches event listener. Listener can be assigned only once and cannot be reset.

Parameters
listenerListener
virtual bool Cme::Mdp::Channel::connectedIncrementalData ( ) const
pure virtual

Indicates if the channel incremental data is connected.

Returns
True if the channel incremental data is connected.
virtual bool Cme::Mdp::Channel::connectedInstrumentDefinitionData ( ) const
pure virtual

Indicates if the channel instrument definition data is connected.

Returns
True if the channel instrument definition data is connected.
virtual bool Cme::Mdp::Channel::connectedSnapshotData ( ) const
pure virtual

Indicates if the channel snapshot data is connected.

Returns
True if the channel snapshot data is connected.
virtual void Cme::Mdp::Channel::connectIncrementalData ( ChannelDataListener listener)
pure virtual

Connects to the incremental data feeds of the channel.

Parameters
listenerReference to callback interface to listen to channel data events. The listener must stay alive until the disconnectIncrementalData method is called.
virtual void Cme::Mdp::Channel::connectInstrumentDefinitionData ( ChannelDataListener listener)
pure virtual

Connects to the instrument definition data feeds of the channel.

Parameters
listenerReference to callback interface to listen to channel data events. The listener must stay alive until the disconnectInstrumentDefinitionData method is called.
virtual void Cme::Mdp::Channel::connectSnapshotData ( ChannelDataListener listener)
pure virtual

Connects to the snapshot data feeds of the channel.

Parameters
listenerReference to callback interface to listen to channel data events. The listener must stay alive until the disconnectSnapshotData method is called.
virtual void Cme::Mdp::Channel::disconnectIncrementalData ( )
pure virtual

Disconnects from the incremental data feeds of the channel.

virtual void Cme::Mdp::Channel::disconnectInstrumentDefinitionData ( )
pure virtual

Disconnects from the instrument definition data feeds of the channel.

virtual void Cme::Mdp::Channel::disconnectSnapshotData ( )
pure virtual

Disconnects from the snapshot data feeds of the channel.

virtual Instrument* Cme::Mdp::Channel::findInstrument ( const std::string &  symbol)
pure virtual

Finds instrument by symbol.

Parameters
symbolSymbol of the instrument to return.
Returns
Reference to the instrument. Returns null if the instrument doesn't exist.
virtual Instrument* Cme::Mdp::Channel::findInstrument ( InstrumentID  id)
pure virtual

Finds instrument by id.

Parameters
idId of the instrument to return,
Returns
Reference to the instrument. Returns null if the instrument doesn't exist.
virtual Resolver* Cme::Mdp::Channel::findResolver ( const std::string &  id)
pure virtual

Finds resolver by id.

Parameters
idId of the resolver to return.
Returns
Reference to the resolver. Returns null if the resolver doesn't exist.
virtual ChannelID Cme::Mdp::Channel::getId ( ) const
pure virtual

Returns channel id.

Returns
Id of the channel.
virtual Instrument* Cme::Mdp::Channel::getInstrument ( const std::string &  symbol)
pure virtual

Returns instrument by symbol.

Parameters
symbolSymbol of the instrument to return.
Returns
Reference to the instrument.
Exceptions
Generatesexception if the instrument doesn't exist.
virtual Instrument* Cme::Mdp::Channel::getInstrument ( InstrumentID  id)
pure virtual

Returns instrument by id.

Parameters
idId of the instrument to return,
Returns
Reference to the instrument.
Exceptions
Generatesexception if the instrument doesn't exist.
virtual void Cme::Mdp::Channel::getInstruments ( InstrumentVector instrumentVector)
pure virtual

Returns all instruments of the channel.

Parameters
instrumentVectorVector of instrument references to fill.
virtual const ChannelOptions& Cme::Mdp::Channel::getOptions ( ) const
pure virtual

Returns channel options.

Returns
Options of the channel.
virtual Resolver* Cme::Mdp::Channel::getResolver ( )
pure virtual

Returns default resolver.

Returns
Reference to the default resolver.
virtual Resolver* Cme::Mdp::Channel::getResolver ( const std::string &  id)
pure virtual

Returns resolver by id.

Parameters
idId of the resolver to return.
Returns
Reference to the resolver.
Exceptions
Generatesexception if the resolver doesn't exist.
virtual void Cme::Mdp::Channel::getResolvers ( ResolverVector resolverVector)
pure virtual

Returns all resolvers of the channel.

Parameters
resolverVectorVector of resolver references to fill.
virtual MarketDataService* Cme::Mdp::Channel::getService ( ) const
pure virtual

Returns owning market data service.

Returns
Reference to the market data service instance.
virtual void Cme::Mdp::Channel::getStatistics ( ChannelStatistics statistics)
pure virtual

Returns channel statistics.

Parameters
statisticsReference to ChannelStatistics structure to fill.
virtual Tag Cme::Mdp::Channel::getTag ( ) const
pure virtual

Returns channel user tag.

Returns
Tag value.
virtual void Cme::Mdp::Channel::removeInstrument ( const std::string &  symbol)
pure virtual

Removes instrument from the channel.

Parameters
symbolof the instrument to remove.
virtual void Cme::Mdp::Channel::removeInstrument ( InstrumentID  id)
pure virtual

Removes instrument from the channel.

Parameters
idof the instrument to remove.
virtual void Cme::Mdp::Channel::removeInstruments ( )
pure virtual

Removes all instruments from the channel.

virtual void Cme::Mdp::Channel::removeResolver ( const std::string &  id)
pure virtual

Removes resolver from the channel.

Parameters
idid of the resolver to remove.
virtual void Cme::Mdp::Channel::removeResolvers ( )
pure virtual

Removes all resolvers from the channel.

virtual void Cme::Mdp::Channel::setTag ( Tag  tag)
pure virtual

Assigns user tag to the channel.

Parameters
tagTag value.