OnixS C++ CME iLink 3 Binary Order Entry Handler 1.18.9
API Documentation
Loading...
Searching...
No Matches
SessionListener.h
Go to the documentation of this file.
1/*
2* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3*
4* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5* and international copyright treaties.
6*
7* Access to and use of the software is governed by the terms of the applicable OnixS Software
8* Services Agreement (the Agreement) and Customer end user license agreements granting
9* a non-assignable, non-transferable and non-exclusive license to use the software
10* for it's own data processing purposes under the terms defined in the Agreement.
11*
12* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13* of this source code or associated reference material to any other location for further reproduction
14* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15*
16* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17* the terms of the Agreement is a violation of copyright law.
18*/
19
20#pragma once
21
25
26#include <string>
27
28namespace OnixS {
29namespace CME {
30namespace iLink3 {
31
33
115
188
191{
204};
205
229
230
233{
234public:
235 virtual void onNegotiationResponse(const Messaging::NegotiationResponse501 & /*msg*/, Session * /*sn*/) {}
236 virtual void onNegotiationReject(const Messaging::NegotiationReject502 & /*msg*/, Session * /*sn*/) {}
237 virtual void onEstablishmentAck(const Messaging::EstablishmentAck504 & /*msg*/, Session * /*sn*/) {}
238 virtual void onEstablishmentReject(const Messaging::EstablishmentReject505 & /*msg*/, Session * /*sn*/) {}
239 virtual void onSequence(const Messaging::Sequence506 & /*msg*/, Session * /*sn*/) {}
240 virtual void onTerminate(const Messaging::Terminate507 & /*msg*/, Session * /*sn*/) {}
241 virtual void onRetransmitReject(const Messaging::RetransmitReject510 & /*msg*/, Session * /*sn*/) {}
242 virtual void onRetransmission(const Messaging::Retransmission509 & /*msg*/, Session * /*sn*/) {}
243 virtual void onFailover(Messaging::FTI::Enum /*faultToleranceIndicator*/, Session * /*sn*/) {}
244
248
249 virtual void onBusinessReject(const Messaging::BusinessReject521 & /*msg*/, Session * /*sn*/) {}
250 virtual void onExecutionReportNew(const Messaging::ExecutionReportNew522 & /*msg*/, Session * /*sn*/) {}
251 virtual void onExecutionReportModify(const Messaging::ExecutionReportModify531 & /*msg*/, Session * /*sn*/) {}
252 virtual void onExecutionReportCancel(const Messaging::ExecutionReportCancel534 & /*msg*/, Session * /*sn*/) {}
253 virtual void onExecutionReportStatus(const Messaging::ExecutionReportStatus532 & /*msg*/, Session * /*sn*/) {}
258 virtual void onExecutionReportReject(const Messaging::ExecutionReportReject523 & /*msg*/, Session * /*sn*/) {}
262 virtual void onOrderCancelReject(const Messaging::OrderCancelReject535 & /*msg*/, Session * /*sn*/) {}
265 virtual void onMassQuoteAck(const Messaging::MassQuoteAck545 & /*msg*/, Session * /*sn*/) {}
266 virtual void onRequestForQuoteAck(const Messaging::RequestForQuoteAck546 & /*msg*/, Session * /*sn*/) {}
267 virtual void onQuoteCancelAck(const Messaging::QuoteCancelAck563& /*msg*/, Session* /*sn*/) {}
273
275 virtual void onReceivedBytes(const char * /*bytes*/, size_t /*size*/, const ReceivedDataTimestamp& /*timestamp*/, Session * /*sn*/) {}
276
278 virtual void onMessageSending(char * /*bytes*/, size_t /*size*/, Session * /*sn*/) {}
279
281 virtual void onStateChange(SessionStateId::Enum /*newState*/, SessionStateId::Enum /*prevState*/, Session * /*sn*/) {}
282
285 virtual void onError(SessionErrorReason::Enum /*reason*/, const std::string & /*description*/, Session * /*sn*/, Messaging::SbeMessage) {}
286
289 virtual void onWarning(SessionWarningReason::Enum /*reason*/, const std::string & /*description*/, Session * /*sn*/, Messaging::SbeMessage) {}
290
291protected:
292 virtual ~SessionListener() = 0;
293};
294
295}
296}
297}
#define ONIXS_ILINK3_API_DECL(typeKind, typeName)
Definition ABI.h:29
#define ONIXS_ILINK3_EXPORTED
Definition Compiler.h:175
#define ONIXS_ILINK3_NOTHROW
Definition Compiler.h:176
The time point without the time-zone information.
Definition Time.h:468
virtual void onMassQuoteAck(const Messaging::MassQuoteAck545 &, Session *)
virtual void onExecutionReportTradeAddendumOutright(const Messaging::ExecutionReportTradeAddendumOutright548 &, Session *)
virtual void onFailover(Messaging::FTI::Enum, Session *)
virtual void onExecutionReportTradeAddendumSpread(const Messaging::ExecutionReportTradeAddendumSpread549 &, Session *)
virtual void onExecutionReportTradeAddendumSpreadLeg(const Messaging::ExecutionReportTradeAddendumSpreadLeg550 &, Session *)
virtual void onMessageSending(char *, size_t, Session *)
Called when the SBE message is about to be sent to the wire.
virtual void onExecutionReportNew(const Messaging::ExecutionReportNew522 &, Session *)
virtual void onExecutionReportTradeOutright(const Messaging::ExecutionReportTradeOutright525 &, Session *)
virtual void onExecutionReportElimination(const Messaging::ExecutionReportElimination524 &, Session *)
virtual void onEstablishmentAck(const Messaging::EstablishmentAck504 &, Session *)
virtual void onExecutionReportPendingCancel(const Messaging::ExecutionReportPendingCancel564 &, Session *)
virtual void onEstablishmentReject(const Messaging::EstablishmentReject505 &, Session *)
virtual void onExecutionReportTradeSpreadLeg(const Messaging::ExecutionReportTradeSpreadLeg527 &, Session *)
virtual void onExecutionReportCancel(const Messaging::ExecutionReportCancel534 &, Session *)
virtual void onNegotiationResponse(const Messaging::NegotiationResponse501 &, Session *)
virtual void onPartyDetailsListReport(const Messaging::PartyDetailsListReport538 &, Session *)
virtual void onExecutionReportTradeSpread(const Messaging::ExecutionReportTradeSpread526 &, Session *)
virtual void onOrderCancelReplaceReject(const Messaging::OrderCancelReplaceReject536 &, Session *)
virtual void onRetransmitReject(const Messaging::RetransmitReject510 &, Session *)
virtual void onReceivedBytes(const char *, size_t, const ReceivedDataTimestamp &, Session *)
Called as soon as bytes are received from the wire.
virtual NotAppliedAction::Enum onNotApplied(const Messaging::NotApplied513 &, Session *)
virtual void onStateChange(SessionStateId::Enum, SessionStateId::Enum, Session *)
Called when the session changes its state.
virtual void onQuoteCancelAck(const Messaging::QuoteCancelAck563 &, Session *)
virtual void onSecurityDefinitionResponse(const Messaging::SecurityDefinitionResponse561 &, Session *)
virtual void onError(SessionErrorReason::Enum, const std::string &, Session *, Messaging::SbeMessage)
Called when an error condition is detected.
virtual void onWarning(SessionWarningReason::Enum, const std::string &, Session *, Messaging::SbeMessage)
Called when a warning condition is detected.
virtual void onOrderMassActionReport(const Messaging::OrderMassActionReport562 &, Session *)
virtual void onExecutionReportReject(const Messaging::ExecutionReportReject523 &, Session *)
virtual void onPartyDetailsDefinitionRequestAck(const Messaging::PartyDetailsDefinitionRequestAck519 &, Session *)
virtual void onExecutionReportModify(const Messaging::ExecutionReportModify531 &, Session *)
virtual void onOrderCancelReject(const Messaging::OrderCancelReject535 &, Session *)
virtual void onNegotiationReject(const Messaging::NegotiationReject502 &, Session *)
virtual void onRetransmission(const Messaging::Retransmission509 &, Session *)
virtual void onRequestForQuoteAck(const Messaging::RequestForQuoteAck546 &, Session *)
virtual void onTerminate(const Messaging::Terminate507 &, Session *)
virtual void onSequence(const Messaging::Sequence506 &, Session *)
virtual void onExecutionReportPendingReplace(const Messaging::ExecutionReportPendingReplace565 &, Session *)
virtual void onBusinessReject(const Messaging::BusinessReject521 &, Session *)
virtual void onExecutionReportStatus(const Messaging::ExecutionReportStatus532 &, Session *)
An iLink 3 Session.
Definition Session.h:48
Action to be taken when the NotApplied message is received from the exchange.
Enum
Action to be taken when the NotApplied message is received from the exchange.
@ SendGapFill
Send the Sequence message.
@ DoNothing
No messages are sent in reply.
Represents a timestamp of the received data.
@ Software
Timestamp provided by the OS kernel / user-level network stack.
@ Hardware
Timestamp provided by the network card.
Messaging::Timestamp time_
The timestamp.
static const char * toString(Enum type) noexcept
@ PluggableSessionStorageException
An exception is thrown from the user-provided Session Storage.
@ CannotRestoreSessionState
Session state cannot be restored.
@ CannotEstablishConnection
Connection cannot be established.
@ DecodingError
Received an invalid incoming message.
@ IncomingMessageGapQueueOverflow
The maximum size of the incoming message gap queue is exceeded.
@ KeepAliveIntervalLapsed
When two times the KeepAliveInterval has expired and no keep alive message is received then the sessi...
@ ExchangeInitiatedTerminateMessage
The Exchange sent the initial Terminate message.
@ UnexpectedUuid
A message with unexpected UUID is received.
@ UnexpectedMessageType
First message received is not the NegotiationResponse or EstablishmentAck message.
@ LinkErrorIsDetected
Telecommunication link error is detected.
@ TerminateInReplyOnEstablish
The Terminate message is received in reply to the Establish message.
@ CannotRestoreConnection
Connection cannot be restored.
@ GeneralError
A general session-related error.
@ NegotiationReject
The Negotiation Reject message is received in reply to the Negotiation message.
@ MsgSeqNumTooLow
The incoming message has a sequence number less than expected and the PossRetransFlag is not set,...
@ LinkErrorIsDetectedDuringSessionEstablishment
After sending the initial Negotiate or Establish message the telecommunication link error is detected...
@ EstablishmentReject
The Establishment Reject message is received in reply to the Establish message.
@ ExceptionDuringProcessingOfIncomingMessage
Exception during processing of an incoming message.
static const char * toString(Enum type) noexcept
@ IncorrectResponseTimestamp
A response message with unexpected requestTimestamp field value is received.
@ UnexpectedNextSeqNo
Received an unexpected NextSeqNo value.
@ PluggableSessionStorageException
An exception is thrown from the user-provided Session Storage.
@ CannotRestoreSessionState
Session state cannot be restored.
@ UnexpectedPreviousUuid
The value of the PreviousUUID field in the received Establishment Acknowledgment message does not mat...
@ RetransmitReject
The Retransmit Reject message is received in reply to the Retransmit Request message.
@ LicenseExpiration
Raised when the license will expire in less than SessionSettings::licenseAlertingDaysBeforeExpiration
@ RestoreSessionStateWarning
Session state cannot be restored.
@ SequenceWithKeepAliveLapsed
Received the Sequence message with the Lapsed value of the KeepAliveIntervalLapsed field.
@ SequenceGapIsDetected
Incoming message sequence gap is detected.
@ CannotSetSocketOption
Error setting socket option.
@ MsgSeqNumOutOfRange
The incoming message has a sequence number is out of the expected range and the PossRetransFlag is se...
@ ExceptionInEventHandler
Exception was thrown from user's event handler.
@ LinkErrorIsDetected
Telecommunication link error is detected.
@ AsyncFileBasedStorageQueueOverflow
Raised when the AsyncFileBasedStorage queue exceeded SessionSettings::asyncFileBasedStorageQueueMaxSi...
@ GeneralWarning
General session-related warning.
@ UnexpectedSbeSchemaVersion
Unexpected SBE Schema version is received from CME.
@ UnexpectedUuId
Received a message with an unexpected uuid.
@ ReceiveTimeoutIsDetected
Raised when the KeepAliveInterval has expired and no keep alive message is received.
@ LinkErrorIsDetectedDuringSessionEstablishment
After sending the initial Negotiate or Establish message the telecommunication link error is detected...
@ UnsupportedMessageType
Received an unsupported message type.