Interface Layer1ApiListener

All Superinterfaces:
Layer1ApiAdminListener, Layer1ApiDataListener, Layer1ApiInstrumentListener, Layer1ApiMboDataListener, Layer1ApiTradingListener
All Known Subinterfaces:
Layer1ApiAdapter
All Known Implementing Classes:
Layer1ApiDepthFreezer, Layer1ApiInjectorRelay, Layer1ApiRelay, Layer1ApiStrategiesEchoMessagesLayer, Layer1ApiUpstreamRelay

Extends all possible Layer1 listeners. Capable of listening to any Layer1 Api events.

This is the upstream half of the Layer1 protocol: events travel from the data provider through a chain of layers towards the GUI. Every layer in the chain implements this interface to receive events from the layer below it and LayerApiListenable to expose them to the layer above it. The downstream half (commands from the GUI towards the provider) is Layer1ApiProvider.

Callbacks are invoked on data-flow threads, never on the Swing EDT. The thread is not fixed: most events arrive on Bookmap's event queue thread, while events injected by intermediate layers arrive on those layers' own threads. Layers serialize injected events with the pass-through stream, so a listener never runs two callbacks concurrently and events keep their relative order. Implementations must return quickly and must not block: a slow listener stalls every layer below it.

Use Layer1ApiAdapter if only a subset of the callbacks is needed.