ArcGISStreamService

A DynamicEntityDataSource that receives a stream of observations from an ArcGIS stream service. Currently, this is the only concrete class deriving from DynamicEntityDataSource.

Members of this class allow an application to:

  • connect to and receive observations from an ArcGIS stream service

  • access metadata about the ArcGIS stream service

  • set a server-side filter on the service to limit the number and type of observations sent

In the current release, only stream services that send point geometries are supported.

To learn more about ArcGIS stream services see: ArcGIS Server - Stream Services[https://enterprise.arcgis.com/en/server/latest/publish-services/windows/stream-services.htm] in the ArcGIS Enterprise documentation.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(url: String)

Creates a new stream service.

Properties

Link copied to clipboard

Defines which observations are returned from the service. Use this property to define a filter that informs the server which observations to send on the stream. The filter may include spatial or attribute criteria (or both). Using this server-side filter is useful for limiting how much data must be handled in the client application, which can help with application performance and memory footprint.

Link copied to clipboard

Metadata that describes the ArcGIS stream service. This property is null by default and is populated when the data source loads.

Link copied to clipboard
val url: String

The URL of the stream service.

Inherited properties

Link copied to clipboard

The current network connection status of the DynamicEntityDataSource. This property contains the state of the connection throughout the lifetime of the data source. The initial value of this property is ConnectionStatus.Disconnected.

Link copied to clipboard

Notification that a DynamicEntityObservation was purged. This event is raised when a limit defined in DynamicEntityDataSource.purgeOptions was reached and a dynamic entity observation was purged from the local data cache.

Link copied to clipboard

Notification that a new DynamicEntityObservation was received. This event is raised for every observation received from the stream. To listen to only observations associated with a specific dynamic entity, use DynamicEntity.dynamicEntityChangedEvent.

Link copied to clipboard

Notification that a DynamicEntity was purged. This event is raised whenever the last observation associated with a dynamic entity was purged. When this happens, the DynamicEntity is also purged and will not be associated with any new observations streamed from the data source.

Link copied to clipboard

Notification that a new DynamicEntity was received. This event is raised when an observation was received that was not associated with any current DynamicEntity in the local cache. In this case, a new DynamicEntity is created and this event is raised.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Link copied to clipboard

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 DynamicEntityDataSource.reconnectionInterval between attempts.

Link copied to clipboard

A DynamicEntityDataSourcePurgeOptions that defines when observations are purged from the local data cache. 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 DynamicEntityDataSource.purgeOptions property to control app data storage for the local cache.

Link copied to clipboard

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.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
suspend fun connect(): Result<Unit>

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.

Link copied to clipboard
suspend fun disconnect(): Result<Unit>

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

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
suspend fun purgeAll(): Result<Unit>

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.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.