Please find all the available states of the Handler in the table below.
| State | Description |
| OnixS::Eurex::DropCopy::HandlerState::Disconnected | The Handler is disconnected. |
| OnixS::Eurex::DropCopy::HandlerState::Disconnecting | The intermediate state when the Handler is not disconnected but not connected. |
| OnixS::Eurex::DropCopy::HandlerState::Connected | Handler is connected. |
| OnixS::Eurex::DropCopy::HandlerState::Connecting | The intermediate state when the Handler is not connected but not disconnected. |
To track the Handler's state you need to implement OnixS::Eurex::DropCopy::HandlerStateListener class interface and register an instance with the Handler using OnixS::Eurex::DropCopy::Handler::registerHandlerStateListener member.
Let's take a closer look what triggers transitions between the Handler's states.
If the Handler is in the Disconnected state and user code calls OnixS::Eurex::DropCopy::Handler::connect, user code will receive a callback with new state set to OnixS::Eurex::DropCopy::HandlerState::Connecting.
If the Handler is in any other state except Disconnected and user code calls OnixS::Eurex::DropCopy::Handler::connect, the Handler will first disconnects and only after successful disconnect user code will receive a callback with new state set to OnixS::Eurex::DropCopy::HandlerState::Connecting.
If the Handler is in the Disconnected state and user code calls OnixS::Eurex::DropCopy::Handler::disconnect or OnixS::Eurex::DropCopy::Handler::disconnectAsync, user code will not receive any callback.
If the Handler is in any other state except Disconnected and user code calls OnixS::Eurex::DropCopy::Handler::disconnect or OnixS::Eurex::DropCopy::Handler::disconnectAsync, user code will receive a callback with new state set to OnixS::Eurex::DropCopy::HandlerState::Disconnecting.
disconnect blocks until the handler reaches OnixS::Eurex::DropCopy::HandlerState::Disconnected. disconnectAsync initiates the same session logout and disconnect sequence but returns without waiting for Disconnected.
When OnixS::Eurex::DropCopy::Handler::connect is called, the handler executes the full EDCI connection sequence before transitioning to OnixS::Eurex::DropCopy::HandlerState::Connected. The steps are:
At this point OnixS::Eurex::DropCopy::Handler::connect returns and the handler transitions to OnixS::Eurex::DropCopy::HandlerState::Connected.
However, the EDCI data stream is not yet ready for consumption. The exchange immediately begins the order book synchronization phase per partition (EDCI Manual §4.4):
After OnixS::Eurex::DropCopy::TradSesEvent::EndOfOrderBookSynch the stream transitions to live mode: all subsequent OnixS::Eurex::DropCopy::OrderExecReportBroadcast and OnixS::Eurex::DropCopy::DeleteOrderBroadcast messages reflect real-time order events.
EDCI delivers order state in two distinct phases after each session logon (EDCI Manual §4.4).
Between OnixS::Eurex::DropCopy::TradSesEvent::StartOfOrderBookSynch and OnixS::Eurex::DropCopy::TradSesEvent::EndOfOrderBookSynch, the exchange replays the current state of all open orders as OnixS::Eurex::DropCopy::OrderExecReportBroadcast messages with OnixS::Eurex::DropCopy::ExecType::Restated. Each message represents the complete current state of one order — not a delta. Apply as an insert or full-replace of the local order record.
Rules during the restatement phase:
After OnixS::Eurex::DropCopy::TradSesEvent::EndOfOrderBookSynch, all messages are incremental. Each OnixS::Eurex::DropCopy::OrderExecReportBroadcast or OnixS::Eurex::DropCopy::DeleteOrderBroadcast reflects a single order event. Apply them in arrival order to maintain consistent local state.
OnixS::Eurex::DropCopy::ExecType::Restated can appear in both phases with different semantics:
Track synchronization state with a flag set on OnixS::Eurex::DropCopy::TradSesEvent::EndOfOrderBookSynch and cleared on OnixS::Eurex::DropCopy::TradSesEvent::StartOfOrderBookSynch or OnixS::Eurex::DropCopy::TradSesEvent::OrderBookReset: