A future. More...
Public Member Functions | |
| abstract fm.liveswitch.Future< T > | fail (fm.liveswitch.IAction1< java.lang.Exception > rejectAction) |
| Appends a handler to be executed when the promise is rejected. More... | |
| abstract fm.liveswitch.Future< T > | fail (fm.liveswitch.IFunction1< java.lang.Exception, fm.liveswitch.Future< T >> rejectFunction) |
| Appends a handler to be executed when the promise is rejected. More... | |
| abstract fm.liveswitch.Future< T > | then (fm.liveswitch.IAction1< T > resolveAction) |
| Appends a handler to be executed when the promise is resolved. More... | |
| abstract fm.liveswitch.Future< T > | then (fm.liveswitch.IAction1< T > resolveAction, fm.liveswitch.IAction1< java.lang.Exception > rejectAction) |
| Appends handlers to be executed when the promise is resolved or rejected. More... | |
| abstract< R extends Object > fm.liveswitch.Future< R > | then (fm.liveswitch.IFunction1< T, fm.liveswitch.Future< R >> resolveFunction) |
| Appends a handler to be executed when the promise is resolved. More... | |
| abstract< R extends Object > fm.liveswitch.Future< R > | then (fm.liveswitch.IFunction1< T, fm.liveswitch.Future< R >> resolveFunction, fm.liveswitch.IAction1< java.lang.Exception > rejectAction) |
| 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 | waitForPromise (int millisecondsTimeout) |
| 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 | waitForResult (int millisecondsTimeout) |
| Blocks the current thread from proceeding until the future has a result. More... | |
Public Member Functions inherited from fm.liveswitch.FutureBase< T > | |
| java.lang.Exception | getException () |
| Gets the exception if rejected. More... | |
| T | getResult () |
| Gets the result if resolved. More... | |
| fm.liveswitch.FutureState | getState () |
| Gets the current state. More... | |
Protected Member Functions | |
| Future () | |
Protected Member Functions inherited from fm.liveswitch.FutureBase< T > | |
| FutureBase () | |
| void | setException (java.lang.Exception value) |
| Sets the exception if rejected. More... | |
| void | setResult (T value) |
| Sets the result if resolved. More... | |
| void | setState (fm.liveswitch.FutureState value) |
| Sets the current state. More... | |
A future.
|
protected |
|
abstract |
Appends a handler to be executed when the promise is rejected.
| rejectAction | The reject action. |
Reimplemented in fm.liveswitch.Promise< T >.
|
abstract |
Appends a handler to be executed when the promise is rejected.
| rejectFunction | The reject function. |
Reimplemented in fm.liveswitch.Promise< T >.
|
abstract |
Appends a handler to be executed when the promise is resolved.
| resolveAction | The resolve action. |
Reimplemented in fm.liveswitch.Promise< T >.
|
abstract |
Appends handlers to be executed when the promise is resolved or rejected.
| resolveAction | The resolve action. |
| rejectAction | The reject action. |
Reimplemented in fm.liveswitch.Promise< T >.
|
abstract |
Appends a handler to be executed when the promise is resolved.
| resolveFunction | The resolve function. |
|
abstract |
Appends handlers to be executed when the promise is resolved or rejected.
| resolveFunction | The resolve function. |
| rejectAction | The reject action. |
| void fm.liveswitch.Future< T >.waitForPromise | ( | ) |
Blocks the current thread from proceeding until the future state has been resolved or rejected.
| void fm.liveswitch.Future< T >.waitForPromise | ( | int | millisecondsTimeout | ) |
Blocks the current thread from proceeding until the future state has been resolved or rejected or if the timeout period elapses.
| millisecondsTimeout | The number of milliseconds to wait before timing out. |
| T fm.liveswitch.Future< T >.waitForResult | ( | ) |
Blocks the current thread from proceeding until the future has a result.
Throws an exception if the promise is rejected.
| T fm.liveswitch.Future< T >.waitForResult | ( | 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.
| millisecondsTimeout | The number of milliseconds to wait before timing out. |