Arc GISStream Service
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 in the ArcGIS Enterprise documentation.
Since
200.1.0
Constructors
Creates a new stream service from a portal item. The supported item types are com.arcgismaps.portal.PortalItemType.Feed and com.arcgismaps.portal.PortalItemType.StreamService.
Creates a new stream service.
Properties
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.
Metadata that describes the ArcGIS stream service. This property is null by default and is populated when the data source loads.
The com.arcgismaps.mapping.PortalItem the stream service was created from. The supported item types are com.arcgismaps.portal.PortalItemType.Feed and com.arcgismaps.portal.PortalItemType.StreamService.
Inherited properties
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.
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.
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.
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.
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.
The load status.
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.
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.
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
Cancels loading metadata for the Loadable object.
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.
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.