Class Layer1ApiInjectorRelay

All Implemented Interfaces:
AutoCloseable, Layer1ApiAdminListenable, Layer1ApiAdminListener, Layer1ApiAdminProvider, Layer1ApiDataListenable, Layer1ApiDataListener, Layer1ApiDataProvider, Layer1ApiInstrumentListenable, Layer1ApiInstrumentListener, Layer1ApiInstrumentProvider, Layer1ApiListener, Layer1ApiMboDataListenable, Layer1ApiMboDataListener, Layer1ApiProvider, Layer1ApiTradingListenable, Layer1ApiTradingListener, Layer1ApiTradingProvider, LayerApiListenable, Layer1ApiTimeSource
Direct Known Subclasses:
Layer1ApiStrategiesEchoMessagesLayer

public class Layer1ApiInjectorRelay extends Layer1ApiRelay
Base class for stack layers that contain asynchronous processing. Adds capability to inject asynchronous events upstream in a thread-safe manner.

Upstream events passing through this relay are synchronized on upstreamInjectorLock. Async injected messages are also synchronized on it. Therefore, the above layer sees all coming events synchronized as a single stream.

Threading. An injected runnable must not wait for processing happening for other messages. Also, upstream messages should not send downstream messages in the same thread or block on them.