Class Layer1ApiStrategiesEchoMessagesLayer
- All Implemented Interfaces:
AutoCloseable,Layer1ApiAdminListenable,Layer1ApiAdminListener,Layer1ApiAdminProvider,Layer1ApiDataListenable,Layer1ApiDataListener,Layer1ApiDataProvider,Layer1ApiInstrumentListenable,Layer1ApiInstrumentListener,Layer1ApiInstrumentProvider,Layer1ApiListener,Layer1ApiMboDataListenable,Layer1ApiMboDataListener,Layer1ApiProvider,Layer1ApiTradingListenable,Layer1ApiTradingListener,Layer1ApiTradingProvider,LayerApiListenable,Layer1ApiTimeSource
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessage is sent using
Layer1ApiAdminProvider.sendUserMessage(Object)
Layer1ApiStrategiesEchoMessagesLayer will send it back with
Layer1ApiAdminListener.onUserMessage(Object)}
It will be done in ASYNCHRONOUS manner. It will still be in sync with
data coming from provider, but sendUserMessage will likely return before
the message reaches the target.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfaceNested classes/interfaces inherited from interface velox.api.layer1.layers.Layer1ApiTimeSource
Layer1ApiTimeSource.Layer1TimeSourceShortcutAllowed -
Field Summary
Fields inherited from class velox.api.layer1.layers.Layer1ApiInjectorRelay
upstreamInjectorLockFields 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
Methods inherited from class velox.api.layer1.layers.Layer1ApiInjectorRelay
close, inject, injectSynchronously, onBalance, onConnectionLost, onConnectionRestored, onDepth, onInstrumentAdded, onInstrumentAlreadySubscribed, onInstrumentNotFound, onInstrumentRemoved, onLoginFailed, onLoginSuccessful, onMarketMode, onMboCancel, onMboReplace, onMboSend, onOrderExecuted, onOrderUpdated, onStatus, onSystemTextMessage, onTrade, onUserMessage, safeInjectMethods inherited from class velox.api.layer1.layers.Layer1ApiRelay
formatPrice, getCurrentTime, getSource, getSupportedFeatures, getTimeSource, login, sendOrder, setProvider, subscribe, toString, unsubscribe, updateOrderMethods 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.Layer1ApiDataListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiInstrumentListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiInstrumentProvider
subscribeMethods inherited from interface velox.api.layer1.Layer1ApiMboDataListenable
addListener, removeListenerMethods inherited from interface velox.api.layer1.Layer1ApiTradingListenable
addListener, removeListener
-
Constructor Details
-
Layer1ApiStrategiesEchoMessagesLayer
-
-
Method Details
-
sendUserMessage
Description copied from interface:Layer1ApiAdminProviderSend a downstream event. Allows incorporating arbitrary functionality into protocol.This is the extension point of the downstream direction: the caller hands an arbitrary object to the layer below, which either handles it or passes it further down. The counterpart for the upstream direction is
Layer1ApiAdminListener.onUserMessage(Object).The call is synchronously propagated downstream. It must eventually be consumed by a layer, that will stop propagation and return the result back upwards. Layers are also allowed to alter it without consuming. Layers that do not recognize a message must forward it unchanged (see
Layer1ApiRelay). Messages that implementLayer1ApiIgnorableDownwardMessagemay reach the bottom of the stack unhandled. All others throw if unhandled.Some messages are requests whose reply is not the return value but an upstream
onUserMessagethat arrives later, possibly after this method has returned.- Specified by:
sendUserMessagein interfaceLayer1ApiAdminProvider- Overrides:
sendUserMessagein classLayer1ApiRelay- Parameters:
data- Message content, never null- Returns:
- response of the handling layer, or null if the message has no synchronous response or nobody handled it
-