Each object path in the data layer has a subscription handler that is responsible for it, subscription handlers hold a list of subscribed visualizers and are responsible for sending messages whenever the object data changes.
Methods ¶
Instance Methods ¶
getObjectName()
→ str
Returns the name of the object that the handler is representing.
enableSnapshotStorage()
If snapshot storage is disabled, turns it on and saves a snapshot of the object being watched. After calling this method, any time a snapshot is needed it will be loaded directly from the backend.
disableSnapshotStorage()
If snapshot storage is enabled, turns it off and removes the snapshot from the backend. After calling this method, any time a snapshot is needed it will be build by accessing the watched object.
isSnapshotStorageEnabled()
-:> bool
Returns true if snapshot storage is enabled.
addChildHandler(child_name, handler)
Adds handler
as a child handler, using child_name
as the path component.
removeChildHandler(child_name)
Removes the handler found under the child_name
key.
processAndSendMessage(message)
Processes (updates saved snapshot if needed) and send message to all subscribed visualizers.
onVisualizerAdded()
This callback is called whenever a visualizer was added, a custom data layer implementation, should call this to ensure that initial information is sent to new visualizers.