Class Layer1ApiGlobalDynamicHistoryStateMessage

java.lang.Object
velox.api.layer1.messages.Layer1ApiGlobalDynamicHistoryStateMessage
All Implemented Interfaces:
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromGui, velox.api.layer1.messages.Layer1ApiIgnorableUpwardMessage

public class Layer1ApiGlobalDynamicHistoryStateMessage extends Object implements Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromGui
Reports the global state of the experimental dynamic history ("zoom-out history") feature.

Sent by Bookmap to Layer1ApiAdminListener.onUserMessage(Object): once when the add-on is set up, and again whenever the user switches the feature on or off. An add-on that is not interested in the feature simply ignores the message.

Useful for any add-on, whether or not it implements Layer1ApiDynamicHistoryListener:

  • an add-on that does implement it can tell whether the requests it makes through DynamicHistoryAccessInterface can return anything at all, instead of discovering it from empty results;
  • an add-on that does not can still react to the feature - for example to tell the user that it has nothing to show for the zoomed-out part of the chart.
See Also:
  • Field Details

    • enabled

      public final boolean enabled
      Whether the experimental dynamic history feature is switched on by the user.

      This is the global state. It being true does not guarantee that zoomed-out history can actually be loaded for a particular instrument - that additionally depends on the user's license and on what the server has recorded for that instrument. Add-ons holding a DynamicHistoryAccessInterface can check the per-instrument part with MetadataType.firstEventTimeType().

  • Constructor Details

    • Layer1ApiGlobalDynamicHistoryStateMessage

      public Layer1ApiGlobalDynamicHistoryStateMessage(boolean enabled)
      Parameters:
      enabled - whether the feature is switched on
  • Method Details