OnixS C++ CME MDP Conflated TCP Handler 1.3.6
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 ConflatedTCP {
31
33
63
134
137{
138public:
139 virtual void onNegotiationReject(const Messaging::NegotiationReject201 & /*msg*/, Session * /*sn*/) {}
140 virtual void onNegotiationResponse(const Messaging::NegotiationResponse202& /*msg*/, Session* /*sn*/) {}
141 virtual void onTerminate(const Messaging::Terminate203& /*msg*/, Session* /*sn*/) {}
142 virtual void onRequestAck(const Messaging::RequestAck206& /*msg*/, Session* /*sn*/) {}
143 virtual void onRequestReject(const Messaging::RequestReject207& /*msg*/, Session* /*sn*/) {}
144
146 virtual void onOutboundApplicationMsg(const Messaging::SbeMessage& /*msg*/, Session* /*sn*/) {}
147
149 virtual void onOutboundSessionMsg(const Messaging::SbeMessage& /*msg*/, Session * /*sn*/) {}
150
152 virtual void onReceivedBytes(const char * /*bytes*/, size_t /*size*/, Session * /*sn*/) {}
153
155 virtual void onMessageSending(char * /*bytes*/, size_t /*size*/, Session * /*sn*/) {}
156
158 virtual void onStateChange(SessionStateId::Enum /*newState*/, SessionStateId::Enum /*prevState*/, Session * /*sn*/) {}
159
161 virtual void onError(SessionErrorReason::Enum /*reason*/, const std::string & /*description*/, Session * /*sn*/) {}
162
164 virtual void onWarning(SessionWarningReason::Enum /*reason*/, const std::string & /*description*/, Session * /*sn*/) {}
165
166 protected:
167 virtual ~SessionListener() = 0;
168};
169
170}
171}
172}
#define ONIXS_CONFLATEDTCP_API_DECL(typeKind, typeName)
Definition ABI.h:29
#define ONIXS_CONFLATEDTCP_EXPORTED
Definition Compiler.h:175
virtual void onRequestAck(const Messaging::RequestAck206 &, Session *)
virtual void onNegotiationReject(const Messaging::NegotiationReject201 &, Session *)
virtual void onMessageSending(char *, size_t, Session *)
Called when the SBE message is about to be sent to the wire.
virtual void onError(SessionErrorReason::Enum, const std::string &, Session *)
Called when an error condition is detected.
virtual void onReceivedBytes(const char *, size_t, Session *)
Called as soon as bytes are received from the wire.
virtual void onOutboundApplicationMsg(const Messaging::SbeMessage &, Session *)
Called when the application-level message is sent to the counterparty.
virtual void onRequestReject(const Messaging::RequestReject207 &, Session *)
virtual void onStateChange(SessionStateId::Enum, SessionStateId::Enum, Session *)
Called when the session changes its state.
virtual void onNegotiationResponse(const Messaging::NegotiationResponse202 &, Session *)
virtual void onOutboundSessionMsg(const Messaging::SbeMessage &, Session *)
Called when the session-level message is sent to the counterparty.
virtual void onWarning(SessionWarningReason::Enum, const std::string &, Session *)
Called when a warning condition is detected.
virtual void onTerminate(const Messaging::Terminate203 &, Session *)
An Conflated TCP Session.
Definition Session.h:39
@ ProgramIsFinishing
The program is finishing its execution.
@ UnexpectedNextSeqNo
Received an unexpected NextSeqNo value.
@ RetransmitReject
The Retransmit Reject message is received in reply to the Retransmit Request message.
@ CannotEstablishConnection
Connection cannot be established.
@ DecodingError
Received an invalid incoming message.
@ 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.
@ ExceptionInEventHandler
Exception was thrown from user's event handler.
@ 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 PossDupFlag is not set,...
@ ResponseTimeoutException
A response has not been received during the specified timeout.
@ 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.
@ UnexpectedPreviousUuid
The value of the PreviousUUID field in the received Establishment Acknowledgment message does not mat...
@ SequenceWithKeepAliveLapsed
Received the Sequence message with the Lapsed value of the KeepAliveIntervalLapsed field.
@ SequenceGapIsDetected
Incoming message sequence gap is detected.
@ GeneralWarning
General session-related warning.
@ UnexpectedSbeSchemaVersion
Unexpected SBE Schema version is received from CME.
@ UnsupportedMessageType
Received an unsupported message type.