A base type for types representing a long running job on a server. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: | |
Inherited By: | DownloadPreplannedOfflineMapJob, EstimateTileCacheSizeJob, ExportTileCacheJob, ExportVectorTilesJob, GenerateGeodatabaseJob, GenerateOfflineMapJob, GeoprocessingJob, OfflineMapSyncJob, and SyncGeodatabaseJob |
Properties
- cancelAsyncTaskStatus : Enums.TaskStatus
- checkStatusTaskStatus : Enums.TaskStatus
- credential : Credential
- error : Error
- jobStatus : Enums.JobStatus
- jobType : Enums.JobType
- json : jsobject
- messages : list<JobMessage>
- progress : int
- requestConfiguration : RequestConfiguration
- serverJobId : string
- unknownJson : jsobject
- unsupportedJson : jsobject
- url : url
Signals
- cancelAsyncTaskStatusChanged()
- checkStatusTaskStatusChanged()
- credentialChanged()
- jobErrorChanged()
- messageAdded(JobMessage message)
- progressChanged()
- requestConfigurationChanged()
- statusChanged(JobStatus status)
Methods
- string cancelAsync()
- bool cancelTask(string taskId)
- string checkStatus()
- bool pause()
- bool start()
Detailed Description
Note: You cannot declare or create a component of this type in QML code.
A job is initiated when it is submitted to the server. When the server accepts the job, it assigns a unique ID to the job which is available in serverJobID. The client then periodically polls for the status of the job on the server. If the job completes successfully, the result of the job is downloaded, otherwise an error is provided when the job fails.
Job instances created by tasks and returned by task methods are returned in a JobStatus::NotStarted state and Job::resume must be called to start the associated operation.
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
Type | Default Property |
---|---|
Credential | credential (since Esri.ArcGISRuntime 100.1) |
RequestConfiguration | requestConfiguration (since Esri.ArcGISRuntime 100.1) |
See also Cancelable, JsonSerializable, and RemoteResource.
Property Documentation
The current status of the asynchronous cancelAsync operation (read-only).
This property was introduced in Esri.ArcGISRuntime 100.14.
Returns the current status of the checkStatus method (read-only).
Note: The status indicates if the current job status was retrieved from the service.
This property was introduced in Esri.ArcGISRuntime 100.1.
See also Enums.TaskStatus.
[default] credential : Credential |
The Credential for authenticating against a secured service.
This is only applicable if using a service that is secured.
This property was introduced in Esri.ArcGISRuntime 100.1.
error : Error |
Returns the error encountered during job execution, if any (read-only).
The error is available when the job status is Enums.JobStatusFailed.
Returns the current status of this Job (read-only).
See also Enums.JobStatus.
Returns the JobType of this Job (read-only).
See also Enums.JobType.
The JSON representation of this object.
This JSON can be used to instantiate the type instance.
messages : list<JobMessage> |
The informational messages produced during execution of the job.
Returns the current progress of the job as the percentage complete (read-only).
When the progress value changes, the Job::progressChanged signal is emitted.
This property was introduced in Esri.ArcGISRuntime 100.1.
[default] requestConfiguration : RequestConfiguration |
The configuration parameters used for network requests sent by this job.
This property was introduced in Esri.ArcGISRuntime 100.1.
Returns the unique job ID of this Job on the server on which it is executing (read-only).
Returns the unknown JSON from the source JSON.
See also JsonSerializable.
Returns the unsupported data from the source JSON.
See also JsonSerializable.
Signal Documentation
Emitted when the cancelAsyncTaskStatus property changes.
Note: The corresponding handler is onCancelAsyncTaskStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Emitted when the checkStatusTaskStatus property changes.
Note: The corresponding handler is onCheckStatusTaskStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
Emitted when the credential property changes.
Note: The corresponding handler is onCredentialChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
Emitted when the error property of this Job changes.
Note: The corresponding handler is onJobErrorChanged
.
messageAdded(JobMessage message) |
Indicates that a new JobMessage was added to messages.
- message - The new job message
Note: The corresponding handler is onMessageAdded
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Emitted when the progress property of this Job changes.
Note: The corresponding handler is onProgressChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
Emitted when the requestConfiguration property changes.
Note: The corresponding handler is onRequestConfigurationChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.1.
When status changes, the jobStatus signal is emitted.
- status - The new job status
Note: The corresponding handler is onStatusChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.14.
Method Documentation
Cancels this Job and waits for any asynchronous, server-side operations to be canceled.
The job is canceled and will result in a Enums.JobStatusFailed status after all cancellation tasks have completed. For jobs running on a server, a cancel request is sent for the associated serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. Examples of server-side jobs include:
In addition, the GenerateOfflineMapJob is composed of several server-side jobs, depending on the types of layers in your Map. Canceling this high-level job will also send a cancel request to the underlying server jobs.
Upon calling this method, the jobStatus is immediately set to Enums.JobStatusCanceling.
Returns a string representing the task ID of the asynchronous task.
This method was introduced in Esri.ArcGISRuntime 100.14.
Cancels the job with the specified taskId.
The job is canceled and goes into a failure status Enums.JobStatusFailed For jobs running on a server, a cancel request will be sent for the associated Job::serverJobId. You should always cancel unneeded jobs (for example when exiting your app) to avoid placing unnecessary load on the server. For example, server-side jobs include:
In addition, the GenerateOfflineMapJob is composed of several server-side jobs, depending on the types of layers in your Map. Canceling this high-level job will also send a cancel request to the underlying server jobs. Returns true
if the job was canceled, false
if the job is already succeeded or an error occurred.
This method was introduced in Esri.ArcGISRuntime 100.1.
See also Cancelable.
Checks the current job status from the service.
The checkStatusTaskStatusChanged signal will emit once the operation is complete.
The task completes after the status has been checked. If the job is polling the server for status and is in a time gap, then calling this method will ensure a request is sent right away.
Note: It is possible the task can complete successfully and retrieve the same status. In that case, jobStatusChanged will not be emitted.
This method was introduced in Esri.ArcGISRuntime 100.1.
See also jobStatusChanged and checkStatusTaskStatusChanged.
Pauses the job.
Returns true
if the job was successfully paused; false
if it is already done, or if there is an error.
Starts or resumes this job. Call this method to start the job initially and also to resume it after it is paused.
Returns true
if the job was successfully started/resumed; false
if it is already done, or if there is an error.