#include <OnixS/FIXEngine/FIX/ISessionListener.h>
|
| virtual | ~ISessionListener ()=default |
| virtual void | onInboundApplicationMsg (Message &message, Session *session)=0 |
| virtual void | onInboundApplicationMsg (FlatMessage &, Session *) |
| virtual void | onInboundSessionMsg (Message &, Session *) |
| virtual void | onInboundSessionMsg (FlatMessage &, Session *) |
| virtual void | onOutboundApplicationMsg (Message &, Session *) |
| virtual void | onOutboundSessionMsg (Message &, Session *) |
| virtual void | onReceivedBytes (const char *, size_t, const ReceivedDataTimestamp &, Session *) |
| virtual void | onMessageSending (SequenceNumber, char *, size_t, Session *) |
| virtual void | onStateChange (SessionState::Enum, SessionState::Enum, Session *) |
| virtual bool | onResendRequest (Message &, Session *) |
| virtual bool | onResendRequest (FlatMessage &, Session *) |
| virtual void | onResendingStarted (SequenceNumber, SequenceNumber, Session *) |
| virtual void | onResendingFinished (SequenceNumber, SequenceNumber, Session *) |
| virtual void | onError (ErrorReason::Enum, const std::string &, Session *) |
| virtual void | onWarning (WarningReason::Enum, const std::string &, Session *) |
Definition at line 149 of file ISessionListener.h.
◆ ~ISessionListener()
- Note
- the FIX Engine/Session does NOT manage the lifetime of this listener.
◆ onError()
Is called when an error condition is detected.
- Warning
- : It is called under the session's lock when the error is reported while a message is prepared for sending, for example when it reports an exception thrown from an outbound callback. Sending a message on the same session from this callback is not allowed in such a case, such a call throws an exception.
Definition at line 249 of file ISessionListener.h.
◆ onInboundApplicationMsg() [1/2]
Is called when the message mode is FlatMessage and the application-level message is received from the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
Definition at line 163 of file ISessionListener.h.
◆ onInboundApplicationMsg() [2/2]
| virtual void onInboundApplicationMsg |
( |
Message & | message, |
|
|
Session * | session ) |
|
pure virtual |
Is called when the message mode is Message and the application-level message is received from the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
◆ onInboundSessionMsg() [1/2]
Is called when the message mode is FlatMessage and the session-level message is received from the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
Definition at line 171 of file ISessionListener.h.
◆ onInboundSessionMsg() [2/2]
Is called when the message mode is Message and the session-level message is received from the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
Definition at line 167 of file ISessionListener.h.
◆ onMessageSending()
Is called just before the FIX message is sent to the wire.
- Warning
- : It is called under the session's lock.
-
: Sending a message on the same session from this callback is not allowed, such a call throws an exception.
Definition at line 208 of file ISessionListener.h.
◆ onOutboundApplicationMsg()
Is called when the application-level message is sent to the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
-
: The message's sequence number is the preliminary one.
- Warning
- : It is called under the session's lock.
-
: Sending a message on the same session from this callback is allowed only when the message being sent is not a part of a message batch or is the first message of the batch, and is not re-sent in reply to the ResendRequest<2> message. Otherwise such a call throws an exception.
Definition at line 184 of file ISessionListener.h.
◆ onOutboundSessionMsg()
Is called when the session-level message is sent to the counterparty.
- Note
- : do no call the base method if you have overridden it in the derived class.
-
: The message's sequence number is the preliminary one.
- Warning
- : It is called under the session's lock.
-
: Sending a message on the same session from this callback is allowed only when the message being sent is not a part of a message batch or is the first message of the batch, and is not re-sent in reply to the ResendRequest<2> message. Otherwise such a call throws an exception.
Definition at line 197 of file ISessionListener.h.
◆ onReceivedBytes()
Is called as soon as bytes are received from the wire.
Definition at line 200 of file ISessionListener.h.
◆ onResendingFinished()
◆ onResendingStarted()
Is called when the ResendRequest<2> message is received and the session is about to start to resend messages.
Definition at line 238 of file ISessionListener.h.
◆ onResendRequest() [1/2]
Is called in FlatMessage mode for a stored message that meets the conditions for resending in reply to the ResendRequest<2> message. See Conditions for Resending Messages.
- Returns
- true to allow the message to be resent; false to skip it unless another listener returns true. If no listener returns true, a SequenceReset-GapFill is sent instead.
- Note
- The default implementation returns false. Attaching a listener alone does not enable resending.
- Warning
- : Sending a message on the same session from this callback is not supported: the re-sent message keeps its original sequence number, so the sent message would be put on the wire before it.
Definition at line 235 of file ISessionListener.h.
◆ onResendRequest() [2/2]
Is called in Message mode for a stored message that meets the conditions for resending in reply to the ResendRequest<2> message. See Conditions for Resending Messages.
- Returns
- true to allow the message to be resent; false to skip it unless another listener returns true. If no listener returns true, a SequenceReset-GapFill is sent instead.
- Note
- The default implementation returns false. Attaching a listener alone does not enable resending.
- Warning
- : Sending a message on the same session from this callback is not supported: the re-sent message keeps its original sequence number, so the sent message would be put on the wire before it.
Definition at line 223 of file ISessionListener.h.
◆ onStateChange()
◆ onWarning()
Is called when a warning condition is detected.
- Warning
- : It is called under the session's lock when the warning is reported while a message is prepared for sending. Sending a message on the same session from this callback is not allowed in such a case, such a call throws an exception.
Definition at line 256 of file ISessionListener.h.