FMLiveSwitchPromise Class Reference

A promise. More...

Instance Methods

(NSException *) - failWithRejectActionBlock
 Appends a handler to be executed when the promise is rejected. More...
 
(FMLiveSwitchFuture< T > *) - failWithRejectActionBlock:
 Appends a handler to be executed when the promise is rejected. More...
 
(FMLiveSwitchFuture< T > *) - failWithRejectFunction:
 Appends a handler to be executed when the promise is rejected. More...
 
(NSException *) - failWithRejectFunctionBlock
 Appends a handler to be executed when the promise is rejected. More...
 
(FMLiveSwitchFuture< T > *) - failWithRejectFunctionBlock:
 Appends a handler to be executed when the promise is rejected. More...
 
(instancetype) - init
 Creates a new promise. More...
 
(instancetype) - initWithCallback:
 Creates a promise with a resolve callback and a reject callback. More...
 
(instancetype) - initWithCallbackBlock:
 Creates a promise with a resolve callback and a reject callback. More...
 
(FMLiveSwitchFuture< T > *) - thenWithResolveAction:
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< T > *) - thenWithResolveAction:rejectAction:
 Appends handlers to be executed when the promise is resolved or rejected. More...
 
(T) - thenWithResolveActionBlock
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< T > *) - thenWithResolveActionBlock:
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< T > *) - thenWithResolveActionBlock:rejectActionBlock:
 Appends handlers to be executed when the promise is resolved or rejected. More...
 
(NSException *) - thenWithResolveActionBlockAndRejectActionBlock
 Appends handlers to be executed when the promise is resolved or rejected. More...
 
(FMLiveSwitchFuture< id > *) - thenWithResolveFunction:
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< id > *) - thenWithResolveFunction:rejectAction:
 Appends handlers to be executed when the promise is resolved or rejected. More...
 
(T) - thenWithResolveFunctionBlock
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< id > *) - thenWithResolveFunctionBlock:
 Appends a handler to be executed when the promise is resolved. More...
 
(FMLiveSwitchFuture< id > *) - thenWithResolveFunctionBlock:rejectActionBlock:
 Appends handlers to be executed when the promise is resolved or rejected. More...
 
(NSException *) - thenWithResolveFunctionBlockAndRejectActionBlock
 Appends handlers to be executed when the promise is resolved or rejected. More...
 

Class Methods

(FMLiveSwitchPromise *) + promise
 Creates a new promise. More...
 
(FMLiveSwitchPromise *) + promiseWithCallback:
 Creates a promise with a resolve callback and a reject callback. More...
 
(FMLiveSwitchPromise *) + promiseWithCallbackBlock:
 Creates a promise with a resolve callback and a reject callback. More...
 
(FMLiveSwitchFuture< id > *) + wrapAsyncWithCallbackAction:
 Creates a promise and resolves it after invoking a callback action, or rejects it if an exception is thrown. More...
 
(FMLiveSwitchFuture< id > *) + wrapAsyncWithCallbackFunction:
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 
(void) + wrapAsyncWithCallbackFunctionBlock
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 
(FMLiveSwitchFuture< id > *) + wrapAsyncWithCallbackFunctionBlock:
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 
(FMLiveSwitchFuture< id > *) + wrapWithCallbackAction:
 Creates a promise and resolves it after invoking a callback action, or rejects it if an exception is thrown. More...
 
(FMLiveSwitchFuture< id > *) + wrapWithCallbackFunction:
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 
(void) + wrapWithCallbackFunctionBlock
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 
(FMLiveSwitchFuture< id > *) + wrapWithCallbackFunctionBlock:
 Creates a promise and resolves it using the result from a callback function, or rejects it if an exception is thrown. More...
 

Protected Attributes

 __pad0__: FMLiveSwitchPromiseBase<T>- (FMLiveSwitchFuture<T>*) failWithRejectAction:(FMLiveSwitchAction1<NSException*>*)rejectAction
 

Detailed Description

A promise.

Method Documentation

◆ failWithRejectActionBlock

- (NSException*) failWithRejectActionBlock

Appends a handler to be executed when the promise is rejected.

@inlineparam rejectActionBlock The reject action.

◆ failWithRejectActionBlock:

