Declared in | OCClient/OCInvocationGroup.h |
Base class | NSObject |
Guides | Client Libraries (Tutorial)Client Libraries Conceptual Guide |
An invocation group executes the code including messages to the cloud service in a block asynchronously. You can put synchronous messages into the block to send them synchronously.
If messages are sent inside an invocation group synchronously they do not return an instance of NSError
on an error, but nil
and set the error property of the invocation context. This lets you use the messages to nil behavior of Objective-C. Additionally consecutive messages inside the invocation group are not dispatched anymore and always return nil
, if they have a type different to void
.
There is a single class method +executeBlock:
that starts the execution of an block containing the invocation group. The block gets a invocation context as its single argument:
[OCCInvocationGroup executeBlock:
^(OCCInvocationContext *context)
{
…
}];
By now there is a single class method +executeBlock:
that executes the block.
Executes the block.
+(void)executeBlock:(OCCInvocationGroupBlock)block;
This method creates an instance object of OCCInvocationContext
and runs the block asynchrounously passing the newly created instance as the single argument.
An internal queue is used.
Block that contains the code of an invocation group.
typedef void (^OCCInvocationGroupBlock)( OCCInvocationContext *context );