EPAM B2BITS ICE Impact Handler C++  1.1.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Functions
UDP Unit Service Management API

Classes

class  IceImpact::UnitService
 Represents UDP Multicast Service (one UDP multicast group with live data) More...
 

Functions

virtual const RuntimeParameters & IceImpact::Application::getParams () const =0
 Returns default runtime parameters. More...
 
virtual const RuntimeParameters & IceImpact::Application::getServiceParams (const std::string &channelId, BookDepth bookDepth) const =0
 Returns channel options. More...
 
virtual void IceImpact::Application::setServiceParams (const std::string &channelId, BookDepth bookDepth, const RuntimeParameters &params)=0
 Overrides application options for channel. More...
 
virtual unsigned IceImpact::Application::getServicesCount () const =0
 Returns the number of created services. More...
 
virtual UnitService * IceImpact::Application::createService (const std::string &channelId, BookDepth bookDepth, const std::string &iface="", const RuntimeParameters *params=NULL)=0
 Creates service by channel id. More...
 
virtual void IceImpact::Application::createServices (const std::string &iface="", bool preferFullyImplied=true, const RuntimeParameters *params=NULL)=0
 Creates all services specified in configuration file. More...
 
virtual UnitService * IceImpact::Application::getService (unsigned index) const =0
 Returns service by index. More...
 
virtual UnitService * IceImpact::Application::getService (const std::string &channelId, BookDepth bookDepth) const =0
 Returns service by channel and book depth. More...
 
virtual UnitService * IceImpact::Application::getService (IceImpact::Int32 marketID, bool useFullImplied, BookDepth bookDepth, bool createAndConnect)=0
 Returns service by marketID market specification and book depth. More...
 
virtual UnitService * IceImpact::Application::getService (const std::string &symbol, bool useFullImplied, BookDepth bookDepth, bool createAndConnect)=0
 Returns service by symbol specification and book depth. More...
 
virtual UnitService * IceImpact::Application::getService (const RequestMarketType &requestMarketType, bool useFullImplied, BookDepth bookDepth, bool createAndConnect)=0
 Returns service by symbol specification and book depth. More...
 
virtual const std::string IceImpact::Application::findChannelId (IceImpact::MarketID marketID, bool useFullImplied)=0
 Finds channel by marketID and fully implied parameter. More...
 
virtual const std::string IceImpact::Application::findChannelId (const std::string &symbol, bool useFullImplied)=0
 Finds channel by symbol and fully implied parameter. More...
 
virtual const std::string IceImpact::Application::findChannelId (const RequestMarketType &requestMarketType, bool useFullImplied)=0
 Finds channel by marketID and fully implied parameter. More...
 
virtual void IceImpact::Application::suspend ()=0
 
virtual void IceImpact::Application::resume ()=0
 

Detailed Description

Function Documentation

virtual UnitService* IceImpact::Application::createService ( const std::string &  channelId,
BookDepth  bookDepth,
const std::string &  iface = "",
const RuntimeParameters params = NULL 
)
pure virtual

Creates service by channel id.

Parameters
channelIdId of the channel, corresponds to <multicastGroup name="the name"> in XML file
bookDepthdepth of book to use
ifaceAddress of a local network interface to use when subscribing to multicast feed
paramsRuntime parameters; when specified, will override current channel's parameters
Returns
pointer to created IceImpact::UnitService
Exceptions
std::exceptionif error occurs, usually if service has been misconfigured
Note
If service has already been created, this method just returns the pointer to it
virtual void IceImpact::Application::createServices ( const std::string &  iface = "",
bool  preferFullyImplied = true,
const RuntimeParameters params = NULL 
)
pure virtual

Creates all services specified in configuration file.

Logs error message if some of the service have not been created

Parameters
ifaceAddress of a local network interface to use when subscribing to multicast feed
preferFullyImpliedwhatever to prefer fully implied to regular group. If there is no fully implied group then it falls back to regular group. Default value is true.
params- RuntimeParameters. If specified, this overrides default channel parameters
Exceptions
no
virtual const std::string IceImpact::Application::findChannelId ( IceImpact::MarketID  marketID,
bool  useFullImplied 
)
pure virtual

Finds channel by marketID and fully implied parameter.

Parameters
marketIDId of the market
useFullImpliedwhatever multicast group is "full implied"
Returns
channel Id string, corresponds to <multicastGroup name="the name"> from XML file
Exceptions
std::runtime_error
virtual const std::string IceImpact::Application::findChannelId ( const std::string &  symbol,
bool  useFullImplied 
)
pure virtual

Finds channel by symbol and fully implied parameter.

