Package org.jboss.elemento.flow
Interface Promisable<C extends FlowContext>
-
- Type Parameters:
C- the type of the context shared between tasks
public interface Promisable<C extends FlowContext>An interface to use the promise when executing asynchronous tasks.Error Handling
When using the methods in this interface, errors in tasks are propagated to the closest catch handler. This is different from the methods inSubscriptionthat catches errors in tasks and stores them in the context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> elemental2.promise.Promise<V>catch_(elemental2.promise.Promise.CatchOnRejectedCallbackFn<? extends V> onRejected)elemental2.promise.Promise<C>finally_(elemental2.promise.Promise.FinallyOnFinallyCallbackFn onFinally)elemental2.promise.Promise<C>promise()Returns the promise of the asynchronous execution.<V> elemental2.promise.Promise<V>then(elemental2.promise.IThenable.ThenOnFulfilledCallbackFn<? super C,? extends V> onFulfilled)<V> elemental2.promise.Promise<V>then(elemental2.promise.IThenable.ThenOnFulfilledCallbackFn<? super C,? extends V> onFulfilled, elemental2.promise.IThenable.ThenOnRejectedCallbackFn<? extends V> onRejected)
-
-
-
Method Detail
-
then
<V> elemental2.promise.Promise<V> then(elemental2.promise.IThenable.ThenOnFulfilledCallbackFn<? super C,? extends V> onFulfilled)
-
then
<V> elemental2.promise.Promise<V> then(elemental2.promise.IThenable.ThenOnFulfilledCallbackFn<? super C,? extends V> onFulfilled, elemental2.promise.IThenable.ThenOnRejectedCallbackFn<? extends V> onRejected)
-
catch_
<V> elemental2.promise.Promise<V> catch_(elemental2.promise.Promise.CatchOnRejectedCallbackFn<? extends V> onRejected)
-
finally_
elemental2.promise.Promise<C> finally_(elemental2.promise.Promise.FinallyOnFinallyCallbackFn onFinally)
-
promise
elemental2.promise.Promise<C> promise()
Returns the promise of the asynchronous execution.
-
-