B2BITS FIX Antenna C++ 2.33.0
|
Generic application interface. More...
#include <B2BITS_Application.h>
Public Member Functions | |
virtual void | onAfterMessageIsParsed (FIXMessage &msg, const Session &sn) |
Fired after incoming message is parsed and stored in storage. | |
virtual void | onAfterMessageIsReceived (char const *msg, std::size_t msgSize, const Session &sn) |
Fired just after message is received from socket. | |
virtual void | onAfterMessageIsSent (const AfterMessageIsSentEvent &event, const Session &sn) |
Fired after message is sent to socket. | |
virtual void | onAsyncConnectCompleted (int error, const Session &sn) |
Fired when async connect operation has completed. | |
virtual void | onBeforeMessageIsSent (const BeforeMessageIsSentEvent &event, const Session &sn) |
Fired before message is sent to socket. | |
virtual void | onBeforeMessageIsSent (int msgSeqNum, const Session &sn, std::size_t msgCount) |
Fired before message is sent to socket. | |
virtual void | onBeforeMessageIsSerialized (FIXMessage &msg, const Session &sn) |
Fired after outgoing message is validated and before it is stored in the storage and sent to socket. | |
virtual void | onHeartbeatWithTestReqIDEvent (const HeartbeatWithTestReqIDEvent &event, const Session &sn)=0 |
This call-back method is called when a Heartbeat message (MsgType = 0) with the TestReqID field (tag = 112) has been received. | |
virtual void | onIncomingThrottlerTriggered (const IncomingThrottlerTriggeredEvent &event, const Session &sn) |
Fired when one of the incoming throttlers restriction is met. | |
virtual void | onInMsgSeqNumTooLowEvent (const InMsgSeqNumTooLowEvent *event, const Session &sn) |
Faired on incoming message with sequence number too low without PossDupFlag set. | |
virtual void | onInSeqNumChanged (int oldValue, int newValue, const Session &sn) |
Fired just after the incoming seqnum is changed. | |
virtual void | onInvalidResendRequestEvent (const ResendRequestEvent &event, const Session &sn) |
This call-back method is called when a ill-formed Resend Request (MsgType = 2) has been received. | |
virtual void | onLogonEvent (const LogonEvent *event, const Session &sn)=0 |
This call-back method is called to notify that the Logon message has been received from the counterpart. | |
virtual void | onLogoutEvent (const LogoutEvent *event, const Session &sn)=0 |
This call-back method is called to notify that the Logout message has been received from the counterpart or the session was disconnected. | |
virtual void | onMessagePreparedForSending (const FIXMessage &msg, const Session &sn) |
Fired when message is prepared for sending to socket. | |
virtual void | onMsgRejectEvent (const MsgRejectEvent *event, const Session &sn)=0 |
This call-back method is called when a message have to be rejected. | |
virtual void | onNewStateEvent (const NewStateEvent &event, const Session &sn)=0 |
This call-back method is called when the session has changed its state. | |
virtual void | onOutgoingSessionLevelRejectEvent (const OutgoingSessionLevelRejectEvent *event, const Session &sn) |
This call-back method is called when a session-level Reject message (MsgType = 3) is sent. | |
virtual void | onReconnectTryEvent (int remainTries, const Session &sn) |
This call-back method is called each time session tries to reconnect Callback is called in the scope of the session lock. | |
virtual bool | onResend (const FIXMessage &msg, const Session &sn)=0 |
This call-back method is called when an outgoing message is about to be resent as a reply to the incoming ResendRequest message. | |
virtual void | onResendRequestEvent (const ResendRequestEvent &event, const Session &sn)=0 |
This call-back method is called when a Resend Request (MsgType = 2) has been received. | |
virtual bool | onResendRequestLoop (const ResendRequestEvent &event, const Session &sn) |
This call-back method is called when #DuplicateResendRequestLimit ResendRequest messages are received. | |
virtual void | onSequenceGapEvent (const SequenceGapEvent *event, const Session &sn)=0 |
This call-back method is called when a message gap is detected in incoming messages. | |
virtual void | onSessionLevelRejectEvent (const SessionLevelRejectEvent *event, const Session &sn)=0 |
This call-back method is called when a session-level Reject message (MsgType = 3) is received. | |
virtual bool | onSessionLevelRejectWithSeqNumTooHigh (const FIXMessage &msg, const Session &sn) |
Fired when Session Level Reject message is received with the sequence number too high. | |
virtual void | onSwitchConnectionEvent (const SwitchConnectionEvent &event, const Session &sn) |
This call-back method is called when the session is switching to another connection. | |
virtual void | onTerminated (const Session &sn) |
Fired when Session is terminated and all internal threads are stopped. | |
virtual void | onUnableToRouteMessage (const UnableToRouteMessageEvent &event, const Session &sn)=0 |
This call-back method is called when the message has to be routed to the session, which does not exist. | |
virtual void | onUnexpectedMessageEvent (const UnexpectedMessageEvent *event, const Session &aSn) |
This call-back method is called to notify about received unexpected message. | |
virtual bool | process (const FIXMessage &msg, const Session &sn)=0 |
A call-back method to process incoming business level messages. | |
virtual | ~Application () |
Destructor. | |
Generic application interface.
Processes the incoming messages. All user's applications must be inherited from this class.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Fired after incoming message is parsed and stored in storage.
Before any message validation. Callback is called in the scope of the session lock.
msg | the incoming message. |
sn | Reference to FIX session related to the event. |
|
inlinevirtual |
Fired just after message is received from socket.
Callback is called in the scope of the session lock.
[in] | sn | Reference to FIX session related to the event. |
[in] | msg | Pointer to the buffer with message. |
[in] | msgSize | Size of the message buffer. |
|
inlinevirtual |
Fired after message is sent to socket.
Callback is called NOT in the scope of the session lock.
event | Information about occurred event. |
sn | Reference to FIX session related to the event. |
|
inlinevirtual |
Fired when async connect operation has completed.
Callback is called in the scope of the session lock.
[in] | error | Error code of the connect operation, 0 means no error |
[in] | sn | Reference to FIX session related to the event. |
|
virtual |
Fired before message is sent to socket.
Callback is called NOT in the scope of the session lock.
event | Information about occurred event. |
sn | Reference to FIX session related to the event. |
|
inlinevirtual |
Fired before message is sent to socket.
Designed specifically for benchmarks. Callback is called in the scope of the session lock.
[in] | msgSeqNum | Sequence number of the last message to send. |
[in] | sn | Reference to FIX session related to the event. |
[in] | msgCount | Messages count to send |
|
inlinevirtual |
Fired after outgoing message is validated and before it is stored in the storage and sent to socket.
Callback is called in the scope of the session lock.
msg | the incoming message. |
sn | Reference to FIX session related to the event. |
|
pure virtual |
This call-back method is called when a Heartbeat message (MsgType = 0) with the TestReqID field (tag = 112) has been received.
Usually such a message is sent in reply to a Test Request (MsgType = 1) message. Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Fired when one of the incoming throttlers restriction is met.
Callback is called in the scope of the session lock.
[in] | event | Information about occurred event. |
[in] | sn | Reference to FIX session related to the event. |
|
inlinevirtual |
Faired on incoming message with sequence number too low without PossDupFlag set.
If message is processed, InMsgSeqNumTooLowEvent::processed_ should be set to true; otherwise session will be stopped.
|
inlinevirtual |
Fired just after the incoming seqnum is changed.
oldValue | old incoming sequence number |
newValue | new incoming sequence number |
sn | Reference to FIX session related to the event. |
|
inlinevirtual |
This call-back method is called when a ill-formed Resend Request (MsgType = 2) has been received.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
pure virtual |
This call-back method is called to notify that the Logon message has been received from the counterpart.
Callback is called in the scope of the session lock.
If std::exception is raised inside this event, incoming connection will be closed. Exception text will be stored to the engine.log file.
event | Event information. |
sn | The corresponding FIX session. |
|
pure virtual |
This call-back method is called to notify that the Logout message has been received from the counterpart or the session was disconnected.
In case of session disconnect, LogoutEvent::m_pLogoutMsg is null.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Fired when message is prepared for sending to socket.
Callback is called in the scope of the session lock.
[in] | message | Prepared message. |
[in] | sn | Reference to FIX session related to the event. |
|
pure virtual |
This call-back method is called when a message have to be rejected.
event | - object that encapsulates rejected message |
sn | - session object that rejects message |
|
pure virtual |
This call-back method is called when the session has changed its state.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called when a session-level Reject message (MsgType = 3) is sent.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called each time session tries to reconnect Callback is called in the scope of the session lock.
remainTries | The remain reconnect tries count. |
sn | The corresponding FIX session. |
|
pure virtual |
This call-back method is called when an outgoing message is about to be resent as a reply to the incoming ResendRequest message.
If the method returns 'true' then the Engine resends the message to counterpart, otherwise it sends the SequenceReset Gap Fill message. Callback is called in the scope of the session lock.
msg | Outgoing message. |
sn | FIX session. |
|
pure virtual |
This call-back method is called when a Resend Request (MsgType = 2) has been received.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called when #DuplicateResendRequestLimit ResendRequest messages are received.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
pure virtual |
This call-back method is called when a message gap is detected in incoming messages.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
pure virtual |
This call-back method is called when a session-level Reject message (MsgType = 3) is received.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Fired when Session Level Reject message is received with the sequence number too high.
Callback is called in the scope of the session lock.
|
inlinevirtual |
This call-back method is called when the session is switching to another connection.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Fired when Session is terminated and all internal threads are stopped.
[in] | sn | Reference to FIX session related to the event. |
|
pure virtual |
This call-back method is called when the message has to be routed to the session, which does not exist.
Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called to notify about received unexpected message.
For example - when first message in session is not a Logon. Callback is called in the scope of the session lock.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
pure virtual |
A call-back method to process incoming business level messages.
If the application can not process the given message, the FIX Engine will try to deliver it later according to "Delayed Processing Algorithm".
Callback is called out of the scope of the session lock.
msg | the incoming message. |
sn | The corresponding FIX session. |