Parameters
symbolId of the market
useFullImpliedwhatever multicast group is "full implied"
Returns
channel Id string, corresponds to <multicastGroup name="the name"> from XML file
Exceptions
std::runtime_error
virtual const std::string IceImpact::Application::findChannelId ( const RequestMarketType requestMarketType,
bool  useFullImplied 
)
pure virtual

Finds channel by marketID and fully implied parameter.

Parameters
requestMarketTypemarket type to use
useFullImpliedwhatever multicast group is "full implied"
Returns
channel Id string, corresponds to <multicastGroup name="the name"> from XML file
Exceptions
std::runtime_error
virtual const RuntimeParameters& IceImpact::Application::getParams ( ) const
pure virtual

Returns default runtime parameters.

Service management API

A Service represents a UDP mcast group with live data and corresponding UDP mcast group with snapshot data Service is identified by [channelId, BookDepth] pair; channelId corresponds to <multicastGroup name="the name"> from XML file, for example: "ICE Futures Europe Non Oil FI".

The use of Service management API is fully optional, methods like subscribeToInstrument() will launch the corresponding Services automatically.

Returns
const reference to RuntimeParameters passed to Engine::createIceImpactApplication
Exceptions
no
virtual UnitService* IceImpact::Application::getService ( unsigned  index) const
pure virtual

Returns service by index.

Returns a service

Parameters
indexZero-based index of service, must be < getServicesCount()
Returns
pointer to IceImpact::UnitService or NULL if index is invalid
Exceptions
no
virtual UnitService* IceImpact::Application::getService ( const std::string &  channelId,
BookDepth  bookDepth 
) const
pure virtual

Returns service by channel and book depth.

Parameters
channelIdId of the channel, corresponds to <multicastGroup name="the name"> in XML file
bookDepthdepth of book to use
Returns
pointer to IceImpact::UnitService or NULL if service has not been created yet
Exceptions
no
virtual UnitService* IceImpact::Application::getService ( IceImpact::Int32  marketID,
bool  useFullImplied,
BookDepth  bookDepth,
bool  createAndConnect 
)
pure virtual

Returns service by marketID market specification and book depth.

Parameters
marketIDId of the market
useFullImpliedwhatever multicast group is fully implied
bookDepthdepth of book to use
createAndConnectwhatever to create and connect to service if it is not already created
Returns
pointer to IceImpact::UnitService or NULL if service has not been created yet
Exceptions
no
virtual UnitService* IceImpact::Application::getService ( const std::string &  symbol,
bool  useFullImplied,
BookDepth  bookDepth,
bool  createAndConnect 
)
pure virtual

Returns service by symbol specification and book depth.

Parameters
symbolsymbol to use
useFullImpliedwhatever multicast group is fully implied
bookDepthdepth of book to use
createAndConnectwhatever to create and connect to service if it is not already created
Returns
pointer to IceImpact::UnitService or NULL if service has not been created yet
Exceptions
no
virtual UnitService* IceImpact::Application::getService ( const RequestMarketType requestMarketType,
bool  useFullImplied,
BookDepth  bookDepth,
bool  createAndConnect 
)
pure virtual

Returns service by symbol specification and book depth.

Parameters
requestMarketTypemarket type to use
useFullImpliedwhatever multicast group is fully implied
bookDepthdepth of book to use
createAndConnectwhatever to create and connect to service if it is not already created
Returns
pointer to IceImpact::UnitService or NULL if service has not been created yet
Exceptions
no
virtual const RuntimeParameters& IceImpact::Application::getServiceParams ( const std::string &  channelId,
BookDepth  bookDepth 
) const
pure virtual

Returns channel options.

Parameters
channelIdId of the channel, corresponds to <multicastGroup name="the name"> in XML file
bookDepthdepth of book to use
Returns
a set of RuntimeParameters used in a particular channel (UDP mcast group)
Exceptions
std::exceptionif error occurs
virtual unsigned IceImpact::Application::getServicesCount ( ) const
pure virtual

Returns the number of created services.

A single service instance can be obtained then by using getService(unsigned index) method

Exceptions
no
virtual void IceImpact::Application::resume ( )
pure virtual
Exceptions
no
virtual void IceImpact::Application::setServiceParams ( const std::string &  channelId,
BookDepth  bookDepth,
const RuntimeParameters params 
)
pure virtual

Overrides application options for channel.

Parameters
channelIdId of the channel, corresponds to <multicastGroup name="the name"> in XML file
bookDepthdepth of book to use
aset of RuntimeParameters to override defaults for a particular channel
Exceptions
std::exceptionif error occurs
virtual void IceImpact::Application::suspend ( )
pure virtual
Exceptions
no