B2BITS FIX Antenna C++  2.27.0
Public Member Functions | Protected Member Functions | List of all members
Spectra::InstrumentListener Class Referenceabstract

Receives instrument related events. More...

#include <B2BITS_SpectraApplicationListeners.h>

+ Inheritance diagram for Spectra::InstrumentListener:
+ Collaboration diagram for Spectra::InstrumentListener:

Public Member Functions

virtual void onBookReset (SpectraSubscriptionItem const &subsItem)=0
 Faired on reset book ((35=X or 35=W) and 269=J) More...
 
virtual void onError (SpectraSubscriptionItem const &subsItem, Engine::AsciiString const &error)=0
 Faired on error (example: when second subscribing was attempt for the same instrument) More...
 
virtual bool onIncrement (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const *const *msgs, size_t incrementsCount)=0
 Fired when update for instrument is available. More...
 
virtual bool onNaturalRefresh (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const *const *nrMsgs, size_t incrementsCount, bool isNewSequence)=0
 Fired when user should reset book with the new values and Natural Refresh is used. More...
 
virtual void onRecoveryStarted (SpectraSubscriptionItem const &subsItem)=0
 Fired when recovery is started. More...
 
virtual void onRecoveryStopped (SpectraSubscriptionItem const &subsItem, RecoveryReason reason)=0
 Fired when recovery is ended. More...
 
virtual void onSnapshot (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const *const *msgs, size_t snapshotsCount)=0
 Fired when user should reset book with the bnew values. More...
 
virtual void onSubscribed (SpectraSubscriptionItem const &subsItem)=0
 Notifies about new subscription. More...
 
virtual void onUnsubscribed (SpectraSubscriptionItem const &subsItem)=0
 Faired when unsubscribed from security description. More...
 
virtual void process (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const *msg)=0
 Faired when information regard to instrument received. More...
 
- Public Member Functions inherited from Spectra::SecurityDefinitionListener
virtual bool onEndSecurityDefinitionSequence ()
 Fired when security definition sequence has ended. More...
 
virtual bool onSecurityDefinition (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const &dMsg)=0
 Fired when security definition message is received. More...
 
virtual void onSecurityDefinitionUpdate (SpectraSubscriptionItem const &subsItem, Engine::FIXMessage const &dMsg)=0
 Fired when security definition update message is received. More...
 
- Public Member Functions inherited from Utils::ReferenceCounter
virtual bool addRef () const throw ()
 Increments reference counter. More...
 
virtual long getNRef () const throw ()
 Returns the current value of the reference counter. More...
 
 ReferenceCounter () throw ()
 Constructor. More...
 
virtual long release () const throw ()
 Decrements reference counter. More...
 

Protected Member Functions

virtual ~InstrumentListener ()
 
- Protected Member Functions inherited from Spectra::SecurityDefinitionListener
virtual ~SecurityDefinitionListener ()
 Destructor. More...
 
- Protected Member Functions inherited from Utils::ReferenceCounter
long decrement () const throw ()
 Decrements counter and returns new counter value. More...
 
long increment () const throw ()
 Increments counter and returns new counter value. More...
 
virtual ~ReferenceCounter ()
 Destructor. More...
 

Detailed Description

Receives instrument related events.

Constructor & Destructor Documentation

◆ ~InstrumentListener()

virtual Spectra::InstrumentListener::~InstrumentListener ( )
inlineprotectedvirtual

Member Function Documentation

◆ onBookReset()

virtual void Spectra::InstrumentListener::onBookReset ( SpectraSubscriptionItem const &  subsItem)
pure virtual

Faired on reset book ((35=X or 35=W) and 269=J)

Parameters
subsItemDescription of the instrument

◆ onError()

virtual void Spectra::InstrumentListener::onError ( SpectraSubscriptionItem const &  subsItem,
Engine::AsciiString const &  error 
)
pure virtual

Faired on error (example: when second subscribing was attempt for the same instrument)

Parameters
subsItemDescription of the instrument
errortext message which describes the error

◆ onIncrement()

virtual bool Spectra::InstrumentListener::onIncrement ( SpectraSubscriptionItem const &  subsItem,
Engine::FIXMessage const *const *  msgs,
size_t  incrementsCount 
)
pure virtual

Fired when update for instrument is available.

Parameters
subsItemDescription of the instrument
msgsIncrement container with group entry inside Market Data - Incremental Refresh message assigned to instrument.
incrementsCountIncrements count into Msgs
Returns
false if book need start recovery, otherwise true
Note
it is possible that last message in msgs contains LastFragment==0 (in case when FIX message with LastFragment==1 doesn't contain updates for this subsItem)

◆ onNaturalRefresh()

virtual bool Spectra::InstrumentListener::onNaturalRefresh ( SpectraSubscriptionItem const &  subsItem,
Engine::FIXMessage const *const *  nrMsgs,
size_t  incrementsCount,
bool  isNewSequence 
)
pure virtual

Fired when user should reset book with the new values and Natural Refresh is used.

Parameters
subsItemDescription of the instrument
nrMsgsIncrement container with group entry inside Market Data - Incremental Refresh message assigned to instrument.
incrementsCountIncrements count into NRMsgs
isNewSequenceIf is true that NRMsgs contains new sequence of increments, otherwise NRMsgs contains continuation of previosly received increments sequence.
Returns
true if book is recovered otherwise false

◆ onRecoveryStarted()

virtual void Spectra::InstrumentListener::onRecoveryStarted ( SpectraSubscriptionItem const &  subsItem)
pure virtual

Fired when recovery is started.

Parameters
subsItemDescription of the instrument

◆ onRecoveryStopped()

virtual void Spectra::InstrumentListener::onRecoveryStopped ( SpectraSubscriptionItem const &  subsItem,
RecoveryReason  reason 
)
pure virtual

Fired when recovery is ended.

Parameters
subsItemDescription of the instrument
reasonReason of recovery

◆ onSnapshot()

virtual void Spectra::InstrumentListener::onSnapshot ( SpectraSubscriptionItem const &  subsItem,
Engine::FIXMessage const *const *  msgs,
size_t  snapshotsCount 
)
pure virtual

Fired when user should reset book with the bnew values.

Parameters
subsItemDescription of the instrument
msgsSnapshots container
snapshotsCountSnapshots count into Msgs

◆ onSubscribed()

virtual void Spectra::InstrumentListener::onSubscribed ( SpectraSubscriptionItem const &  subsItem)
pure virtual

Notifies about new subscription.

Fired when user calls Spectra::MDApplication::subscribe methods.

Parameters
subsItemDescription of the instrument

◆ onUnsubscribed()

virtual void Spectra::InstrumentListener::onUnsubscribed ( SpectraSubscriptionItem const &  subsItem)
pure virtual

Faired when unsubscribed from security description.

Parameters
subsItemDescription of the instrument

◆ process()

virtual void Spectra::InstrumentListener::process ( SpectraSubscriptionItem const &  subsItem,
Engine::FIXMessage const *  msg 
)
pure virtual

Faired when information regard to instrument received.

Parameters
subsItemDescription of the instrument
msgIncoming FIX Message
Note
UDS Instrument Delete message will be passed to this event handler as well