Package org.jdeferred2
Interface AlwaysPipe<D,F,D_OUT,F_OUT,P>
-
- Type Parameters:
D
- Type of the inputF
- Type of the failure inputD_OUT
- Type of the output from this pipeF_OUT
- Type of the failure output from this pipeP
- Type of the progress output from this pipe
public interface AlwaysPipe<D,F,D_OUT,F_OUT,P>
A pipe invoked when thePromise
's state becomesPromise.State.RESOLVED
orPromise.State.REJECTED
. Pipes allow to start a newDeferred
and any state change or update invoked on the newDeferred
is piped to the outerPromise
. This allows to chain asynchronous calls or convert a rejection into resolve or vice versa.- Since:
- 2.0
- See Also:
Promise.pipeAlways(AlwaysPipe)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<D_OUT,F_OUT,P>
pipeAlways(Promise.State state, D resolved, F rejected)
Invoked when thePromise
resolves or rejects a value.
-
-
-
Method Detail
-
pipeAlways
Promise<D_OUT,F_OUT,P> pipeAlways(Promise.State state, D resolved, F rejected)
Invoked when thePromise
resolves or rejects a value.- Parameters:
state
- the state of thePromise
. EitherPromise.State.RESOLVED
orPromise.State.REJECTED
resolved
- the resolved value (if any) of thePromise
rejected
- the rejected value (if any) of thePromise
-
-