Class Layer1ApiDepthFreezer
- All Implemented Interfaces:
AutoCloseable,Layer1ApiAdminListenable,Layer1ApiAdminListener,Layer1ApiAdminProvider,Layer1ApiDataListenable,Layer1ApiDataListener,Layer1ApiDataProvider,Layer1ApiInstrumentListenable,Layer1ApiInstrumentListener,Layer1ApiInstrumentProvider,Layer1ApiListener,Layer1ApiMboDataListenable,Layer1ApiMboDataListener,Layer1ApiProvider,Layer1ApiTradingListenable,Layer1ApiTradingListener,Layer1ApiTradingProvider,LayerApiListenable,Layer1ApiTimeSource
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface velox.api.layer1.layers.Layer1ApiTimeSource
Layer1ApiTimeSource.Layer1TimeSourceShortcutAllowed -
Field Summary
Fields inherited from class velox.api.layer1.layers.Layer1ApiRelay
providerFields inherited from class velox.api.layer1.layers.Layer1ApiUpstreamRelay
closedFields inherited from class velox.api.layer1.Layer1ApiBasicListenable
adminListeners, dataListeners, instrumentListeners, mboDataListeners, theOnlyAdminListener, theOnlyDataListener, theOnlyInstrumentListener, theOnlyMboDataListener, theOnlyTradingListener, tradingListeners -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDepth data update.voidonUserMessage(Object data) Send an upstream event.Methods inherited from class velox.api.layer1.layers.Layer1ApiRelay
close, formatPrice, getCurrentTime, getSource, getSupportedFeatures, getTimeSource, login, sendOrder, sendUserMessage, setProvider, subscribe, toString, unsubscribe, updateOrderMethods inherited from class velox.api.layer1.layers.Layer1ApiUpstreamRelay
onBalance, onConnectionLost, onConnectionRestored, onInstrumentAdded, onInstrumentAlreadySubscribed, onInstrumentNotFound, onInstrumentRemoved, onLoginFailed, onLoginSuccessful, onMarketMode, onMboCancel, onMboReplace, onMboSend, onOrderExecuted, onOrderUpdated, onStatus, onSystemTextMessage, onTradeMethods inherited from class velox.api.layer1.Layer1ApiBasicListenable
addListener, addListener, addListener, addListener, addListener, getAdminListenerBroadcaster, getDataListenerBroadcaster, getInstrumentListenerBroadcaster, getTradingListenerBroadcaster, getUniqueListenersCount, onNoSubscribers, removeListener, removeListener, removeListener, removeListener, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface velox.api.layer1.Layer1ApiAdminListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiAdminListener
onConnectionLost, onConnectionRestored, onLoginFailed, onLoginSuccessful, onSystemTextMessageMethods inherited from interface velox.api.layer1.Layer1ApiDataListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiDataListener
onMarketMode, onTradeMethods inherited from interface velox.api.layer1.Layer1ApiInstrumentListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiInstrumentListener
onInstrumentAdded, onInstrumentAlreadySubscribed, onInstrumentNotFound, onInstrumentRemovedMethods inherited from interface velox.api.layer1.Layer1ApiInstrumentProvider
subscribeMethods inherited from interface velox.api.layer1.Layer1ApiMboDataListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiMboDataListener
onMboCancel, onMboReplace, onMboSendMethods inherited from interface velox.api.layer1.Layer1ApiTradingListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiTradingListener
onBalance, onOrderExecuted, onOrderUpdated, onStatus
-
Constructor Details
-
Layer1ApiDepthFreezer
-
-
Method Details
-
onDepth
Description copied from interface:Layer1ApiDataListenerDepth data update. This is an absolute update, not a delta: the size becomes the total size at that price level. A size of 0 removes the level from the book. Bookmap sends the full initial book as a sequence of these calls afterLayer1ApiInstrumentListener.onInstrumentAdded(java.lang.String, velox.api.layer1.data.InstrumentInfo).- Specified by:
onDepthin interfaceLayer1ApiDataListener- Overrides:
onDepthin classLayer1ApiUpstreamRelay- Parameters:
alias- instrument aliasisBid- true if it is for bids, false for asksprice- price where size changed, in tickssize- new total size at the level, 0 to remove the level
-
onUserMessage
Description copied from class:Layer1ApiUpstreamRelaySend an upstream event. Allows incorporating arbitrary functionality into protocol.This is the extension point of the upstream direction: any layer or the provider may emit an arbitrary object, and it travels towards the GUI through every layer above the origin. The counterpart for the downstream direction is
Layer1ApiAdminProvider.sendUserMessage(Object).Contract for layers: inspect the message by type, act on the ones you understand and pass every other message on unchanged. Swallowing an unknown message breaks layers above you.
Messages emitted by Bookmap use classes from
velox.api.layer1.messages. Some of them are sent in response to a downstream request and arrive asynchronously, after the correspondingsendUserMessagecall has already returned.For a
SelectAccountMessagearriving afterLayer1ApiUpstreamRelay.close(), selected index is set to 0 instead of dropping the message. Thus, provider thread blocked inSelectAccountMessage.get()does not hang forever.- Specified by:
onUserMessagein interfaceLayer1ApiAdminListener- Overrides:
onUserMessagein classLayer1ApiUpstreamRelay- Parameters:
data- Message content, never null
-