ArcGIS Runtime SDK for iOS: AGSJob Class Reference
ArcGIS Runtime SDK for iOS  100.7
AGSJob Class Reference

Description

A long running job on a remote server.

Instances of this class represent a long running job on a remote server.

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 avialable 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.

Since
100
Inheritance diagram for AGSJob:
AGSObject <AGSRemoteResource> <AGSJSONSerializable> AGSDownloadPreplannedOfflineMapJob AGSEstimateTileCacheSizeJob AGSExportTileCacheJob AGSExportVectorTilesJob AGSGenerateGeodatabaseJob AGSGenerateOfflineMapJob AGSGeoprocessingJob AGSOfflineMapSyncJob AGSSyncGeodatabaseJob

Instance Methods

(BOOL) - cancel
 
(id< AGSCancelable >) - checkStatusWithCompletion:
 
(BOOL) - pause
 
(void) - startWithStatusHandler:completion:
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 

Properties

AGSCredentialcredential
 
NSError * error
 
AGSJobType jobType
 
NSArray< AGSJobMessage * > * messages
 
NSProgress * progress
 
AGSRequestConfigurationrequestConfiguration
 
id result
 
NSString * serverJobID
 
AGSJobStatus status
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 
NSURL * URL
 

Method Documentation

§ cancel()

- (BOOL) cancel

Cancels the job. Returns a value indicating whether the job was successfully canceled.

Since
100
Deprecated:
100.1. Please use the cancel method through the NSProgress API (exposed via NSProgressReporting through the progress property).

§ checkStatusWithCompletion:()

- (id<AGSCancelable>) checkStatusWithCompletion: (void(^)(NSError *__nullable error))  completion

§ fromJSON:error:()

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

§ pause()

- (BOOL) pause

Pauses the job. Returns a value indicating whether the job was successfully paused.

Since
100
Deprecated:
100.1. Please use the pause method through the NSProgress API (exposed via NSProgressReporting through the progress property).

§ startWithStatusHandler:completion:()

- (void) startWithStatusHandler: (nullable void(^)(AGSJobStatus status))  statusHandler
completion: (void(^)(id __nullable result, NSError *__nullable error))  completion 

§ toJSON:()

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

§ credential

- (AGSCredential*) credential
readwritenonatomicstronginherited

Security credentials to access the remote resource. Only applicable if the resource is secured.

Since
100

§ error

- (NSError*) error
readnonatomicstrong

Error encountered during job execution, if any.

Since
100

§ jobType

- (AGSJobType) jobType
readnonatomicassign

The type of job

Since
100

§ messages

- (NSArray<AGSJobMessage*>*) messages
readnonatomiccopy

Informational messages produced during execution of the job.

Since
100

§ progress

- (NSProgress*) progress
readnonatomicstrong

The progress for this job. As a consumer of this progress property, you can observe it's property changes and pause, cancel, resume. Do not, however, set the readwrite properties of this progress object. Those are reserved for internal use. Setting them externally will corrupt the state and lead to undefined behavior.

Since
100.1

§ requestConfiguration

- (AGSRequestConfiguration*) requestConfiguration
readwritenonatomicstronginherited

The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.

Since
100

§ result

- (id) result
readnonatomicstrong

Result of the job.

Since
100

§ serverJobID

- (NSString*) serverJobID
readnonatomiccopy

Unique ID of the job on the server on which it is executing.

Since
100

§ status

- (AGSJobStatus) status
readnonatomicassign

Current status of the job.

Since
100

§ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

§ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100

§ URL

- (NSURL*) URL
readrequirednonatomicstronginherited

The URL of the remote resource.

Since
100