public interface Layer1ApiInstrumentAdapter extends Layer1ApiInstrumentListener
Provides default empty implementations.
| Modifier and Type | Method and Description |
|---|---|
default void |
onInstrumentAdded(java.lang.String alias,
InstrumentInfo instrumentInfo)
Indicates successful subscription to the instrument
|
default void |
onInstrumentAlreadySubscribed(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
Indicates that attempt to subscribe failed because subscription is
already active
|
default void |
onInstrumentNotFound(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
Indicates that attempt to subscribe failed because instrument does not
exist
|
default void |
onInstrumentRemoved(java.lang.String alias)
Unsubscribed from instrument (user-initiated or provider initiated).
Please note that if you use this in strategy that implements OnlineCalculatable,
you should not delete any data about instrument that is expected in OnlineCalculatable.calculateValuesInRange(String, String, long, long, int, velox.api.layer1.layers.strategies.interfaces.CalculatedResultListener)
or OnlineCalculatable.createOnlineValueCalculator(String, String, long, java.util.function.Consumer, velox.api.layer1.layers.strategies.interfaces.InvalidateInterface),
or should handle absence of that data (in case you delete it) gracefully. |
default void onInstrumentAdded(java.lang.String alias,
InstrumentInfo instrumentInfo)
Layer1ApiInstrumentListeneronInstrumentAdded in interface Layer1ApiInstrumentListeneralias - instrument aliasinstrumentInfo - instrument specificationsdefault void onInstrumentRemoved(java.lang.String alias)
Layer1ApiInstrumentListenerOnlineCalculatable,
you should not delete any data about instrument that is expected in OnlineCalculatable.calculateValuesInRange(String, String, long, long, int, velox.api.layer1.layers.strategies.interfaces.CalculatedResultListener)
or OnlineCalculatable.createOnlineValueCalculator(String, String, long, java.util.function.Consumer, velox.api.layer1.layers.strategies.interfaces.InvalidateInterface),
or should handle absence of that data (in case you delete it) gracefully. The reason is that you can get Layer1ApiInstrumentListener.onInstrumentRemoved(String) in the middle of OnlineCalculatable requestonInstrumentRemoved in interface Layer1ApiInstrumentListenerdefault void onInstrumentNotFound(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
Layer1ApiInstrumentListeneronInstrumentNotFound in interface Layer1ApiInstrumentListenertype - see InstrumentCoreInfo.typedefault void onInstrumentAlreadySubscribed(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
Layer1ApiInstrumentListeneronInstrumentAlreadySubscribed in interface Layer1ApiInstrumentListenertype - see InstrumentCoreInfo.type