61 bool * allowLogout) = 0;
81 const std::string & warningReason) = 0;
90 const std::string & errorReason) = 0;
146 std::string * configurationFile_;
#define ONIXS_FIXENGINE_API_DECL(typeKind, typeName)
#define ONIXS_FIXENGINE_API
#define ONIXS_FIXENGINE_DEFAULT
The collection of parameters required to establish a connection with a counterparty (session-acceptor...
The collection of connection-related attributes for the session.
Defines activity time frames for the session.
SessionScheduler events notifications.
virtual void onWarning(const SessionScheduler &scheduler, Session *session, const std::string &warningReason)=0
Notifies about a non-critical issue occurred while maintaining the state for the given session.
virtual void onError(const SessionScheduler &scheduler, Session *session, const std::string &errorReason)=0
Notifies about an error occurred while maintaining the state for the given session.
virtual void onLoggingOut(const SessionScheduler &scheduler, Session *session, bool *allowLogout)=0
Notifies if the FIX session is about to be closed.
virtual ~SessionSchedulerListener() ONIXS_FIXENGINE_DEFAULT
The class is not used for the object life time managing.
virtual void onInitiatorConnecting(const SessionScheduler &, Session *, const Counterparty &)
Allows scheduler's users to be notified when an initiator will try to connect to the next counterpart...
The collection of miscellaneous parameters which affect the session scheduler behavior.
SchedulerThreadingModel::Enum threadingModel() const
The threading model.
const std::string & configurationFile() const
The path to the scheduler configuration file.
SessionSchedulerListener * eventListener() const
An instance of the event listener to notify about events.
void configurationFile(const std::string &file)
Updates the path to the scheduler configuration file.
void threadingModel(SchedulerThreadingModel::Enum threadingModel)
Updates the threading model.
SessionSchedulerOptions()
Initializes parameters with default values.
~SessionSchedulerOptions()
Cleans everything up.
void eventListener(SessionSchedulerListener *listener)
Associates the given event listener with the scheduler.
The scheduler performs the session connection maintenance according to the specified schedule for ses...
int reconnectInterval() const
Returns the time interval between logon attempts in case of a logon failure.
bool utcTimeUsage() const
Returns true if the UTC time is used otherwise false.
int reconnectAttempts() const
Returns the number of logon attempts in case of a logon failure.
SessionScheduler(const SessionSchedulerOptions &options)
Initializes the Scheduler instance according to the options specified in the given configuration file...
void reconnectInterval(int value)
Sets the time interval between logon attempts in case of a logon failure.
void add(Session *session, const SessionSchedule &schedule, const SessionConnectionSettings &connection)
Adds the session to the automatic connection management.
void add(Session *session, const SessionScheduleId &scheduleId, const SessionConnectionSettingsId &connectionId)
Adds the session to the automatic connection management.
void serviceThreadAffinity(const OnixS::Threading::CpuIndexes &cpuIndexes)
Sets the CPU affinity of the Scheduler service thread.
const SessionConnectionSettings * findConnectionSettings(const SessionConnectionSettingsId &id) const
Looks for the predefined session connection settings associated with the given unique names (ids) as ...
~SessionScheduler()
Performs the graceful shutdown of scheduling services.
void utcTimeUsage(bool value)
This property allows switching the local time to the UTC time usage.
const SessionSchedule * findSchedule(const SessionScheduleId &id) const
Looks for the predefined session schedule associated with the given unique names (ids) as it was spec...
const OnixS::Threading::CpuIndexes & serviceThreadAffinity() const
Returns the CPU affinity of the Scheduler service thread.
bool isScheduled(Session *session)
Checks if the session is scheduled for the automatic connection management services.
void remove(Session *session)
Removes the session from the automatic connection management services.
void reconnectAttempts(int value)
Sets the number of logon attempts in case of a logon failure.
void dispatchEvents()
Processes events on the Scheduler and performs the necessary session management.
The FIX Session - a bi-directional stream of ordered messages between two parties within a continuous...
std::string SessionScheduleId
std::string SessionConnectionSettingsId
std::set< CpuIndex > CpuIndexes
The way in which the Scheduler will utilize threads.
@ DedicatedThreads
Scheduler will use its own threads.
@ ExternalThread
Scheduler events are handled by rolling an event loop in a user thread.
static ONIXS_FIXENGINE_API const char * toString(SchedulerThreadingModel::Enum value)
Returns the textual representation of the SchedulerThreadingModel::Enum value.