- (FMLiveSwitchFuture<T>*) failWithRejectActionBlock: (void(^)(NSException *))  rejectActionBlock

Appends a handler to be executed when the promise is rejected.

Parameters
rejectActionBlockThe reject action.

◆ failWithRejectFunction:

- (FMLiveSwitchFuture<T>*) failWithRejectFunction: (FMLiveSwitchFunction1< NSException *, FMLiveSwitchFuture< T > * > *)  rejectFunction

Appends a handler to be executed when the promise is rejected.

Parameters
rejectFunctionThe reject function.

◆ failWithRejectFunctionBlock

- (NSException*) failWithRejectFunctionBlock

Appends a handler to be executed when the promise is rejected.

@inlineparam rejectFunctionBlock The reject function.

◆ failWithRejectFunctionBlock:

- (FMLiveSwitchFuture<T>*) failWithRejectFunctionBlock: (FMLiveSwitchFuture< T > *(^)(NSException *))  rejectFunctionBlock

Appends a handler to be executed when the promise is rejected.

Parameters
rejectFunctionBlockThe reject function.

◆ init

- (instancetype) init

Creates a new promise.

◆ initWithCallback:

- (instancetype) initWithCallback: (FMLiveSwitchAction2< FMLiveSwitchAction1< T > *, FMLiveSwitchAction1< NSException * > * > *)  callback

Creates a promise with a resolve callback and a reject callback.

◆ initWithCallbackBlock:

- (instancetype) initWithCallbackBlock: (void(^)(FMLiveSwitchAction1< T > *, FMLiveSwitchAction1< NSException * > *))  callbackBlock

Creates a promise with a resolve callback and a reject callback.

◆ promise

+ (FMLiveSwitchPromise*) promise

Creates a new promise.

◆ promiseWithCallback:

+ (FMLiveSwitchPromise*) promiseWithCallback: (FMLiveSwitchAction2< FMLiveSwitchAction1< T > *, FMLiveSwitchAction1< NSException * > * > *)  callback

Creates a promise with a resolve callback and a reject callback.

◆ promiseWithCallbackBlock:

+ (FMLiveSwitchPromise*) promiseWithCallbackBlock: (void(^)(FMLiveSwitchAction1< T > *, FMLiveSwitchAction1< NSException * > *))  callbackBlock

Creates a promise with a resolve callback and a reject callback.

◆ thenWithResolveAction:

- (FMLiveSwitchFuture<T>*) thenWithResolveAction: (FMLiveSwitchAction1< T > *)  resolveAction

Appends a handler to be executed when the promise is resolved.

Parameters
resolveActionThe resolve action.

◆ thenWithResolveAction:rejectAction:

- (FMLiveSwitchFuture<T>*) thenWithResolveAction: (FMLiveSwitchAction1< T > *)  resolveAction
rejectAction: (FMLiveSwitchAction1< NSException * > *)  rejectAction 

Appends handlers to be executed when the promise is resolved or rejected.

Parameters
resolveActionThe resolve action.
rejectActionThe reject action.

◆ thenWithResolveActionBlock

- T thenWithResolveActionBlock

Appends a handler to be executed when the promise is resolved.

@inlineparam resolveActionBlock The resolve action.

◆ thenWithResolveActionBlock:

- (FMLiveSwitchFuture<T>*) thenWithResolveActionBlock: (void(^)(T))  resolveActionBlock

Appends a handler to be executed when the promise is resolved.

Parameters
resolveActionBlockThe resolve action.

◆ thenWithResolveActionBlock:rejectActionBlock:

- (FMLiveSwitchFuture<T>*) thenWithResolveActionBlock: (void(^)(T))  resolveActionBlock
rejectActionBlock: (void(^)(NSException *))  rejectActionBlock 

Appends handlers to be executed when the promise is resolved or rejected.

Parameters
resolveActionBlockThe resolve action.
rejectActionBlockThe reject action.

◆ thenWithResolveActionBlockAndRejectActionBlock

- (NSException*) thenWithResolveActionBlockAndRejectActionBlock

Appends handlers to be executed when the promise is resolved or rejected.

@inlineparam resolveActionBlock The resolve action. @inlineparam rejectActionBlock The reject action.

◆ thenWithResolveFunction:

