OnixS C++ CME iLink 3 Binary Order Entry Handler  1.8.0
API Documentation
Listening to Session Events

OnixS C++ CME iLink 3 Handler exposes the OnixS::CME::iLink3::SessionListener class, whose virtual members are called by an instance of the OnixS::CME::iLink3::Session class, as response to a particular event occurred during the session life-time.

To be notified about a particular session event, overwrite appropriate member of the OnixS::CME::iLink3::SessionListener class, and supply a descendant instance to the OnixS::CME::iLink3::Session's constructor.

The OnixS::CME::iLink3::SessionListener interface class shows all events, exposed by the OnixS::CME::iLink3::Session class.

Note
Session event handling/listening is synchronous operation. For this reason, it is recommended not to perform time-consuming tasks inside event handlers. For the same reason, it is not recommended to call from the event handler any Session method that could change Session state.

Example

using namespace OnixS::CME::iLink3;
class SessionStateListener : public SessionListener
{
public:
void onStateChange(SessionStateId::Enum newState, SessionStateId::Enum prevState, Session* /*session*/) ONIXS_ILINK3_OVERRIDE
{
std::clog
<< "\nSession's state is changed, prevState="
<< ", newState="
<< std::endl;
}
};