public interface Layer1ApiInstrumentListener
| Modifier and Type | Method and Description |
|---|---|
void |
onInstrumentAdded(java.lang.String alias,
InstrumentInfo instrumentInfo)
Indicates successful subscription to the instrument
|
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
|
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
|
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. |
void onInstrumentAdded(java.lang.String alias,
InstrumentInfo instrumentInfo)
alias - instrument aliasinstrumentInfo - instrument specificationsvoid onInstrumentRemoved(java.lang.String alias)
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. The reason is that you can get onInstrumentRemoved(String) in the middle of OnlineCalculatable requestalias - void onInstrumentNotFound(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
symbol - exchange - type - see InstrumentCoreInfo.typevoid onInstrumentAlreadySubscribed(java.lang.String symbol,
java.lang.String exchange,
java.lang.String type)
symbol - exchange - type - see InstrumentCoreInfo.type