|
ArcGIS Runtime SDK for iOS
100.9
|
Base class for operations. This adds the ability to register a listener to the AGSOperationBase. It also adds the concept of an error and a result.
Instance Methods | |
| (void) | - cancel |
| (void) | - execute |
| (BOOL) | - isRegisteredListener: |
| (void) | - registerListener:forCompletion: |
| (void) | - unregisterListener: |
Properties | |
| BOOL | canceled |
| NSError * | error |
| void(^ | internalCompletion )(void) |
| id | result |
| BOOL | startAsynchronously |
| AGSOperationState | state |
| - (void) cancel |
Cancels the operation.
| - (void) execute |
Starts the operation
| - (BOOL) isRegisteredListener: | (id) | listener |
Returns whether or not the specified object is a registered as a listener to this operation.
| - (void) registerListener: | (id) | listener | |
| forCompletion: | (void(^)(id __nullable result, NSError *__nullable error)) | completion | |
Adds a completion handler to the operation for the specified listener. If you are using this option, you can unregister a completionHandler for a listener if you need to. When there are no more listeners the operation will be canceled automatically.
| listener | The listener to add the completion block for. |
| completion | The completion handler to be called. |
| - (void) unregisterListener: | (id) | listener |
Removes the registered completion handler to the operation for the specified listener. When there are no more listeners the operation will be canceled automatically. To avoid any potential retain cycles the listener is not retained by the operation. Unregistering is just the way to tell the operation that you no longer care about getting the completion event.
| listener | The listener to unregister |
|
readnonatomicassigninherited |
Whether or not cancel has been called on the operation. "Canceled" is a modifier on the current state since:
|
readnonatomicstrong |
The error, if any, that occurred.
|
readwritenonatomiccopyinherited |
The block the operation will call to signify to the operation queue that the operation is complete. This block is reserved for use by the AGSOperationQueue. Do not assign your own block to this.
|
readnonatomicstrong |
The results of an operation. It will be of type NSDictionary when the result is json, AGSImage when the result is an image, and NSData when anything else.
|
readnonatomicassigninherited |
If an operation does all or most of it's work in the execute method it should return YES for this. If YES then the operation queue will dispatch this async to a global concurrent queue with the QOS that matches the qualityOfService specified on the AGSOperationQueue. If NO then the you are responsible for returning quickly from execute and doing the operation's work on a different queue. Either way the completion block must be called when the operation is finished or done being canceled.
|
readnonatomicassigninherited |
The current state of the operation.