OnixS C++ FIX Engine  4.12.0
API Documentation
ISessionStorage.h File Reference
#include <string>
#include <vector>
#include <OnixS/FIXEngine/Compiler.h>
#include <OnixS/FIXEngine/FIX/Timestamp.h>
#include <OnixS/FIXEngine/FIX/Message.h>
#include <OnixS/FIXEngine/FIX/FlatMessage.h>

Go to the source code of this file.

Classes

class  ISessionStorage
 
struct  ISessionStorage::RawMessagePointer
 
class  ISessionStorage::ISessionStorageListener
 
struct  RawMessagePointer
 
class  ISessionStorageListener
 

Namespaces

 OnixS
 
 OnixS::FIX
 

Functions

class ONIXS_FIXENGINE_API OnixS::FIX::ISessionStorage sessionCreationTime ()=0
 
virtual ~ISessionStorage () ONIXS_FIXENGINE_DEFAULT
 
virtual void clear ()=0
 
virtual void close (bool keepSequenceNumbers, bool doBackup)=0
 
virtual void getOutbound (SequenceNumber beginSequenceNumber, SequenceNumber endSequenceNumber, ISessionStorageListener *listener)=0
 
virtual SequenceNumber inSeqNum ()=0
 
virtual void inSeqNum (SequenceNumber messageSequenceNumber)=0
 
virtual void storeInbound (const Message &message, SequenceNumber sequenceNumber, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void storeInbound (const FlatMessage &message, SequenceNumber sequenceNumber, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void storeOutbound (const Message &message, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void storeOutbound (const FlatMessage &message, SequenceNumber sequenceNumber, const RawMessagePointer &pointer, bool logMessage)=0
 
virtual void setSessionTerminationFlag (bool terminated)=0
 
virtual SequenceNumber outSeqNum ()=0
 
virtual void outSeqNum (SequenceNumber messageSequenceNumber)=0
 
virtual void sessionCreationTime (Timestamp timestamp)=0
 
virtual void flush ()=0
 
virtual size_t resendingQueueSize () const =0
 
virtual void resendingQueueSize (size_t value)=0
 
virtual void warmup (size_t)
 

Function Documentation

virtual void sessionCreationTime::clear ( )
pure virtual

Clears the storage.

virtual void sessionCreationTime::close ( bool  keepSequenceNumbers,
bool  doBackup 
)
pure virtual

Closes the storage.

Parameters
keepSequenceNumbersThe flag to indicate if it needs to clear sequence numbers on close or not. It corresponds to the same parameter in the Session's constructor.
doBackupThe flag to indicate if it needs to back up the stored data. It is true, when the Session::resetLocalSequenceNumbers() method is called.
virtual void sessionCreationTime::getOutbound ( SequenceNumber  beginSequenceNumber,
SequenceNumber  endSequenceNumber,
ISessionStorageListener listener 
)
pure virtual

Gets the messages that have been sent earlier.

The implementation should pass required messages one by one to the ISessionStorageListener::onReplayedMessage(const RawMessagePointer& pointer) method. It is possible to omit some or even all messages in the requested range, in this case the Engine will automatically generate appropriate SequenceReset-GapFill messages to replace omitted ones.

Parameters
beginSequenceNumberThe sequence number of first message to resend.
endSequenceNumberthe sequence number of last message to resend.
listenerRequested messages have to be passed to the interface using the ISessionStorageListener::onReplayedMessage method.
Note
The FIX Engine/Session Storage does NOT manage the lifetime of this listener.
virtual SequenceNumber sessionCreationTime::inSeqNum ( )
pure virtual

Returns the last inbound sequence number.

virtual void sessionCreationTime::inSeqNum ( SequenceNumber  messageSequenceNumber)
pure virtual

Sets the last inbound sequence number.

virtual SequenceNumber sessionCreationTime::outSeqNum ( )
pure virtual

Returns the last outgoing sequence number.

virtual void sessionCreationTime::outSeqNum ( SequenceNumber  messageSequenceNumber)
pure virtual

Sets the last outgoing sequence number.

virtual void sessionCreationTime::sessionCreationTime ( Timestamp  timestamp)
pure virtual

Sets the session creation time.

The implementation should store the timestamp value. This value have to be returned without changes by subsequent ISessionStorage::sessionCreationTime() calls.

Parameters
timestampThe timestamp to store in the storage.
virtual void sessionCreationTime::setSessionTerminationFlag ( bool  terminated)
pure virtual

Sets the session termination flag.

Parameters
terminatedIf 'true' then the session is terminated and its state information is not needed any more. It happens when the session is disconnected gracefully, and the keepSequenceNumbers parameter is false.
virtual void sessionCreationTime::storeInbound ( const Message &  message,
SequenceNumber  sequenceNumber,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given inbound message.

Parameters
messageThe incoming message.
sequenceNumberThe sequence number of the inbound message.
pointerThe raw buffer of the inbound message.
logMessageThe flag to indicate whether it needs to store the content of the message in the session storage or not. This parameter depends on the Session::logInboundMessages() and Session::inboundMessageLogFilter() settings.
virtual void sessionCreationTime::storeInbound ( const FlatMessage &  message,
SequenceNumber  sequenceNumber,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given inbound message.

Parameters
messageThe incoming message.
sequenceNumberThe sequence number of the inbound message.
pointerThe raw buffer of the inbound message.
logMessageThe flag to indicate whether it needs to store the content of the message in the session storage or not. This parameter depends on the Session::logInboundMessages() and Session::inboundMessageLogFilter() settings.
virtual void sessionCreationTime::storeOutbound ( const Message &  message,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given outgoing message.

It is called when the messageMode is set to Message.

Parameters
messageThe outgoing message.
pointerThe raw buffer of the outgoing message.
logMessageThe flag to indicate whether it needs to store the content of the message in the session storage or not. This parameter depends on the Session::logOutboundMessages() and Session::outboundMessageLogFilter() settings.
virtual void sessionCreationTime::storeOutbound ( const FlatMessage &  message,
SequenceNumber  sequenceNumber,
const RawMessagePointer pointer,
bool  logMessage 
)
pure virtual

Stores the given outgoing message.

It is called when the messageMode is set to FlatMessage.

Parameters
messageThe outgoing message.
sequenceNumberThe sequence number of the outgoing message.
pointerThe raw buffer of the outgoing message.
logMessageThe flag to indicate whether it needs to store the content of the message in the session storage or not. This parameter depends on the Session::logOutboundMessages() and Session::outboundMessageLogFilter() settings.
virtual sessionCreationTime::~ISessionStorage ( )
virtual

The destructor.