FMIceLinkPromiseBase Class Reference

Inherits from FMIceLinkFuture : FMIceLinkFutureBase : NSObject
Conforms to T
__covariant
Declared in FMIceLinkPromiseBase.h
FMIceLinkPromiseBase.m

Overview

Promise base properties/methods.

The type of the result.

+ allWithPromises:

Returns a promise that resolves when all passed in promises resolve.
+ (FMIceLinkFuture<id> *)allWithPromises:(NSMutableArray *)promises

Parameters

promises

The promises to check.

Discussion

Returns a promise that resolves when all passed in promises resolve.

Declared In

FMIceLinkPromiseBase.h

– doAllWithPromises:counter:

Internal DoAll.
- (void)doAllWithPromises:(NSMutableArray *)promises counter:(FMIceLinkAtomicInteger *)counter

Discussion

Internal DoAll.

Declared In

FMIceLinkPromiseBase.h

– id

Gets the identifier of this promise.
- (NSString *)id

Discussion

Gets the identifier of this promise.

Declared In

FMIceLinkPromiseBase.h

– init

Initializes a new instance of the FMIceLinkPromiseBase`1 class.
- (instancetype)init

Discussion

Initializes a new instance of the FMIceLinkPromiseBase`1 class.

Declared In

FMIceLinkPromiseBase.h

– processWithPromise:resolve:reject:

Processes the specified promise.
- (void)processWithPromise:(NSObject<FMIceLinkIPromise> *)promise resolve:(FMIceLinkAction1<T> *)resolve reject:(FMIceLinkAction1<NSException*> *)reject

Parameters

promise

The promise.

resolve

The resolve.

reject

The reject.

Discussion

Processes the specified promise.

Declared In

FMIceLinkPromiseBase.h

– processWithPromise:resolveBlock:rejectBlock:

Processes the specified promise.
- (void)processWithPromise:(NSObject<FMIceLinkIPromise> *)promise resolveBlock:(void ( ^ ) ( T ))resolveBlock rejectBlock:(void ( ^ ) ( NSException *))rejectBlock

Parameters

promise

The promise.

resolveBlock

The resolve.

rejectBlock

The reject.

Discussion

Processes the specified promise.

Declared In

FMIceLinkPromiseBase.h

– processWithPromiseAndResolveBlockAndRejectBlock

Processes the specified promise.

@inlineparam promise The promise. @inlineparam resolveBlock The resolve. @inlineparam rejectBlock The reject.

- (void ( ^ ) ( NSObject<FMIceLinkIPromise> *, void ( ^ ) ( T ) , void ( ^ ) ( NSException *) ))processWithPromiseAndResolveBlockAndRejectBlock

Discussion

Processes the specified promise.

@inlineparam promise The promise. @inlineparam resolveBlock The resolve. @inlineparam rejectBlock The reject.

Declared In

FMIceLinkPromiseBase.h

+ promiseBase

Initializes a new instance of the FMIceLinkPromiseBase`1 class.
+ (FMIceLinkPromiseBase *)promiseBase

Discussion

Initializes a new instance of the FMIceLinkPromiseBase`1 class.

Declared In

FMIceLinkPromiseBase.h

– rejectAsyncWithException:

Rejects the promise asynchronously.
- (FMIceLinkFuture<id> *)rejectAsyncWithException:(NSException *)exception

Parameters

exception

The exception. @return

Discussion

Rejects the promise asynchronously.

Declared In

FMIceLinkPromiseBase.h

+ rejectNowWithEx:

Creates a promise and rejects it immediately.
+ (FMIceLinkFuture<id> *)rejectNowWithEx:(NSException *)ex

Parameters

ex

The exception.

Discussion

Creates a promise and rejects it immediately.

Declared In

FMIceLinkPromiseBase.h

– rejectWithException:

Rejects the promise.
- (bool)rejectWithException:(NSException *)exception

Parameters

exception

The exception. @return

Discussion

Rejects the promise.

Declared In

FMIceLinkPromiseBase.h

– resolveAsyncWithResult:

Resolves the promise asynchronously.
- (FMIceLinkFuture<id> *)resolveAsyncWithResult:(T)result

Parameters

result

The result. @return

Discussion

Resolves the promise asynchronously.

Declared In

FMIceLinkPromiseBase.h

+ resolveNow

Creates a promise and resolves it immediately using a null result value.
+ (FMIceLinkFuture<id> *)resolveNow

Discussion

Creates a promise and resolves it immediately using a null result value.

Declared In

FMIceLinkPromiseBase.h

+ resolveNowWithResult:

Creates a promise and resolves it immediately using the given result value.
+ (FMIceLinkFuture<id> *)resolveNowWithResult:(id)result

Parameters

result

The result.

Discussion

Creates a promise and resolves it immediately using the given result value.

Declared In

FMIceLinkPromiseBase.h

– resolveWithResult:

Resolves the promise.
- (bool)resolveWithResult:(T)result

Parameters

result

The result. @return

Discussion

Resolves the promise.

Declared In

FMIceLinkPromiseBase.h

+ wrapPromiseWithCallback:

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.
+ (FMIceLinkFuture<id> *)wrapPromiseWithCallback:(FMIceLinkFunction0<FMIceLinkFuture<id> *> *)callback

Parameters

callback

The callback function.

Discussion

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.

Declared In

FMIceLinkPromiseBase.h

+ wrapPromiseWithCallbackBlock

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.

@inlineparam callbackBlock The callback function.

+ (FMIceLinkFuture<id> *( ^ ) ( FMIceLinkFuture<id> *( ^ ) ( ) ))wrapPromiseWithCallbackBlock

Discussion

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.

@inlineparam callbackBlock The callback function.

Declared In

FMIceLinkPromiseBase.h

+ wrapPromiseWithCallbackBlock:

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.
+ (FMIceLinkFuture<id> *)wrapPromiseWithCallbackBlock:(FMIceLinkFuture<id> *( ^ ) ( ))callbackBlock

Parameters

callbackBlock

The callback function.

Discussion

Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown.

Declared In

FMIceLinkPromiseBase.h