Generic application interface. More...
#include <B2BITS_Application.h>
Inheritance diagram for Engine::Application:Public Member Functions | |
| virtual void | onAfterMessageIsReceived (char const *msg, size_t msgSize, const Session &sn) |
| Faired just after message is received from socket. | |
| virtual void | onBeforeMessageIsSent (int msgSeqNum, const Session &sn, size_t msgCount) |
| Faired before message is 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 | 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 | 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 | onReconnectTryEvent (int remainTries, const Session &sn) |
| This call-back method is called each time session trys to reconnect. | |
| 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) |
| Faired 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 | 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 *apEvent, const Session &aSn) |
| This call-back method is called to notify about recevied unexpected message. | |
| virtual void | onValidateLogonEvent (ValidateLogonEvent *apEvent, const Session &aSn) |
| This call-back method is called to verify remote party. | |
| virtual bool | process (const FIXMessage &msg, const Session &sn)=0 |
| A call-back method to process incoming messages. | |
| virtual | ~Application () |
| Destructor. | |
Generic application interface.
Processes the incoming messages. All user's applications must be inherited from this class.
Definition at line 62 of file B2BITS_Application.h.
| virtual Engine::Application::~Application | ( | ) | [inline, virtual] |
Destructor.
Definition at line 67 of file B2BITS_Application.h.
| virtual void Engine::Application::onAfterMessageIsReceived | ( | char const * | msg, |
| size_t | msgSize, | ||
| const Session & | sn | ||
| ) | [inline, virtual] |
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. |
Definition at line 242 of file B2BITS_Application.h.
| virtual void Engine::Application::onBeforeMessageIsSent | ( | int | msgSeqNum, |
| const Session & | sn, | ||
| size_t | msgCount | ||
| ) | [inline, virtual] |
Faired before message is sent to socket.
Designed specifically for benchmarks.
| [in] | msgSeqNum | Sequence number of the sent message. |
| [in] | sn | Reference to FIX session related to the event. |
| [in] | msgCount | Messages count to send |
Definition at line 234 of file B2BITS_Application.h.
| virtual void Engine::Application::onHeartbeatWithTestReqIDEvent | ( | const HeartbeatWithTestReqIDEvent & | event, |
| const Session & | sn | ||
| ) | [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 occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onInvalidResendRequestEvent | ( | const ResendRequestEvent & | event, |
| const Session & | sn | ||
| ) | [inline, virtual] |
This call-back method is called when a ill-formed Resend Request (MsgType = 2) has been received.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Definition at line 171 of file B2BITS_Application.h.
| virtual void Engine::Application::onLogonEvent | ( | const LogonEvent * | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called to notify that the Logon message has been received from the counterpart.
If 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. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onLogoutEvent | ( | const LogoutEvent * | event, |
| const Session & | sn | ||
| ) | [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 occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onMsgRejectEvent | ( | const MsgRejectEvent * | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called when a message have to be rejected.
| event | - object that incapsulates rejected message |
| sn | - session object that rejects message |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onNewStateEvent | ( | const NewStateEvent & | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called when the session has changed its state.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onReconnectTryEvent | ( | int | remainTries, |
| const Session & | sn | ||
| ) | [inline, virtual] |
This call-back method is called each time session trys to reconnect.
| remainTries | The remain reconnect tries count. |
| sn | The corresponding FIX session. |
Definition at line 189 of file B2BITS_Application.h.
| virtual bool Engine::Application::onResend | ( | const FIXMessage & | msg, |
| const Session & | sn | ||
| ) | [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. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onResendRequestEvent | ( | const ResendRequestEvent & | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called when a Resend Request (MsgType = 2) has been received.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual bool Engine::Application::onResendRequestLoop | ( | const ResendRequestEvent & | event, |
| const Session & | sn | ||
| ) | [inline, virtual] |
This call-back method is called when DuplicateResendRequestLimit ResendRequest messages are received.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Definition at line 181 of file B2BITS_Application.h.
| virtual void Engine::Application::onSequenceGapEvent | ( | const SequenceGapEvent * | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called when a message gap is detected in incoming messages.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onSessionLevelRejectEvent | ( | const SessionLevelRejectEvent * | event, |
| const Session & | sn | ||
| ) | [pure virtual] |
This call-back method is called when a session-level Reject message (MsgType = 3) is received.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual bool Engine::Application::onSessionLevelRejectWithSeqNumTooHigh | ( | const FIXMessage & | msg, |
| const Session & | sn | ||
| ) | [inline, virtual] |
Faired when Session Level Reject message is received with the sequence number too high.
Definition at line 252 of file B2BITS_Application.h.
| virtual void Engine::Application::onSwitchConnectionEvent | ( | const SwitchConnectionEvent & | event, |
| const Session & | sn | ||
| ) | [inline, virtual] |
This call-back method is called when the session is switching to another connection.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Definition at line 205 of file B2BITS_Application.h.
| virtual void Engine::Application::onUnableToRouteMessage | ( | const UnableToRouteMessageEvent & | event, |
| const Session & | sn | ||
| ) | [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 occured event. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
| virtual void Engine::Application::onUnexpectedMessageEvent | ( | const UnexpectedMessageEvent * | apEvent, |
| const Session & | aSn | ||
| ) | [inline, virtual] |
This call-back method is called to notify about recevied unexpected message.
For example - when first message in session is not a Logon.
| event | Information about occured event. |
| sn | The corresponding FIX session. |
Reimplemented in Engine::AdminApplication.
Definition at line 122 of file B2BITS_Application.h.
| virtual void Engine::Application::onValidateLogonEvent | ( | ValidateLogonEvent * | apEvent, |
| const Session & | aSn | ||
| ) | [inline, virtual] |
This call-back method is called to verify remote party.
| event | Event information. |
| sn | The corresponding FIX session. |
Definition at line 104 of file B2BITS_Application.h.
| virtual bool Engine::Application::process | ( | const FIXMessage & | msg, |
| const Session & | sn | ||
| ) | [pure virtual] |
A 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 according to "Delayed Processing Algorithm".
| msg | the incoming message. |
| sn | The corresponding FIX session. |
Implemented in Engine::AdminApplication.
1.7.2