NetworkQueue class

Manages multiple Request objects.

Syntax

@interface NetworkQueue : NSOperationQueue <ProgressDelegate> <RequestDelegate> <NSCopying>

Base protocols

Members

All members of NetworkQueue, including inherited members.

Methods
Method Description
+ (id) queue Convenience constructor.
- (void) reset Resets the queue; it cancels all operations, clears delegates, and suspends operations.
- (void) startBatch Starts the queue.
Inherited members from ProgressDelegate
Member Description
- (void) request: (id< Requesting >) request didReceiveBytes: (long long) bytes Delegate method called when the request receives data.
- (void) request: (id< Requesting >) request didSendBytes: (long long) bytes Delegate method called when the request sends data.
- (void) request: (id< Requesting >) request incrementDownloadSizeBy: (long long) newLength Delegate method called when the request needs to change the download content size.
- (void) request: (id< Requesting >) request incrementUploadSizeBy: (long long) newLength Delegate method called when the request needs to change the length of the content to be uploaded.
- (void) setProgress: (float) newProgress Delegate method called to update UIProgressViews.
Inherited members from RequestDelegate
Member Description
- (void) authenticationNeededForRequest: (Request *) request Default delegate method called when credentials must be supplied for authentication.
- (void) proxyAuthenticationNeededForRequest: (Request *) request Default delegate method called when the proxy requires credentials for authentication.
- (void) request: (Request *) request didReceiveData: (const NSData *const) data_in Default delegate method invoked when incoming data is available.
- (void) requestFailed: (Request *) request Default delegate method called when the request fails.
- (void) requestFinished: (Request *) request Default delegate method called when the request is completed.
- (void) requestRedirected: (Request *) request Default delegate method called when the request gets redirected.
- (void) requestStarted: (Request *) request Default delegate method called when the request starts.

Usage

Manages batched HTTP requests, to track their overall progress, cancel them, and so on.