DynamicEntityDataSource QML Type

  • Esri.ArcGISRuntime
  • DynamicEntityDataSource
  • A dynamic entity data source that streams observations to a client. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 200.1
    Inherits:

    Object

    Inherited By:

    ArcGISStreamService and CustomDynamicEntityDataSource

    Properties

    Signals

    Methods

    Detailed Description

    The DynamicEntityDataSource class is the base class for classes that stream dynamic entity data. The class provides methods and properties that allow:

    • maintenance of a persistent connection for streaming
    • control over the storage of observations in its local data cache
    • notification of received or purged observations

    This class is used as the data source for a DynamicEntityLayer.

    Note: You cannot declare or create a component of this type in QML code.

    See also Loadable, RemoteResource, and ArcGISStreamService.

    Property Documentation

    [read-only] connectDataSourceStatus : Enums.TaskStatus

    Returns the status of the connectDataSource operation (read-only).

    See also Enums.TaskStatus.


    [read-only] connectionError : Error

    The current network connection Error (read-only).

    This property is null until an attempt to connect the data source is made. If a connection attempt succeeds, this property is set to null. If a connection fails, this property contains the platform-specific error.

    If maximumReconnectionAttempts is greater than 0, this property will contain the exception that caused the data source to lose the connection.


    [read-only] connectionStatus : Enums.ConnectionStatus

    The current network connection status of the DynamicEntityDataSource (read-only).

    This property contains the state of the connection throughout the lifetime of the data source. The initial value of this property is Enums.ConnectionStatusDisconnected.


    [default] credential : Credential

    The credential to be used for a secured online data source.


    [read-only, since Esri.ArcGISRuntime 200.2] deleteEntityStatus : Enums.TaskStatus

    Returns the status of the deleteEntity operation (read-only).

    This property was introduced in Esri.ArcGISRuntime 200.2.

    See also Enums.TaskStatus.


    [read-only] disconnectDataSourceStatus : Enums.TaskStatus

    Returns the status of the disconnectDataSource operation (read-only).

    See also Enums.TaskStatus.


    [read-only] dynamicEntityDataSourceType : Enums.DynamicEntityDataSourceType

    The type of dynamic entity data source (read-only).


    maximumReconnectionAttempts : int

    The maximum number of attempts to reconnect after a connection fails.

    This property informs the data source to attempt reconnection if a connection is lost. When a connection fails, the data source attempts to reconnect the specified number of times waiting reconnectionInterval between attempts.

    If reconnection fails on the final attempt, connectionStatus is set to Enums.ConnectionStatusFailed and the connectionError is set to the platform specific connection error.

    The default value is 12. The first 2 connection attempts are made without waiting the specified reconnectionInterval between attempts.


    [read-only] purgeAllStatus : Enums.TaskStatus

    The current status of the asynchronous purgeAll operation (read-only).

    See also Enums.TaskStatus.


    [read-only] purgeOptions : DynamicEntityDataSourcePurgeOptions

    A DynamicEntityDataSourcePurgeOptions that defines when observations are purged from the local data cache (read-only).

    Data received from the DynamicEntityDataSource is stored in memory on the client and can grow quickly depending on the number of dynamic entities and frequency of updates. If purge options are not set appropriately, a data source may store too many observations in its local data cache and cause performance and memory issues for the application. Use the purgeOptions property to control app data storage for the local cache.

    This property must be set before loading the data source and cannot be changed once the data source is loaded.

    By default, purge options are set to remove observations from the data cache when a maximum limit of 100,000 observations is reached.

    Note that you can clear all observations from the cache using purgeAll. This clears all data from the local data cache, but does not disconnect from the stream. Dynamic entities and observations will continue to be added to the local data cache as they come from the stream.


    reconnectionInterval : double

    The time (in seconds) to wait between attempts to reconnect.

    This property sets the amount of time delay between reconnection attempts after a connection fails. The default value is 10 seconds.

    See also maximumReconnectionAttempts.


    [default] requestConfiguration : RequestConfiguration

    The configuration parameters used for network requests sent by the data source.


    [read-only] url : url

    Returns the dynamic entity data source URL (read-only).


    Signal Documentation

    connectDataSourceStatusChanged()

    Emitted when the connectDataSourceStatus property changes.

    Note: The corresponding handler is onConnectDataSourceStatusChanged.


    credentialChanged()

    Emitted when the credential property changes.

    Note: The corresponding handler is onCredentialChanged.


    [since Esri.ArcGISRuntime 200.2] deleteEntityStatusChanged()

    Emitted when the deleteEntityStatus property changes.

    Note: The corresponding handler is onDeleteEntityStatusChanged.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    disconnectDataSourceStatusChanged()

    Emitted when the disconnectDataSourceStatus property changes.

    Note: The corresponding handler is onDisconnectDataSourceStatusChanged.


    dynamicEntityObservationPurged()

    Notification that a DynamicEntityObservation has been purged.

    Note: The corresponding handler is onDynamicEntityObservationPurged.


    dynamicEntityObservationReceived()

    Notification that a WebSocket received a new DynamicEntityObservation.

    Note: The corresponding handler is onDynamicEntityObservationReceived.


    dynamicEntityPurged()

    Notification that a DynamicEntity is purged.

    Note: The corresponding handler is onDynamicEntityPurged.


    dynamicEntityReceived()

    Notification that a WebSocket received a new DynamicEntity.

    Note: The corresponding handler is onDynamicEntityReceived.


    maximumReconnectionAttemptsChanged()

    Emitted when the maximumReconnectionAttempts property changes.

    Note: The corresponding handler is onMaximumReconnectionAttemptsChanged.


    purgeAllStatusChanged()

    Emitted when the purgeAllStatus property changes.

    Note: The corresponding handler is onPurgeAllStatusChanged.


    reconnectionIntervalChanged()

    Emitted when the reconnectionInterval property changes.

    Note: The corresponding handler is onReconnectionIntervalChanged.


    Method Documentation

    [since Esri.ArcGISRuntime 200.2] void addObservation(Geometry geometry, jsobject attributes)

    Adds or updates the newly-received observation data in the data source store.

    • geometry - Geometry of the associated observation. This can be null.
    • attributes - The attributes of the associated observation. This can be empty.

    This method was introduced in Esri.ArcGISRuntime 200.2.


    bool cancelTask(string taskId)

    Cancel the task with the ID taskId.

    Returns false if the task cannot be canceled or there is no task with the specified id taskId.

    See also Cancelable.


    string connectDataSource()

    Connects to a service that provides dynamic entity observations.

    Data does not start streaming from the dynamic entity data source until it's loaded and connected. Once the connection is successfully established, data begins to flow from the stream.

    Use this method to explicitly connect to the data source. This call loads the data source if it is not already loaded and then initiates a persistent connection to the service that provides the observation stream. When this method completes, the connectionStatus is set to connected or failed.

    Note that a data source connection is initiated implicitly if the data source is contained by a DynamicEntityLayer and added to a map or scene. Returns a string representing the task ID of the asynchronous task.


    [since Esri.ArcGISRuntime 200.2] string deleteEntity(string entityId)

    Deletes the dynamic entity identified by the id value from the data source store.

    • entityId - The value of the unique id field identifying an entity. For example, a track id field value for track-aware data or an object id value for discrete data.

    Returns a string representing the task ID of the asynchronous task.

    This method was introduced in Esri.ArcGISRuntime 200.2.


    string disconnectDataSource()

    Closes the connection to a service.

    Use this method to explicitly disconnect from a data source. When this method completes, the connectionStatus is set to disconnected or failed.

    If this method is called when a data source has a connectionStatus of connecting, the current connection attempt is cancelled.

    Returns a string representing the task ID of the asynchronous task.


    string purgeAll()

    Removes all dynamic entity observations from the in-memory data cache as well as from the map or scene.

    Sometimes, a large number of dynamic entity observations can crowd the display and make information hard to interpret. Use this method to clear (purge) all dynamic entity observations to remove stale information and limit the amount of memory consumed. This does not disconnect you from the service, so new dynamic entity observations continue to display as they become available.

    Returns a string representing the task ID of the asynchronous task.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.