B2BITS FIX Antenna HFT
1.0.16
|
Generic application interface. More...
#include <B2BITS_Application.h>
Public Member Functions | |
virtual bool | onAdminCommand (const Session &sn, const AdminCommand commandCode, const std::string &commandText, std::string &rejectReason) |
Faired when an admin command is received. More... | |
virtual void * | onAfterMessageIsReceived (char const *msg, std::size_t msgSize, const Session &sn) |
Faired just after message is received from socket. More... | |
virtual void | onAsyncConnectCompleted (int error, const Session &sn) |
Fired when async connect operation has completed. More... | |
virtual void | onBeforeLogonIsSerialized (FIXMessage &msg, const Session &sn) |
The callback is called before the Logon message is serialized for sending. More... | |
virtual void | onBeforeMessageIsSent (int msgSeqNum, const Session &sn, std::size_t msgCount) |
virtual bool | onBeforeStoreAndForward (const Engine::FIXMessage &fixMsg, char const *msg, size_t msgSize, const Session &sn) |
Faired just before the message is stored to an output log file. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | onMessagePreparedForSending (const FIXMessage &msg, const Session &sn) |
Faired when message is prepared for sending to socket. More... | |
virtual void | onMsgRejectEvent (const MsgRejectEvent *event, const Session &sn)=0 |
This call-back method is called when a message have to be rejected. More... | |
virtual void | onNewStateEvent (const NewStateEvent &event, const Session &sn)=0 |
This call-back method is called when the session has changed its state. More... | |
virtual void | onReconnectTryEvent (int remainTries, const Session &sn) |
This call-back method is called each time session tries to reconnect. More... | |
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. More... | |
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. More... | |
virtual bool | onResendRequestLoop (const ResendRequestEvent &event, const Session &sn) |
This call-back method is called when #DuplicateResendRequestLimit ResendRequest messages are received. More... | |
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. More... | |
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. More... | |
virtual bool | onSessionLevelRejectEvent (Engine::FIXMessageProcessElem *work, const Session &sn) |
This call-back method is called when a session-level Reject message (MsgType = 3) is received. More... | |
virtual bool | onSessionLevelRejectWithSeqNumTooHigh (const FIXMessage &msg, const Session &sn) |
Faired when Session Level Reject message is received with the sequence number too high. More... | |
virtual void | onSwitchConnectionEvent (const SwitchConnectionEvent &event, const Session &sn) |
This call-back method is called when the session is switching to another connection. More... | |
virtual void | onTerminated (const Session &sn) |
Faired when Session is terminated and all internal threads are stopped. More... | |
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. More... | |
virtual void | onUnexpectedMessageEvent (const UnexpectedMessageEvent *event, const Session &aSn) |
This call-back method is called to notify about received unexpected message. More... | |
virtual bool | process (const FIXMessage &msg, const Session &sn)=0 |
The call-back method to process incoming messages. More... | |
virtual bool | process (Engine::FIXMessageProcessElem *work, const Engine::Session &sn) |
The call-back method to process incoming messages. More... | |
virtual | ~Application () |
Destructor. More... | |
Generic application interface.
Processes the incoming messages. All user's applications must be inherited from this class.
|
inlinevirtual |
Destructor.
|
inlinevirtual |
Faired when an admin command is received.
[in] | sn | is a reference to a session, the admin command refers to |
[in] | commandCode | is a code of the admin command |
[in] | commandText | is a text representation of the command |
[out] | rejectReason | is a short description why the command is rejected |
|
inlinevirtual |
Faired just after message is received from socket.
[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. |
References B2B_USE_ARG.
|
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. |
|
inlinevirtual |
The callback is called before the Logon message is serialized for sending.
The callback can be used for Logon message customization.
msg | Logon message |
sn | Reference to FIX session sending the Logon message. |
References B2B_USE_ARG.
|
inlinevirtual |
The callback is called before the message is sent to socket. Designed specifically for benchmarks.
msgSeqNum | Sequence number of the sent message. |
sn | Reference to FIX session related to the event. |
msgCount | Messages count to send |
References B2B_USE_ARG.
|
inlinevirtual |
Faired just before the message is stored to an output log file.
|
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.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called when a ill-formed Resend Request (MsgType = 2) has been received.
event | Information about occurred event. |
sn | The corresponding FIX session. |
References B2B_USE_ARG.
|
pure virtual |
This call-back method is called to notify that the Logon message has been received from the counterpart.
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.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Faired when message is prepared for sending to socket.
[in] | message | Prepared message. |
[in] | sn | Reference to FIX session related to the event. |
References B2B_USE_ARG.
|
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.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called each time session tries to reconnect.
remainTries | The remain reconnect tries count. |
sn | The corresponding FIX session. |
References B2B_USE_ARG.
|
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.
msg | Outgoing message. |
sn | FIX session. |
|
pure virtual |
This call-back method is called when a Resend Request (MsgType = 2) has been received.
event | Information about occurred event. |
sn | The corresponding FIX session. |
|
inlinevirtual |
This call-back method is called when #DuplicateResendRequestLimit ResendRequest messages are received.
event | Information about occurred event. |
sn | The corresponding FIX session. |
References B2B_USE_ARG.
|
pure virtual |
This call-back method is called when a message gap is detected in incoming messages.
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. |
|
virtual |
This call-back method is called when a session-level Reject message (MsgType = 3) is received.
If the application can not process the given message, the FIX Engine will try to deliver it later. If the callee hasn't commited the message into the session's log the engine will commit it when the call-back returns.
work | the incoming message and the additional message processing related information. |
sn | The corresponding FIX session. |
|
inlinevirtual |
Faired when Session Level Reject message is received with the sequence number too high.
References B2B_USE_ARG.
|
inlinevirtual |
This call-back method is called when the session is switching to another connection.
event | Information about occurred event. |
sn | The corresponding FIX session. |
References B2B_USE_ARG.
|
inlinevirtual |
Faired when Session is terminated and all internal threads are stopped.
[in] | sn | Reference to FIX session related to the event. |
References B2B_USE_ARG.
|
pure virtual |
This call-back method is called when the message has to be routed to the session, which does not exist.
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.
event | Information about occurred event. |
sn | The corresponding FIX session. |
References B2B_USE_ARG.
|
pure virtual |
The call-back method to process incoming messages.
If an exception is thrown from the callback the reject message will be sent.
msg | the incoming message. |
sn | The corresponding FIX session. |
|
virtual |
The call-back method to process incoming messages.
If the application can not process the given message, the FIX Engine will try to deliver it later. If an exception is thrown from the callback the reject message will be sent. If the callee hasn't commited the message into the session's log the engine will commit it when the call-back returns.
work | the incoming message and the additional message processing related information. |
sn | The corresponding FIX session. |