OnixS C++ ICE Binary Order Entry Handler 1.1.1
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
22#include <OnixS/ICE/BOE/ABI.h>
24
28
29#include <string>
30
32
33ONIXS_ICEBOE_API_DECL(class, Session);
34
99
167
190
193{
194public:
199
200
204
208 virtual void onHeartBeat(const Messaging::HeartBeat msg, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(msg, sn)
209
213 virtual void onError(const Messaging::Error msg, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(msg, sn)
214
218 virtual void onNews(const Messaging::News msg, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(msg, sn)
219
224
229
234
239
243 virtual void onIPReport(const Messaging::IPReport msg, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(msg, sn)
244
249
254
259
264
269
274
279
284
289
294
299
304
309
314
320 virtual void onReceivedBytes(const char* bytes, size_t size, const ReceivedDataTimestamp& timestamp, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(bytes, size, timestamp, sn)
321
326 virtual void onMessageSending(char* bytes, size_t size, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(bytes, size, sn)
327
332 virtual void onStateChange(SessionStateId::Enum newState, SessionStateId::Enum prevState, Session* sn) ONIXS_ICEBOE_EMPTY_BODY(newState, prevState, sn)
333
339 virtual void onError(SessionErrorReason::Enum reason, const std::string& description, Session* sn, Messaging::SbeMessage msg) ONIXS_ICEBOE_EMPTY_BODY(reason, description, sn, msg)
340
346 virtual void onWarning(SessionWarningReason::Enum reason, const std::string& description, Session* sn, Messaging::SbeMessage msg) ONIXS_ICEBOE_EMPTY_BODY(reason, description, sn, msg)
347
348protected:
349 virtual ~SessionListener() = 0;
350};
351
352
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
Definition ABI.h:94
#define ONIXS_ICEBOE_EMPTY_BODY(...)
Definition ABI.h:121
#define ONIXS_ICEBOE_NAMESPACE_END
Definition ABI.h:98
#define ONIXS_ICEBOE_API_DECL(typeKind, typeName)
Definition ABI.h:27
#define ONIXS_ICEBOE_EXPORTED
Definition Compiler.h:155
The time point without the time-zone information.
Definition Time.h:470
virtual void onSecurityDefinitionReject(const Messaging::SecurityDefinitionReject msg, Session *sn)
Called when a SecurityDefinitionReject message is received.
virtual void onStateChange(SessionStateId::Enum newState, SessionStateId::Enum prevState, Session *sn)
Called when the session changes its state.
virtual void onLogoutReport(const Messaging::LogoutReport msg, Session *sn)
Called when a LogoutReport message is received.
virtual void onWarning(SessionWarningReason::Enum reason, const std::string &description, Session *sn, Messaging::SbeMessage msg)
Called when a warning condition is detected by the session.
virtual void onError(const Messaging::Error msg, Session *sn)
Called when an Error message is received from the counterparty.
virtual void onNews(const Messaging::News msg, Session *sn)
Called when a News message is received.
virtual void onReceivedBytes(const char *bytes, size_t size, const ReceivedDataTimestamp &timestamp, Session *sn)
Called as soon as raw bytes are received from the wire (before SBE decoding).
virtual void onMassQuoteReport(const Messaging::MassQuoteReport msg, Session *sn)
Called when a MassQuoteReport message is received.
virtual void onSecurityDefinitionReport_Strategy(const Messaging::SecurityDefinitionReport_Strategy msg, Session *sn)
Called when a SecurityDefinitionReport_Strategy message is received.
virtual void onTraderLogoutReport(const Messaging::TraderLogoutReport msg, Session *sn)
Called when a TraderLogoutReport message is received.
virtual void onExecutionReport_Cancel(const Messaging::ExecutionReport_Cancel msg, Session *sn)
Called when an ExecutionReport_Cancel message is received.
virtual void onTraderLogonReport(const Messaging::TraderLogonReport msg, Session *sn)
Called when a TraderLogonReport message is received.
virtual void onOrderMassCancelReport(const Messaging::OrderMassCancelReport msg, Session *sn)
Called when an OrderMassCancelReport message is received.
virtual void onLogonReport(const Messaging::LogonReport msg, Session *sn)
Called when a LogonReport message is received.
virtual void onResendReport(const Messaging::ResendReport msg, Session *sn)
Called when a ResendReport message is received.
virtual void onSecurityDefinitionReport(const Messaging::SecurityDefinitionReport msg, Session *sn)
Called when a SecurityDefinitionReport message is received.
virtual void onExecutionReport_Snapshot(const Messaging::ExecutionReport_Snapshot msg, Session *sn)
Called when an ExecutionReport_Snapshot message is received.
virtual void onQuoteReport(const Messaging::QuoteReport msg, Session *sn)
Called when a QuoteReport message is received.
virtual void onSequenceReset(const Messaging::SequenceReset msg, Session *sn)
Called when a SequenceReset message is received.
virtual void onSecurityDefinitionReport_Product(const Messaging::SecurityDefinitionReport_Product msg, Session *sn)
Called when a SecurityDefinitionReport_Product message is received.
virtual void onExecutionReport_New(const Messaging::ExecutionReport_New msg, Session *sn)
Called when an ExecutionReport_New message is received.
virtual void onHeartBeat(const Messaging::HeartBeat msg, Session *sn)
Called when a HeartBeat message is received.
virtual void onExecutionReport_Reject(const Messaging::ExecutionReport_Reject msg, Session *sn)
Called when an ExecutionReport_Reject message is received.
virtual void onNewOrderCrossReport(const Messaging::NewOrderCrossReport msg, Session *sn)
Called when a NewOrderCrossReport message is received.
virtual void onIPReport(const Messaging::IPReport msg, Session *sn)
Called when an IPReport message is received.
virtual void onMessageSending(char *bytes, size_t size, Session *sn)
Called right before an SBE message is sent to the wire.
virtual void onExecutionReport_Modify(const Messaging::ExecutionReport_Modify msg, Session *sn)
Called when an ExecutionReport_Modify message is received.
virtual void onExecutionReport_Trade(const Messaging::ExecutionReport_Trade msg, Session *sn)
Called when an ExecutionReport_Trade message is received.
constexpr std::enable_if<!details::HasMemberTraits< Value >::value, size_t >::type size() noexcept
Definition Memory.h:303
Error processing client request.
Definition Messages.h:1339
New Order, cancel-replace, or cancel reject.
Definition Messages.h:18849
Heartbeat message. Sent in the absence of application messages.
Definition Messages.h:1160
Response to IPRequest for Binary Gateways.
Definition Messages.h:8474
Logon Report for Gateway ID.
Definition Messages.h:393
Logout Report for Gateway ID.
Definition Messages.h:903
Message identifiers and length of message root.
Definition Messages.h:22567
Report for Order Mass Cancel Request.
Definition Messages.h:22158
Response to Quote Request (RFQ).
Definition Messages.h:21460
Resend response for retransmission of messages.
Definition Messages.h:23476
Security Definition for futures, options, and FLEX creations. Each report will contain a single marke...
Definition Messages.h:4235
Trader Logon Report for Trader ID.
Definition Messages.h:9418
Represents a timestamp of the received data. If the source is None, no timestamp is available.
@ 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
@ UnsuccessfulLogonReportInReplyOnLogonRequest
The unsuccessful Logon Report message is received in reply to the LogonRequest message.
@ 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.
@ UnexpectedMessageType
First message received is not the LogonReport message.
@ LinkErrorIsDetected
Telecommunication link error is detected.
@ CannotRestoreConnection
Connection cannot be restored.
@ GeneralError
A general session-related error.
@ ErrorInReplyOnLogonRequest
The Error message is received in reply to the LogonRequest message.
@ MsgSeqNumTooLow
The incoming message has a sequence number less than expected and the PossRetransFlag is not set,...
@ LogoutReportInReplyOnLogonRequest
The LogoutReport message is received in reply to the LogonRequest message.
@ LinkErrorIsDetectedDuringSessionEstablishment
After sending the initial Negotiate or Establish message the telecommunication link error is detected...
@ 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.
@ LicenseExpiration
Raised when the license will expire in less than SessionSettings::licenseAlertingDaysBeforeExpiration
@ RestoreSessionStateWarning
Session state cannot be restored.
@ 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 HeaderFlags::possRese...
@ 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 the exchange.
@ 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...
@ CannotBackup
Cannot backup the file.
@ UnsupportedMessageType
Received an unsupported message type.