AGSRunLoopOperation Class Reference


Description

Since:
2.1
Inheritance diagram for AGSRunLoopOperation:
AGSRequestOperation AGSImageRequestOperation AGSJSONRequestOperation AGSTileRequestOperation AGSDynamicLayerImageRequestOperation

List of all members.

Public Member Functions

(void) - finishWithResult:
(void) - operationDidStart
(void) - operationWillFinish

Properties

SEL action
AGSIdBlock completionHandler
SEL errorAction
AGSErrorBlock errorHandler
id result
NSThread * runLoopThread
id target
BOOL waitUntilActionSelectorIsDone

Member Function Documentation

- (void) finishWithResult: (id)  result  

A subclass should call finishWithError: when the operation is complete, passing the desired result. If an error ocurred, pass an NSError object and the errorAction selector will be called. Any other type of result will cause the action selector to be fired.

Note that this will call -operationWillFinish before returning.

Since:
2.1
- (void) operationDidStart  

A function that can be overridden by subclasses to start actual operation work.

Since:
2.1
- (void) operationWillFinish  

A function that can be overridden by subclasses to know when the operation was finished. This may get called even if operationDidStart was never called.

Since:
2.1

Property Documentation

- (SEL) action [read, write, assign]

Selector to be called if the operation succeeds. The selector must represent a method that accepts 2 arguments of type NSOperation and NSDictionary respectively.

Since:
2.1
- (AGSIdBlock) completionHandler [read, write, copy]

Completion handler that will be called when the operation is completed successfully. This handler will only be called when a target is not specified. The AGSIdBlock is called with an object of type id passed as the parameter.

Since:
2.3
- (SEL) errorAction [read, write, assign]

Selector to be called if the operation fails. The selector must represent a method that accepts 2 arguments of type NSOperation and NSError respectively.

Since:
2.1
- (AGSErrorBlock) errorHandler [read, write, copy]

Error handler that will be called when an error is returned by the operation. This handler will only be called when a target is not specified. The AGSErrorBlock is called with an object of type NSError passed as the parameter.

Since:
2.3
- (id) result [read, retain]

The results of an operation.

Since:
2.1
- (NSThread*) runLoopThread [read, retain]

The thread that this concurrent operation should start it's work on.

Since:
2.1
- (id) target [read, write, assign]

Target class to perform the operation from.

Since:
2.1
- (BOOL) waitUntilActionSelectorIsDone [read, write, assign]

Defaults to NO, but it is helpful if this operation is a dependency for another operation and the action selector processes some results that the dependent operation needs before it can start.

Since:
2.1