Inner Contents | |
Session Schedule | |
Session Connection Settings | |
Predefined Schedules and Connection Settings | |
In real life Sessions FIX Connections occurs at regular intervals. A lot of trading systems have public schedules which declare time frames for trading. Session class exposes members for a FIX Connections basic handling. It also provides users with an automatic reconnection facility in case of the connection failure. However, there is no way in Session functionality to maintain Connections on a systematic basis.
To satisfy the needs of real-life trading schedules, OnixS FIX Engine offers the Sessions Scheduler. This service will automatically connect certain FIX sessions to the counterparty at the beginning of the trading day, as well as disconnect at the end of the day. It is also possible to keep a FIX Session connected for an entire trading week and disconnect it at the end of the last trading day.
The Sessions Scheduler is available as a part of OnixS FIX Engine.
OnixS::FIX::Scheduling::SessionScheduler is a workhorse class of the Sessions Scheduling services. This class exposes a simple, but comprehensive API, to handle connections by schedules of any complexity.
OnixS::FIX::Scheduling::SessionScheduler::add member schedules a session for automatic logon and logout according to the specified session time, which can be delivered to Scheduler as an instance of the appropriate class, or as a name of the predefined preset. The parameter of the type OnixS::FIX::Scheduling::SessionConnectionSettings specifies the role of Session (either Acceptor or Initiator), and primary connection parameters like host and port, which Session will use to establish FIX Connection.
OnixS::FIX::Scheduling::SessionScheduler::remove given session from the scheduling services.
The following steps take place while scheduling Session:
Scheduler exposes the OnixS::FIX::Scheduling::SessionSchedulerListener class to get notified listeners about errors in the session scheduling. OnixS::FIX::Scheduling::SessionSchedulerListener::onError is not linked with session errors. Scheduler raises notifications only about scheduling-related errors like inability to connect a session within the specified amount of time.
OnixS::FIX::Scheduling::SessionSchedulerListener::onWarning member is called by Scheduler to provide its users with more information about scheduling flow. This kind of information is usually related to non-critical errors that occur during the scheduling of the session.