- (FMLiveSwitchFuture<id>*) thenWithResolveFunction: (FMLiveSwitchFunction1< T, FMLiveSwitchFuture< id > * > *)  resolveFunction

Appends a handler to be executed when the promise is resolved.

Parameters
resolveFunctionThe resolve function.

◆ thenWithResolveFunction:rejectAction:

- (FMLiveSwitchFuture<id>*) thenWithResolveFunction: (FMLiveSwitchFunction1< T, FMLiveSwitchFuture< id > * > *)  resolveFunction
rejectAction: (FMLiveSwitchAction1< NSException * > *)  rejectAction 

Appends handlers to be executed when the promise is resolved or rejected.

Parameters
resolveFunctionThe resolve function.
rejectActionThe reject action.

◆ thenWithResolveFunctionBlock

- T thenWithResolveFunctionBlock

Appends a handler to be executed when the promise is resolved.

@inlineparam resolveFunctionBlock The resolve function.

◆ thenWithResolveFunctionBlock:

- (FMLiveSwitchFuture<id>*) thenWithResolveFunctionBlock: (FMLiveSwitchFuture< id > *(^)(T))  resolveFunctionBlock

Appends a handler to be executed when the promise is resolved.

Parameters
resolveFunctionBlockThe resolve function.

◆ thenWithResolveFunctionBlock:rejectActionBlock:

- (FMLiveSwitchFuture<id>*) thenWithResolveFunctionBlock: (FMLiveSwitchFuture< id > *(^)(T))  resolveFunctionBlock
rejectActionBlock: (void(^)(NSException *))  rejectActionBlock 

Appends handlers to be executed when the promise is resolved or rejected.

Parameters
resolveFunctionBlockThe resolve function.
rejectActionBlockThe reject action.

◆ thenWithResolveFunctionBlockAndRejectActionBlock

- (NSException*) thenWithResolveFunctionBlockAndRejectActionBlock

Appends handlers to be executed when the promise is resolved or rejected.

@inlineparam resolveFunctionBlock The resolve function. @inlineparam rejectActionBlock The reject action.

◆ wrapAsyncWithCallbackAction:

+ (FMLiveSwitchFuture<id>*) wrapAsyncWithCallbackAction: (FMLiveSwitchAction0 *)  callbackAction

Creates a promise and resolves it after invoking a callback action, or rejects it if an exception is thrown.

The callback is always dispatched to the background.

Parameters
callbackActionThe callback action.

◆ wrapAsyncWithCallbackFunction:

+ (FMLiveSwitchFuture<id>*) wrapAsyncWithCallbackFunction: (FMLiveSwitchFunction0< id > *)  callbackFunction

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

The callback is always dispatched to the background.

Parameters
callbackFunctionThe callback function.

◆ wrapAsyncWithCallbackFunctionBlock

+ (void) wrapAsyncWithCallbackFunctionBlock

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

The callback is always dispatched to the background.

@inlineparam callbackFunctionBlock The callback function.

◆ wrapAsyncWithCallbackFunctionBlock:

+ (FMLiveSwitchFuture<id>*) wrapAsyncWithCallbackFunctionBlock: (id(^)(void))  callbackFunctionBlock

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

The callback is always dispatched to the background.

Parameters
callbackFunctionBlockThe callback function.

◆ wrapWithCallbackAction:

+ (FMLiveSwitchFuture<id>*) wrapWithCallbackAction: (FMLiveSwitchAction0 *)  callbackAction

Creates a promise and resolves it after invoking a callback action, or rejects it if an exception is thrown.

Parameters
callbackActionThe callback action.

◆ wrapWithCallbackFunction:

+ (FMLiveSwitchFuture<id>*) wrapWithCallbackFunction: (FMLiveSwitchFunction0< id > *)  callbackFunction

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

Parameters
callbackFunctionThe callback function.

◆ wrapWithCallbackFunctionBlock

+ (void) wrapWithCallbackFunctionBlock

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

@inlineparam callbackFunctionBlock The callback function.

◆ wrapWithCallbackFunctionBlock:

+ (FMLiveSwitchFuture<id>*) wrapWithCallbackFunctionBlock: (id(^)(void))  callbackFunctionBlock

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

Parameters
callbackFunctionBlockThe callback function.

Member Data Documentation

◆ __pad0__

- __pad0__
protected