OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
API documentation
Loading...
Searching...
No Matches
Handler Class Reference

Public Member Functions

 Handler (const HandlerSettings &handlerSettings)
virtual ~Handler ()
std::string licenseExpirationDate () const
void logDebug (const std::string &message)
void logError (const std::string &message)
void logMessage (const std::string &message)
void logWarning (const std::string &message)
void registerOrderBookChangeListener (OrderBookChangeListener *listener)
void registerOrderBookUpdateListener (OrderBookUpdateListener *listener)
void registerOrderBookBundleUpdateListener (OrderBookBundleUpdateListener *listener)
void registerErrorListener (ErrorListener *listener)
void registerWarningListener (WarningListener *listener)
void registerExchangeListener (ExchangeListener *listener)
void registerFeedListener (FeedListener *listener)
void registerHandlerStateChangeListener (HandlerStateChangeListener *listener)
void registerLogReplayListener (LogReplayListener *listener)
void registerPacketProcessingListener (PacketProcessingListener *listener)
void bindFeedEngine (FeedEngine &feedEngine)
void start (const MarketSubscription &marketSubscription)
void start (const MarketSubscriptions &marketSubscriptions)
void start (const GroupSubscription &groupSubscription)
void start (const GroupSubscriptions &groupSubscriptions)
void stop ()
bool active () const
HandlerStates::Enum state () const
void setTcpSettings (const TcpSettings &tcpSettings)
const TcpSettingsgetTcpSettings () const
void setTcpServerCredentials (const std::string &name, const std::string &username, const std::string &password)

Static Public Member Functions

static const std::string & version ()

Detailed Description

Manipulates ICE iMpact Multicast Price Feeds. Provides flexible services to subscribe to the multicast groups which are best suitable for certain needs.

Definition at line 45 of file Handler.h.

Constructor & Destructor Documentation

◆ Handler()

Handler ( const HandlerSettings & handlerSettings)

Performs instance initialization.

Parameters
handlerSettingsdefines values for various settings which affect handler behavior like enabling logging during execution of the handler.

◆ ~Handler()

virtual ~Handler ( )
virtual

Finalizes the Handler.

Member Function Documentation

◆ active()

bool active ( ) const

Indicates whether subscriptions are being handled.

◆ bindFeedEngine()

void bindFeedEngine ( FeedEngine & feedEngine)

Binds Feed Engine to the Handler.

Handler must be in stopped state.

Exceptions
exceptionin case when Handler is not in configurable state.

◆ getTcpSettings()

const TcpSettings & getTcpSettings ( ) const

Get TCP options.

Returns
TCP settings.

◆ licenseExpirationDate()

std::string licenseExpirationDate ( ) const

Date when license for the Handler will expire.

Date format is YYYYMMDD.

◆ logDebug()

void logDebug ( const std::string & message)

Log a debug message.

◆ logError()

void logError ( const std::string & message)

Log an error message.

◆ logMessage()

void logMessage ( const std::string & message)

Log an information message.

◆ logWarning()

void logWarning ( const std::string & message)

Log a warning message.

◆ registerErrorListener()

void registerErrorListener ( ErrorListener * listener)

Registers the error listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerExchangeListener()

void registerExchangeListener ( ExchangeListener * listener)

Registers the Exchange listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerFeedListener()

void registerFeedListener ( FeedListener * listener)

Registers the feed listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerHandlerStateChangeListener()

void registerHandlerStateChangeListener ( HandlerStateChangeListener * listener)

Registers the Handler state change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerLogReplayListener()

void registerLogReplayListener ( LogReplayListener * listener)

Registers the log replay listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerOrderBookBundleUpdateListener()

void registerOrderBookBundleUpdateListener ( OrderBookBundleUpdateListener * listener)

Registers the order book bundle update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerOrderBookChangeListener()

void registerOrderBookChangeListener ( OrderBookChangeListener * listener)

Registers the order book change listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerOrderBookUpdateListener()

void registerOrderBookUpdateListener ( OrderBookUpdateListener * listener)

Registers the order book update listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerPacketProcessingListener()

void registerPacketProcessingListener ( PacketProcessingListener * listener)

Registers the packet processing listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ registerWarningListener()

void registerWarningListener ( WarningListener * listener)

Registers the warning listener.

Only single instance of listener can be associated with the Handler. Registering new listener removes previous one.

Listeners are to be associated before starting market data processing.

Exceptions
exceptionin case of Handler is in active state.

◆ setTcpServerCredentials()

void setTcpServerCredentials ( const std::string & name,
const std::string & username,
const std::string & password )

Set credentials for a TCP server.

Parameters
nameTCP server name.
usernameUsername.
passwordPassword.

◆ setTcpSettings()

void setTcpSettings ( const TcpSettings & tcpSettings)

Set TCP settings.

Parameters
tcpSettingsNew TCP Settings.

◆ start() [1/4]

void start ( const GroupSubscription & groupSubscription)

Subscribes to the given group. Subscribers are get notified about certain events through previously registered handlers. Notifications will occur until 'stop' member will be called.

Parameters
groupSubscription- subscription attributes for a particular multicast group.
Exceptions
exceptionin case of unable to establish TCP connection.

◆ start() [2/4]

void start ( const GroupSubscriptions & groupSubscriptions)

Subscribes to the given groups. Subscribers are get notified about certain events through previously registered handlers. Notifications will occur until 'stop' member will be called.

Parameters
groupSubscriptions- collection of subscriptions each entry of which defines subscription attributes for a particular group.
Exceptions
exceptionin case of unable to establish TCP connection.

◆ start() [3/4]

void start ( const MarketSubscription & marketSubscription)

Subscribes to the given market. Subscribers are get notified about certain events through previously registered handlers. Notifications will occur until 'stop' member will be called.

Parameters
marketSubscription- subscription attributes for a particular market type.
Exceptions
exceptionin case of unable to establish TCP connection.

◆ start() [4/4]

void start ( const MarketSubscriptions & marketSubscriptions)

Subscribes to the given markets. Subscribers are get notified about certain events through previously registered handlers. Notifications will occur until 'stop' member will be called.

Parameters
marketSubscriptions- collection of subscriptions each entry of which defines subscription attributes for a particular market type.
Exceptions
exceptionin case of unable to establish TCP connection.

◆ state()

HandlerStates::Enum state ( ) const

Get handler state.

◆ stop()

void stop ( )

Interrupts all subscriptions.

◆ version()

const std::string & version ( )
static

Get version of Handler.