Skip to content
zackliston edited this page Dec 30, 2014 · 1 revision

ZLTask

###Overview ZLTask is the way to initialize and then queue a task on the TaskManager. At the very minimum, the taskType must be set. The rest of the properties have default values that can be changed by you (the jsonData is empty if not set by you).

###Properties

name type required defaultValue
taskType string Yes n/a
jsonData dictionary No null
majorPriority integer No 10
minorPriority integer No 10
requiresInternet boolean No false
maxNumberOfRetries integer No 3
shouldHoldAndRestartAfterMaxRetries boolean No false

####taskType This string lets the TaskManager know what ZLManager and ZLTaskWorker subclass are responsible for this Task

####jsonData You can set whatever information in this dictionary that you would like as long as it is json serializable (includes only NSNumber, NSString, NSArray, and NSDictionary). Your TaskWorker will use this information to do work.

###Convenience Initializers

  • initWithTaskType:(NSString *)taskType jsonData:(NSDictionary *)jsonData

Clone this wiki locally