Inherits from NSObject
Declared in RKRequestQueue.h
RKRequestQueue.m

Overview

A lightweight queue implementation responsible for dispatching and managing RKRequest objects

Tasks

Other Methods

Other Methods

  • – responseDidLoad:

    Invoked via observation when a request has loaded a response. Remove the completed request from the queue and continue processing

Properties

concurrentRequestsLimit

The number of current requests supported by this queue Defaults to 5

@property (nonatomic) NSUInteger concurrentRequestsLimit

Declared In

RKRequestQueue.h

count

Returns the number of requests in the queue

@property (nonatomic, readonly) NSUInteger count

Declared In

RKRequestQueue.h

delegate

The delegate to inform when the request queue state machine changes

@property (nonatomic, assign) NSObject<RKRequestQueueDelegate> *delegate

Discussion

If the object implements the RKRequestQueueDelegate protocol, it will receive request lifecycle event messages.

Declared In

RKRequestQueue.h

loadingCount

Returns the total number of requests that are currently loading

@property (nonatomic, readonly) NSUInteger loadingCount

Declared In

RKRequestQueue.h

requestTimeout

Request timeout value used by the queue Defaults to 5 minutes (300 seconds)

@property (nonatomic, assign) NSUInteger requestTimeout

Declared In

RKRequestQueue.h

showsNetworkActivityIndicatorWhenBusy

When YES, this queue will spin the network activity in the menu bar when it is processing requests

@property (nonatomic) BOOL showsNetworkActivityIndicatorWhenBusy

Discussion

Default: NO

Currently, this implementation does not work across queues at the moment. Each queue will manipulate the activity indicator indepedently of all others.

Declared In

RKRequestQueue.h

suspended

Gets the flag that determines if new load requests are allowed to reach the network.

@property (nonatomic) BOOL suspended

Discussion

Because network requests tend to slow down performance, this property can be used to temporarily delay them. All requests made while suspended are queued, and when suspended becomes false again they are executed.

Declared In

RKRequestQueue.h

Class Methods

setSharedQueue:

Set the global queue

+ (void)setSharedQueue:(RKRequestQueue *)requestQueue

Declared In

RKRequestQueue.h

sharedQueue

Return the global queue

+ (RKRequestQueue *)sharedQueue

Declared In

RKRequestQueue.h

Instance Methods

addRequest:

Add an asynchronous request to the queue and send it as as soon as possible

- (void)addRequest:(RKRequest *)request

Declared In

RKRequestQueue.h

cancelAllRequests

Cancel all active or pending requests.

- (void)cancelAllRequests

Declared In

RKRequestQueue.h

cancelRequest:

Cancel a request that is in progress

- (void)cancelRequest:(RKRequest *)request

Declared In

RKRequestQueue.h

cancelRequestsWithDelegate:

Cancel all requests with a given delegate

- (void)cancelRequestsWithDelegate:(NSObject<RKRequestDelegate> *)delegate

Declared In

RKRequestQueue.h

containsRequest:

Returns YES if the specified request is in this queue

- (BOOL)containsRequest:(RKRequest *)request

Declared In

RKRequestQueue.h

responseDidLoad:

Invoked via observation when a request has loaded a response. Remove the completed request from the queue and continue processing

- (void)responseDidLoad:(NSNotification *)notification

Declared In

RKRequestQueue.m

start

Start checking for and processing requests

- (void)start

Declared In

RKRequestQueue.h