FMLiveSwitchFuture Class Reference

A future. 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
 
(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...
 
(void) - waitForPromise
 Blocks the current thread from proceeding until the future state has been resolved or rejected. More...
 
(void) - waitForPromiseWithMillisecondsTimeout:
 Blocks the current thread from proceeding until the future state has been resolved or rejected or if the timeout period elapses. More...
 
(T) - waitForResult
 Blocks the current thread from proceeding until the future has a result. More...
 
(T) - waitForResultWithMillisecondsTimeout:
 Blocks the current thread from proceeding until the future has a result. More...
 

Class Methods

(FMLiveSwitchFuture *) + future
 

Protected Attributes

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

Detailed Description

A future.

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.

◆ future

+ (FMLiveSwitchFuture*) future

◆ init

- (instancetype) init

◆ 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.

◆ waitForPromise

- (void) waitForPromise

Blocks the current thread from proceeding until the future state has been resolved or rejected.

◆ waitForPromiseWithMillisecondsTimeout:

- (void) waitForPromiseWithMillisecondsTimeout: (int)  millisecondsTimeout

Blocks the current thread from proceeding until the future state has been resolved or rejected or if the timeout period elapses.

Parameters
millisecondsTimeoutThe number of milliseconds to wait before timing out.

◆ waitForResult

- T waitForResult

Blocks the current thread from proceeding until the future has a result.

Throws an exception if the promise is rejected.

◆ waitForResultWithMillisecondsTimeout:

- T waitForResultWithMillisecondsTimeout: (int)  millisecondsTimeout

Blocks the current thread from proceeding until the future has a result.

Throws an exception if the promise is rejected or if the timeout period elapses.

Parameters
millisecondsTimeoutThe number of milliseconds to wait before timing out.

Member Data Documentation

◆ __pad0__

- __pad0__
protected